Skip to main content

Managing & Monitoring Jobs

Once your job is submitted, use these commands to track and manage it.

Checking Job Status

# Your jobs only
squeue -u your_username

# All jobs in the cluster
squeue

# Specific job
squeue -j job_id

Job States

State Meaning
PD Pending — waiting for resources
R Running
CG Completing
CD Completed
F Failed
OOM Out of memory
TO Timed out

Job Details

# Full details of a job
scontrol show job job_id

# Job accounting and resource usage
sacct -j job_id --format=JobID,JobName,State,MaxRSS,Elapsed

Cancelling Jobs

# Cancel a specific job
scancel job_id

# Cancel all your jobs
scancel -u your_username

# Cancel a specific array task
scancel job_id_task_id

Attaching to a Running Job

Use sattach to attach to a running job's input/output streams in real time:

# Attach to a job
sattach job_id

# Attach to a specific job step
sattach job_id.step_id

For non-interactive jobs this behaves like tail -f. For interactive jobs you can provide input directly.

To find job steps:

scontrol show job job_id

Look for StepId in the output.