Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SLURM: How to view completed jobs full name?

Tags:

slurm

sacct -n returns all job's name trimmed for example" QmefdYEri+.

[Q] How could I view the complete name of the job, instead of its trimmed version?

--

$ sacct -n
1194             run.sh      debug       root          1  COMPLETED      0:0
1194.batch        batch                  root          1  COMPLETED      0:0
1195         run_alper+      debug       root          1  COMPLETED      0:0
1195.batch        batch                  root          1  COMPLETED      0:0
1196         QmefdYEri+      debug       root          1  COMPLETED      0:0
1196.batch        batch                  root          1  COMPLETED      0:0
like image 374
alper Avatar asked Jun 23 '17 16:06

alper


1 Answers

I use the scontrol command when I am interested in one particular jobid as shown below (output of the command taken from here).

$ scontrol show job 106
JobId=106 Name=slurm-job.sh
UserId=rstober(1001) GroupId=rstober(1001)
Priority=4294901717 Account=(null) QOS=normal
JobState=RUNNING Reason=None Dependency=(null)
Requeue=1 Restarts=0 BatchFlag=1 ExitCode=0:0
RunTime=00:00:07 TimeLimit=UNLIMITED TimeMin=N/A
SubmitTime=2013-01-26T12:55:02 EligibleTime=2013-01-26T12:55:02
StartTime=2013-01-26T12:55:02 EndTime=Unknown
PreemptTime=None SuspendTime=None SecsPreSuspend=0
Partition=defq AllocNode:Sid=atom-head1:3526
ReqNodeList=(null) ExcNodeList=(null)
NodeList=atom01
BatchHost=atom01
NumNodes=1 NumCPUs=2 CPUs/Task=1 ReqS:C:T=*:*:*
MinCPUsNode=1 MinMemoryNode=0 MinTmpDiskNode=0
Features=(null) Gres=(null) Reservation=(null)
Shared=0 Contiguous=0 Licenses=(null) Network=(null)
Command=/home/rstober/slurm/local/slurm-job.sh
WorkDir=/home/rstober/slurm/local    

If you want to use sacct, you can modify the number of characters that are displayed for any given field as explained in the documentation:

-o, --format Comma separated list of fields. (use "--helpformat" for a list of available fields). NOTE: When using the format option for listing various fields you can put a %NUMBER afterwards to specify how many characters should be printed.

e.g. format=name%30 will print 30 characters of field name right justified. A %-30 will print 30 characters left justified.

Therefore, you can do something like this:

sacct --format="JobID,JobName%30,Partition,Account,AllocCPUS,State,ExitCode"

if you want the JobName row to be 30-characters wide.

like image 119
AndresM Avatar answered Nov 02 '22 04:11

AndresM