Skip to content

Instantly share code, notes, and snippets.

@dlebauer
Created February 4, 2025 07:43
Show Gist options
  • Save dlebauer/b7b995d2787ef20071f2a276742bd559 to your computer and use it in GitHub Desktop.
Save dlebauer/b7b995d2787ef20071f2a276742bd559 to your computer and use it in GitHub Desktop.
Slurm and SGE Job Stats

Equivalent Commands: Slurm vs SGE/OGS

1. Equivalent of seff (Job Efficiency Report)

Slurm:

seff <job_id>

SGE/OGS:

qacct -j <job_id>

To extract key efficiency metrics:

qacct -j 2377830 | grep -E 'cpu|mem|maxvmem|ru_wallclock|exit_status'

Formatted summary:

echo "Job Efficiency for 2377830:"
qacct -j 2377830 | awk '/ru_wallclock/ {print "Wall Time: " $2 " sec"}
                         /cpu/ {print "CPU Time: " $2 " sec"}
                         /mem/ {print "Memory Used: " $2 " GB"}
                         /maxvmem/ {print "Max Virtual Memory: " $2 " GB"}
                         /exit_status/ {print "Exit Status: " $2}'

2. Equivalent of sacct (Job History and Resource Usage)

Slurm:

sacct -u <user>

SGE/OGS:

qacct -o <username>

To see the last 10 completed jobs:

qacct -o dlebaue1 | tail -n 10

To filter specific job IDs:

qacct -j 2377830

3. Checking Running Jobs (Equivalent to squeue in Slurm)

Slurm:

squeue

SGE/OGS:

qstat

For a specific user:

qstat -u dlebaue1

To get detailed resource usage:

qstat -j 2377830

4. Checking Memory and CPU Usage in Real-Time (Equivalent to sstat)

Slurm:

sstat -j <job_id>

SGE/OGS:

qstat -j <job_id>

To monitor live resource usage, SSH into the compute node:

ssh scc-dd2.scc.bu.edu
top -u $USER
htop

Summary Table: Slurm vs SGE Commands

Slurm Command SGE/OGS Equivalent Purpose
seff <job_id> qacct -j <job_id> Job efficiency report (CPU, memory, wall time)
sacct -u <user> qacct -o <user> Job history with resource usage
squeue qstat View running jobs
sstat -j <job_id> qstat -j <job_id> Check real-time job resource usage
sinfo qhost Show available nodes and load
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment