Results 1 to 8 of 8
-
07-31-2012, 10:54 AM #1Newcomer
- Join Date
- Feb 2011
- Posts
- 14
- Thanks
- 0
- Thanked 0 Times in 0 Posts
Need an 'Q EVENT' script that can use a file for the 'nodes' option
For example, I can run a select to show me a list of nodes that have a common contact:
select node_name from nodes where contact like 'Windows_Group%'
But then I want to run a query event log to show a list of missed/failed for the nodes that were reported from the select statement above. Such as:
q ev * * node=(INPUT_FILE) begind=-1 begint=17:00 endd=today endt=now ex=yes
Please let me know if I am being to vague.
Thanks in advance,
Don
-
07-31-2012, 11:01 AM #2Senior Member
- Join Date
- Dec 2004
- Location
- NC
- Posts
- 200
- Thanks
- 0
- Thanked 11 Times in 11 Posts
You can't specify a file but you can use a comma delimited list of nodes.
q eve * * node=NODE1,NODE2,NODE3,...,NODEN ...."If we knew what it was we were doing, it would not be called research, would it?" -- Albert Einstein
-
07-31-2012, 11:33 AM #3Newcomer
- Join Date
- Feb 2011
- Posts
- 14
- Thanks
- 0
- Thanked 0 Times in 0 Posts
Problem is the list is HUGE. The only other way I thought of was either splitting into separate schedules within the same domain.
-
07-31-2012, 11:52 AM #4
You would have to change your query into a select statement. I gathered the last 10 days in the following script, just change the days to what you need.
If you want just missed/failed/pending then use:
select -
schedule_name, -
cast(SUBSTR(CHAR(actual_start),12,
as char(
) AS START, -
node_name, -
cast(status as char(10)) as "STATUS", -
cast(result as char(7)) as "RESULT" -
from EVENTS -
where scheduled_start>(CURRENT TIMESTAMP - 10 DAYS) -
and STATUS not in ('Completed','Future') -
and node_name in (select node_name from nodes -
where contact like 'Windows_Group%')
This is an example returning all results:
select -
schedule_name, -
cast(SUBSTR(CHAR(actual_start),12,
as char(
) AS START, -
node_name, -
cast(status as char(10)) as "STATUS", -
case -
when result=0 then ' 0-Succ' -
when result=4 then ' 4-SkFi' -
when result=8 then ' 8-Warn' -
when result=12 then '12-Errs' -
else cast(result as char(7)) -
end -
as "RESULT" -
from events -
where scheduled_start>(CURRENT TIMESTAMP - 10 DAYS) -
and node_name in (select node_name from nodes -
where contact like 'Windows_Group%')
If you are seeing a smiley in the syntax it represents an eight followed by )Last edited by chad_small; 07-31-2012 at 12:14 PM.
-
07-31-2012, 11:58 AM #5Newcomer
- Join Date
- Feb 2011
- Posts
- 14
- Thanks
- 0
- Thanked 0 Times in 0 Posts
What are the red smily faces supposed to be?
-
07-31-2012, 12:01 PM #6
-
07-31-2012, 12:06 PM #7Newcomer
- Join Date
- Feb 2011
- Posts
- 14
- Thanks
- 0
- Thanked 0 Times in 0 Posts
Yea, just caught that... Did get the following:
tsm: TSMZWEI>select schedule_name cast(SUBSTR(CHAR(actual_start),12,
as char(
) AS START,node_name, cast(status as char(10)) as "STATUS", case when result=0 then ' 0-Succ' hen result=4 then ' 4-SkFi' when result=8 then ' 8-Warn' when result=12 then '12-Errs' else cast(result as char(7)) end as "RESULT" from events where start_time>(CURRENT TIMESTAMP - 10 DAYS) and node_name in (select node_name from nodes where contact like 'sea%')
ANR0162W Supplemental database diagnostic information: -1:42601:-104 ([IBM][CLI Driver][DB2/LINUXX8664] SQL0104N An
unexpected token "(" was found following "t schedule_name cast". Expected tokens may include: ",". SQLSTATE=42601
).
-
07-31-2012, 01:31 PM #8Moderator
- Join Date
- Aug 2005
- Location
- Somewhere in the US
- Posts
- 5,361
- Thanks
- 2
- Thanked 148 Times in 145 Posts
Should be for the two select statements:
Code:schedule_name, - cast(SUBSTR(CHAR(actual_start),12,8) as char(8)) AS START, - node_name, - cast(status as char(10)) as "STATUS", - cast(result as char(7)) as "RESULT" - from EVENTS - where scheduled_start>(CURRENT TIMESTAMP - 10 DAYS) - and STATUS not in ('Completed','Future') - and node_name in (select node_name from nodes - where contact like 'Windows_Group%') This is an example returning all results: select - schedule_name, - cast(SUBSTR(CHAR(actual_start),12,8) as char(8)) AS START, - node_name, - cast(status as char(10)) as "STATUS", - case - when result=0 then ' 0-Succ' - when result=4 then ' 4-SkFi' - when result=8 then ' 8-Warn' - when result=12 then '12-Errs' - else cast(result as char(7)) - end - as "RESULT" - from events - where scheduled_start>(CURRENT TIMESTAMP - 10 DAYS) - and node_name in (select node_name from nodes - where contact like 'Windows_Group%')Ed
Similar Threads
-
Script to list all nodes and schedules associated to them and output it to a file
By PierCed_3 in forum ScriptingReplies: 3Last Post: 12-05-2007, 01:09 PM -
option file
By click007 in forum ISC -Integrated Solution ConsoleReplies: 1Last Post: 09-14-2007, 11:39 AM -
Option sets and Nodes creating them selves
By Rick111 in forum Backup / Archive DiscussionReplies: 5Last Post: 12-06-2005, 04:38 AM -
Need some help with using the domain option in a tsm client command script
By rvillano in forum ScriptingReplies: 2Last Post: 11-11-2004, 08:28 AM -
dsm.opt - can't find option for the CLI Command : backup event entire
By Tom in forum Backup / Archive DiscussionReplies: 0Last Post: 03-12-2003, 09:01 AM


Reply With Quote
