|
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
mmittiga
Joined: 03 Aug 2010 Posts: 14 Country: United States |
|
Way to see what Jobs run in which Queues |
|
Is there a way to see what what jobs are set to run in which job queue without having to go through each and every job. We have a couple of hundred jobs running in 15 queues.
Thanks
|
|
Tue Aug 03, 2010 10:21 am |
|
|
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7849
|
|
|
|
One way to do it is to use cons.bat/cons.sh to get a list of jobs ("list jobs" command) and output that list to a text file and then convert each line to "describe [job id] QUEUE" command and run this resulting text script using the same cons.bat/cons.sh method
|
|
Tue Aug 03, 2010 2:13 pm |
|
|
mmittiga
Joined: 03 Aug 2010 Posts: 14 Country: United States |
|
Way to see what Jobs run in which Queues |
|
I can not seem to find a cons.bat anywhere. We are using version 3.4.26 We are running way to many job queues and it is causing the scheduler to crash. I need to see what is running in what queue at what time and then move jobs around. I want to get down to 10 queues
|
|
Tue Aug 03, 2010 2:36 pm |
|
|
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7849
|
|
|
|
You are likely running Windows version of 24x7. It doesn't support command line mode interface and that's why there is no cons.bat.
Here is what you can do to query job properties using a JAL job. The script is based on the example I copied fro mthe 24x7 on-line help
Please make sure this job is run non-detached
|
|
// declare script variables
Dim( job_list, string )
Dim( no_more, boolean )
Dim( job_id, string )
Dim( job_name, string )
Dim( queue, string )
Dim( report, string, "\t\tREPORT\r\n\r\n" )
// build job list
JobList( "", job_list )
// parse the list
isEqual( job_list, "", no_more )
LoopUntil( no_more, END_LOOP )
// get next job ID
GetToken(",", job_list, job_id )
// get job name, and queue
JobDescribe( job_id, "NAME", job_name )
JobDescribe( job_id, "QUEUE", queue )
// append to the report
ConcatEx( report, job_id, "\t", job_name, "\t", queue, "\r\n", report )
isEqual( job_list, "", no_more )
END_LOOP:
// save report to file
FileSave("c:\\report.xls", report ) |
|
|
Tue Aug 03, 2010 7:20 pm |
|
|
mmittiga
Joined: 03 Aug 2010 Posts: 14 Country: United States |
|
|
|
Thanks for reply!
job fails with mismatch error here:
isEqual( job_list, "", no_more ) <<<mismatch error
END_LOOP:
I am sure its simply but I am not seeing why?
|
|
Tue Aug 03, 2010 10:26 pm |
|
|
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7849
|
|
|
|
Is that an old version of 24x7?
Please try the following
|
|
// declare script variables
Dim( job_list, string )
Dim( no_more, boolean )
Dim( job_id, string )
Dim( job_name, string )
Dim( queue, string )
Dim( report, string, "\t\tREPORT\r\n\r\n" )
// build job list
JobList( "", job_list )
Concat( job_list, ",0", job_list
// parse the list
isEqual( job_list, "0", no_more )
LoopUntil( no_more, END_LOOP )
// get next job ID
GetToken(",", job_list, job_id )
// get job name, and queue
JobDescribe( job_id, "NAME", job_name )
JobDescribe( job_id, "QUEUE", queue )
// append to the report
ConcatEx( report, job_id, "\t", job_name, "\t", queue, "\r\n", report )
isEqual( job_list, "0", no_more )
END_LOOP:
// save report to file
FileSave("c:\\report.xls", report ) |
|
|
Tue Aug 03, 2010 10:56 pm |
|
|
mmittiga
Joined: 03 Aug 2010 Posts: 14 Country: United States |
|
|
|
Hmm same thing again mismatch:
// parse the list
isEqual( job_list, "0", no_more ) <<====
|
|
Wed Aug 04, 2010 10:45 am |
|
|
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7849
|
|
|
|
Please try this one
|
|
// declare script variables
Dim( job_list, string )
Dim( no_more, boolean )
Dim( job_id, string )
Dim( job_name, string )
Dim( queue, string )
Dim( report, string, "\t\tREPORT\r\n\r\n" )
// build job list
JobList( "", job_list )
Concat( job_list, ",[0]", job_list
// parse the list
isEqual( job_list, "[0]", no_more )
LoopUntil( no_more, END_LOOP )
// get next job ID
GetToken(",", job_list, job_id )
// get job name, and queue
JobDescribe( job_id, "NAME", job_name )
JobDescribe( job_id, "QUEUE", queue )
// append to the report
ConcatEx( report, job_id, "\t", job_name, "\t", queue, "\r\n", report )
isEqual( job_list, "[0]", no_more )
END_LOOP:
// save report to file
FileSave("c:\\report.xls", report ) |
|
|
Wed Aug 04, 2010 3:11 pm |
|
|
mmittiga
Joined: 03 Aug 2010 Posts: 14 Country: United States |
|
|
|
That worked, awesome thanks! is there a field to show job start time?
|
|
Wed Aug 04, 2010 3:34 pm |
|
|
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7849
|
|
|
|
START_TIME - returns/sets job start time; the meaning of this value depends on the job schedule type, and makes no sense for event based jobs.
For more info please check "JDL Properties" topic in the on-line help.
|
|
Wed Aug 04, 2010 5:41 pm |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|