br19
br19

Reputation: 971

Expand columns to see full jobname in Slurm

Is it possible to expand the number of characters used in the JobName column of the command sacct in SLURM?

For example, I currently have:

       JobID    JobName    Elapsed      NCPUS   NTasks      State 
------------ ---------- ---------- ---------- -------- ---------- 
12345      lengthy_na+   00:00:01         4         1      FAILED 

and I would like:

       JobID    JobName    Elapsed      NCPUS   NTasks      State 
------------ ---------- ---------- ---------- -------- ---------- 
12345      lengthy_name   00:00:01         4         1      FAILED 

Upvotes: 75

Views: 73315

Answers (2)

Bub Espinja
Bub Espinja

Reputation: 4571

You should use the format option, with:

sacct --helpformat

you'll see the parameters to show, for instance:

sacct --format="JobID,JobName%30"

will print the job id and the name up to 30 characters:

       JobID                        JobName
------------ ------------------------------
19009                                  bash
19010                             launch.sh
19010.0                     hydra_pmi_proxy
19010.1                     hydra_pmi_proxy

Now, you can customize your own output.

Upvotes: 80

w. Patrick Gale
w. Patrick Gale

Reputation: 2337

To retrieve my list of SLURM jobs running I use the default format with 30 characters showing for job names using the bash command below:

squeue --format="%.18i %.9P %.30j %.8u %.8T %.10M %.9l %.6D %R" --me

If you want to show more job name characters simply change the number of %.30j.

Upvotes: 74

Related Questions