tsm backup report

hi
i run this script - query event * * nodes=*  begind=today-1 begint=18:00:00 endd=today endt=06:59:00

i want to know if i can exclude some schedule from the report or maybe i can use other script

thx

tsmil
TSMILAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

woolmilkporcCommented:
There is no "exclude" option for "query event".

However, the first asterisk stands for "all domains" and the second asterisk stands for "all schedules".

So you can query for scheduler events for particular domains or for particular schedules by "wildcarding":

- All domains starting with "web":

q ev web*   *

- all schedules containing "web"

q ev *   *web*

and so on.

If you established a good naming convention this should already help a lot.
0
TSMILAuthor Commented:
hi

its not good for me ,
is there maybe other way to get the last night backup but exclude some schedule from the script ?

maybe with select statement ?

tsmil
0
TSMILAuthor Commented:
hi again

maybe i can query by Schedule Name and node name ?

tsmil
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

woolmilkporcCommented:
OK, I tried to mimic the behaviour of "q event" as best I could.  :-)

Replace "SCHEDULE_NAME1", "SCHEDULE_NAME2" etc. (all UPPERCASE!) with the names of the schedules to be excluded. If you have very long schedule or node names increase their cast value "char(24)" accordingly.

select date(SCHEDULED_START)||' '||time(SCHEDULED_START) "Scheduled Start" , -
       date(ACTUAL_START)||' '||time(ACTUAL_START) "Actual Start" , -
       cast(SCHEDULE_NAME as char(24)) "Schedule Name", -
       cast(NODE_NAME as char(24)) "Node Name", -
       STATUS -
  from EVENTS -
     where -
       SCHEDULE_NAME not in -
         ('SCHEDULE_NAME1','SCHEDULE_NAME2','SCHEDULE_NAME3','SCHEDULE_NAME4' )  -
     and ( -
         (date(SCHEDULED_START)=date(current_timestamp-1 day) and hour(SCHEDULED_START)>=18) -
     or -
         (date(SCHEDULED_START)=date(current_timestamp) and hour(SCHEDULED_START)<7) -
         ) -
  order by SCHEDULED_START

Open in new window

Run the above using the macro technique I suggested in our previous thread.
0
woolmilkporcCommented:
>> maybe i can query by Schedule Name and node name <<

Of course:

q ev * schedule_name node=nodename

