I suppose it's a pretty trivial question but nevertheless, I'm looking for the (sacct I guess) command that will display the CPU time and memory used by a slurm job ID.
相关问题
- slurm: use a control node also for computing
- How to set the maximum priority to a Slurm job?
- How to let SBATCH send stdout via email?
- SLURM: Embarrassingly parallel program inside an e
- Is it possible to submit a series of different job
相关文章
- Questions on alternative ways to run 4 parallel jo
- SLURM sbatch job array for the same script but wit
- Adding time to a running slurm job
- How to configure the content of slurm notification
- SLURM job taking up entire node when using just on
- Limit the number of running jobs in SLURM
- How to run a job array in R using the rscript comm
- Find out the CPU time and memory usage of a slurm
sacct
is indeed the command to use for finished jobs. For running jobs, you can look at thesstat
command.The other answers all detail formats for output of
sacct
, which is great for looking at multiple jobs aggregated in a table.However, sometimes you want to look at a specific job in more detail, so you can tell whether your job efficiently used the allocated resources. For that,
seff
is very useful. The syntax is simplyseff <Jobid>
. For example, here's a recent job of mine (that failed):Note that the key CPU metric, CPU Utilized, corresponds to the TotalCPU field from
sacct
, while Memory Utilized corresponds to MaxRSS.You're right that the sacct command is what you're looking for. The --format switch is the other key element. If you run this command:
you'll get a printout of the different fields that can be used for the --format switch. The details of each field are described in the Job Account Fields section of the man page. For CPU time and memory, CPUTime and MaxRSS are probably what you're looking for. cputimeraw can also be used if you want the number in seconds, as opposed to the usual Slurm time format.
@aaron.kizmiller is right,
sacct
is the command to use.One can fetch all of the following fields by passing them into
saact --format="field,field"
Fields:
For example, to list all job ids, elapsed time, and max VM size, you can run:
sacct --format='JobID,Elapsed,MaxVMSize'