gpt4 book ai didi

SLURM 作业历史记录 : get full length JobName

转载 作者:行者123 更新时间:2023-12-03 14:18:23 29 4
gpt4 key购买 nike

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

sacct --starttime 2014-07-01 --format=User,JobID,Jobname,partition,state,time,start,end,elapsed,MaxRss,MaxVMSize,nnodes,ncpus,nodelist

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

最佳答案

从 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"


所以你可以简单地指定 Jobname 的长度字段添加 %NUMBER之后。

它看起来像这样:
sacct --starttime 2014-07-01 --format=User,JobID,Jobname%50,partition,state,time,start,end,elapsed,MaxRss,MaxVMSize,nnodes,ncpus,nodelist

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

关于SLURM 作业历史记录 : get full length JobName,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48187625/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com