Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How get information of completed PBS or Torque jobs?

Tags:

shell

pbs

torque

I have IDs of completed jobs. How do I check its detailed information, such as execution time, allocated nodes, etc? I remember SGE has a command for it (qacct?). But I could not find it for PBS or Torque. Thanks.

like image 399
user3282611 Avatar asked Jun 16 '14 17:06

user3282611


2 Answers

Since job accounting requires root access to view completed jobs, or that the cluster admins have installed pbstools (both out of the control of a user), I've found that the easiest thing to do is to place a

tracejob $PBS_JOBID

on the last line of the submission script. If the scheduler is MAUI, then checkjob -vv $PBS_JOBID is another alternative. These commands could be redirected to a separate outfile:

tracejob $PBS_JOBID > $PBS_O_WORKDIR/$PBS_JOBID.tracejob

Should also be possible to have this run as a user epilog script to make it more reusable from job to job.

like image 141
jvd10 Avatar answered Sep 21 '22 19:09

jvd10


I was looking at this thread searching how to do this in my HPC running PBSPro 19.2.3 and as of PBSPro 18 the solution is similar to John Damm Sørensen's reply, but the -w flag is used instead of -1 to display output of each field in a single line and you need to add -x flag to see the details of finished jobs as well, so you don't need to run it within the job script. (p.203, section 2.59.2.2 of the Reference Guide)

qstat -fxw $PBS_JOBID

You can then grep out of it the requested information, such as resources used, Exit status, etc:

qstat -fxw $PBS_JOBID | grep -E "resources_used|Exit_status|array_index"
like image 25
IsoBar Avatar answered Sep 23 '22 19:09

IsoBar