Replace schedule_name and nodename with the desired values (case doesn't matter here). Wildcards are possible (see my first post).
0
TSMILAuthor Commented:
hi woolmilkporc

how can i mix the script that i send and this script together
select cast(entity as char(18)) Node, -
 cast(activity as char(6)) Task, -
 date(start_time) Date, -
 time(start_time) Time, -
 successful -
from summary -
 where activity='BACKUP' and -
    entity in ( 'NODENAME1','NODENAME2','NODENAME3','NODENAME4' )  -
  and ( -
   (day(START_TIME)=day(current_timestamp)-1 and hour(start_time)>=18) -
  or -
   (day(START_TIME)=day(current_timestamp) and hour(start_time)<8) -
      ) -
order by START_TIME


THX
0
woolmilkporcCommented:
What do you mean with "script that I send"?
0
TSMILAuthor Commented:
to this

select date(SCHEDULED_START)||' '||time(SCHEDULED_START) "Scheduled Start" , -
       date(ACTUAL_START)||' '||time(ACTUAL_START) "Actual Start" , -
       cast(SCHEDULE_NAME as char(24)) "Schedule Name", -
       cast(NODE_NAME as char(24)) "Node Name", -
       STATUS -
  from EVENTS -
     where -
       SCHEDULE_NAME not in -
         ('SCHEDULE_NAME1','SCHEDULE_NAME2','SCHEDULE_NAME3','SCHEDULE_NAME4' )  -
     and ( -
         (date(SCHEDULED_START)=date(current_timestamp-1 day) and hour(SCHEDULED_START)>=18) -
     or -
         (date(SCHEDULED_START)=date(current_timestamp) and hour(SCHEDULED_START)<7) -
         ) -
  order by SCHEDULED_START
0
woolmilkporcCommented:
You can combine both queries in a single file named e.g. backup+event_reports, then run this, just as with the single report:

/usr/bin/dsmadmc -id=$ID -pass=$PAS -dataonly=yes -displaymode=table 'macro /path/to/backup+event_reports' > $mailfile
/usr/bin/mutt -s "TSM Backup and Event Reports"  -a $mailfile dudure@clalit.org.il < /dev/null

"/path/to/backup+event_reports" means name and full path to  your new file containing the combined SQL query.

You can also add messages to form kind of report headers/footer, like this:

issue message I "--------------------------------"
issue message I "Backup Report from Summary Table"
issue message I "--------------------------------"
select cast(entity as char(18)) Node, -
 cast(activity as char(6)) Task, -
 date(start_time) Date, -
 time(start_time) Time, -
 successful -
from summary -
 where activity='BACKUP' and -
    entity in ( 'NODENAME1','NODENAME2','NODENAME3','NODENAME4' )  -
  and ( -
   (day(START_TIME)=day(current_timestamp)-1 and hour(start_time)>=18) -
  or -
   (day(START_TIME)=day(current_timestamp) and hour(start_time)<8) -
      ) -
order by START_TIME
issue message I "------------------------------"
issue message I "Event Report from Events Table"
issue message I "------------------------------"
select date(SCHEDULED_START)||' '||time(SCHEDULED_START) "Scheduled Start" , -
       date(ACTUAL_START)||' '||time(ACTUAL_START) "Actual Start" , -
       cast(SCHEDULE_NAME as char(24)) "Schedule Name", -
       cast(NODE_NAME as char(24)) "Node Name", -
       STATUS -
  from EVENTS -
     where -
       SCHEDULE_NAME not in -
         ('SCHEDULE_NAME1','SCHEDULE_NAME2','SCHEDULE_NAME3','SCHEDULE_NAME4' )  -
     and ( -
         (date(SCHEDULED_START)=date(current_timestamp-1 day) and hour(SCHEDULED_START)>=18) -
     or -
         (date(SCHEDULED_START)=date(current_timestamp) and hour(SCHEDULED_START)<7) -
         ) -
  order by SCHEDULED_START 
issue message I "--------------"
issue message I "End of Reports"
issue message I "--------------"

Open in new window

0
TSMILAuthor Commented:
hi

the script is working , but what i need it that

1. i need to display the node and there status with the schedule together but not  schedule like "tsm_incr" ( example )

in this script the first section display the node that i want

but the second section display all the node without the sch "tsm_incr" - i need to display junt the node i want without the sch

is it possible ?

Thx
0
woolmilkporcCommented:
I think I don't understand what you're after.

The first script displays rows like this:

Nodename      BACKUP       2015-05-31      08:00:03     YES

The second scripts displays rows like this:

2015-05-31 18.00.00      2015-05-31 18.01.03      Schedule_Name              Node_Name                Completed


Please wipe out the undesired column(s) or add the desired column(s) or change the column sequence, respectively, and post the resulting row layout.
0
TSMILAuthor Commented:
The second scripts displays rows like this:

2015-05-31 18.00.00      2015-05-31 18.01.03      Schedule_Name              Node_Name                Completed

you write but i need that only node names that i selected above will display not all the nodes
0
woolmilkporcCommented:
So you mean that the selection criteria applied in the first part (NODENAME1, NODENAME2 etc) should also be applied to the second part?

I thought that the first script was intended to select node names while the second one was intended to rule out schedule names?

Anyway, if you want the second part to rule out schedule names as well as to select particular nodes:

issue message I "--------------------------------"
issue message I "Backup Report from Summary Table"
issue message I "--------------------------------"
select cast(entity as char(18)) Node, -
 cast(activity as char(6)) Task, -
 date(start_time) Date, -
 time(start_time) Time, -
 successful -
from summary -
 where activity='BACKUP' and -
    entity in ( 'NODENAME1','NODENAME2','NODENAME3','NODENAME4' )  -
  and ( -
   (day(START_TIME)=day(current_timestamp)-1 and hour(start_time)>=18) -
  or -
   (day(START_TIME)=day(current_timestamp) and hour(start_time)<8) -
      ) -
order by START_TIME
issue message I "------------------------------"
issue message I "Event Report from Events Table"
issue message I "------------------------------"
select date(SCHEDULED_START)||' '||time(SCHEDULED_START) "Scheduled Start" , -
       date(ACTUAL_START)||' '||time(ACTUAL_START) "Actual Start" , -
       cast(SCHEDULE_NAME as char(24)) "Schedule Name", -
       cast(NODE_NAME as char(24)) "Node Name", -
       STATUS -
  from EVENTS -
     where -
       SCHEDULE_NAME not in -
         ('SCHEDULE_NAME1','SCHEDULE_NAME2','SCHEDULE_NAME3','SCHEDULE_NAME4' )  -
      and - 
       NODE_NAME in -
         ( 'NODENAME1','NODENAME2','NODENAME3','NODENAME4' )  -
     and ( -
         (date(SCHEDULED_START)=date(current_timestamp-1 day) and hour(SCHEDULED_START)>=18) -
     or -
         (date(SCHEDULED_START)=date(current_timestamp) and hour(SCHEDULED_START)<7) -
         ) -
  order by SCHEDULED_START 
issue message I "--------------"
issue message I "End of Reports"
issue message I "--------------"

Open in new window

0
TSMILAuthor Commented:
hi

the script work thx a lot !!!
but in one server when i run this script its stuck on the :
ANR1496I ------------------------------
ANR1496I Event Report from Events Table
ANR1496I ------------------------------

how can i send you log ?
0
woolmilkporcCommented:
Could it be that the select query takes a very long time - due to a huge number of domains/schedules/nodes/events?

The location you posted is normally not a place to get stuck!

Send a log? Write the log to a text file and use "Attach File" below the comment box.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TSMILAuthor Commented:
im sorry my mistake

thx!!!!!!!!!!!!!!!!!!!
0
TSMILAuthor Commented:
you are number one !!!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Storage Software

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.