Files
tldr/pages.zh/linux/sacct.md

28 lines
767 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# sacct
> 显示来自 Slurm 服务的会计数据。
> 更多信息:<https://slurm.schedmd.com/sacct.html>。
- 显示最近工作的作业 ID、作业名称、分区、账户、分配的 CPU 数、作业状态和作业退出代码:
`sacct`
- 显示最近工作的作业 ID、作业状态和作业退出代码
`sacct --brief`
- 显示某个作业的分配情况:
`sacct --jobs {{job_id}} --allocations`
- 显示某个作业的经过时间、作业名称、请求的 CPU 数和请求的内存:
`sacct --jobs {{job_id}} --format=Elapsed,JobName,ReqCPUS,ReqMem`
- 显示从一周前到今天发生的最近作业:
`sacct --starttime=$(date -d "1 week ago" +'%F')`
- 为某个属性输出更大的字符数:
`sacct --format=JobID,JobName%100`