SLURM 作业历史记录:获取全长作业名称

Yod*_*oda 6 slurm

我想获取有关我的 SLURM 工作历史记录的信息。我使用类似的东西

sacct --starttime 2014-07-01 --format=User,JobID,Jobname,partition,state,time,start,end,elapsed,MaxRss,MaxVMSize,nnodes,ncpus,nodelist
Run Code Online (Sandbox Code Playgroud)

获取我的工作摘要,但很难跟踪 JobName 部分只显示我工作名称的一小部分。我有很多工作的名字共享几个词。我会sacct命令显示更多的工作名称,最好是全名。我注意到其他列宽是为适应下面的信息而制作的,那么为什么不使用 JobName 呢?

Car*_*noy 6

从 sacct 手册页:

   -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"
Run Code Online (Sandbox Code Playgroud)

所以你可以简单地Jobname通过%NUMBER在它后面添加来指定字段的长度。

它看起来像这样:

sacct --starttime 2014-07-01 --format=User,JobID,Jobname%50,partition,state,time,start,end,elapsed,MaxRss,MaxVMSize,nnodes,ncpus,nodelist
Run Code Online (Sandbox Code Playgroud)

PS:尽量避免从数据库中查询过多的值,因为这可能需要很长时间并影响slurm的正确行为。所以把时间范围缩小到一个合理的值。