Skip to content

Instantly share code, notes, and snippets.

@pansapiens
Last active March 13, 2024 04:15
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pansapiens/1b770fdbafa75f9aacb851d99a2aa9e2 to your computer and use it in GitHub Desktop.
Save pansapiens/1b770fdbafa75f9aacb851d99a2aa9e2 to your computer and use it in GitHub Desktop.
Some SLURM aliases
alias default_account='sacctmgr --parsable2 show user -s andrewpe | tail -1 | cut -f 2 -d '\''|'\'''
alias fairshare='sshare -a --accounts $(default_account)'
alias jhistory='sacct -u ${USER} --starttime $(date -d "-1 month" +%Y-%m-%d) --format=User,JobID,Jobname,partition,state,exitcode,time,start,end,elapsed,MaxRss,MaxVMSize,nnodes,ncpus,nodelist'
alias jshow='scontrol show job'
alias jinfo='sacct --starttime $(date -d "-1 month" +%Y-%m-%d) --format=User,JobID,Jobname%64,partition,qos,ReqCPUS,ReqMem,state,exitcode,time,start,end,elapsed,MaxRss,MaxVMSize,nnodes,ncpus,nodelist -j'
alias node_types='sinfo -o '\''%c %m %n %R'\'' --sort '\''P'\'''
alias qhogs='sreport cluster UserUtilizationByAccount -t hours'
alias si='sinfo -o "%20P %5D %14F %8z %10c %10m %10d %11l %16f %N"'
alias sq='squeue -o "%8i %.60j %4t %10u %20q %20a %10g %20P %10Q %5D %2C %5m %11l %11L %R"'
alias squ='squeue -u $USER --format="%.18i %.9P %.60j %.8u %.8a %.2t %.10M %.6D %R"'
alias qos_limits="sacctmgr -p list qos $@ format=Name,Priority,GraceTime,MaxWall,MaxTRESPerUser,MaxJobsPU | column -ts'|'"
alias show_limits="scontrol show config | grep Max"
alias show_qos="sacctmgr show qos"
alias my_qos="sacctmgr -p list associations $@ format=Account,User,Partition,Qos,DefaultQOS tree | column -ts'|' | grep $USER"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment