Skip to content

Instantly share code, notes, and snippets.

@ebirn
ebirn / seff.py
Last active September 30, 2022 14:26
SLURM job efficiency
#!/usr/bin/env python3
# porting of https://github.com/SchedMD/slurm/blob/master/contribs/seff/seff
#
# sacct -P -n -a --format JobID,State,Cluster,AllocCPUS,REQMEM,TotalCPU,Elapsed,MaxRSS,ExitCode,NNodes,NTasks -j 12655203
# sacct --format=Jobid,JobName,State,QOS,Partition%5,Timelimit,Elapsed,NCPU,CPUTime,TotalCpu,SystemCPU,UserCPU,ReqMem,MaxRSS,MaxVMSize $@
import sys
import subprocess
import json
from collections import Counter