Page 1 of 1

Get Job Status from Command Line

Posted: Wed Mar 31, 2004 10:51 pm
by badhri
Greetings:

I am trying to get the status of the jobs from the Command line and help monitor the jobs without using DS Director.

For this i just loop through all the jobs and run dsjob to get the log details and spool into a text. Then parse this text to derive the required info. This whole process is very consuming (say 2sec/job).

Is there any Universe table/VOC Entry that i can use to derive this quick.

Thanks in Advance.

Regards,
Badhri ...

Posted: Thu Apr 01, 2004 1:12 am
by ray.wurlod
Not from the UniVerse command line, unless you know the internal structure in the Repository where status is recorded (it's based on a concept of "resources" - active stages that run in separate processes are also "resources").

You can, however, use the dsjob command from the operating system command line. The -jobinfo option reports job status among other things.

Code: Select all

dsjob -user userid -password password -jobinfo projectname jobname

Posted: Thu Apr 01, 2004 11:32 pm
by badhri
Hi Ray,

Thanks for your input. I tried this dsjob and get the update. But everytime someone wants to know the status of the jobs i need to run this dsjob command for all the jobs which is very time consuming. Is there anyway i can erive the status of the all the jobs in one go?

Badhri ...

Posted: Fri Apr 02, 2004 12:54 am
by ray.wurlod
Nothing that's supplied.

You could write your own wrapper to dsjob. For example:

Code: Select all

#!/bin/sh
project=myproject   # name of your project
for jobname in `dsjob -ljobs $project`
do
   jstatus=`dsjob -jobinfo $project $jobname| grep "Job Status" | cut -d: -f2`
   echo $jobname: $jstatus
done