-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.
When set, the SACCT_FORMAT environment variable will override the default format. For example:
SACCT_FORMAT="jobid,user,account,cluster"
因此,您只需在Jobname
字段后添加%NUMBER
来指定其长度。
它会像这样:sacct --starttime 2014-07-01 --format=User,JobID,Jobname%50,partition,state,time,start,end,elapsed,MaxRss,MaxVMSize,nnodes,ncpus,nodelist
提示:尽量避免从数据库查询过多的值,因为这可能会花费很长时间并影响SLURM的正确行为。因此,请将时间范围缩小到合理的值。