LinuxCommandLibrary

qstat

TLDR

Show all jobs

$ qstat
copy
Show user's jobs
$ qstat -u [username]
copy
Show full job details
$ qstat -f [job_id]
copy
Show queue status
$ qstat -Q
copy
Show running jobs
$ qstat -r
copy

SYNOPSIS

qstat [options] [jobids_...]

DESCRIPTION

qstat displays the status of batch jobs in PBS/Torque, SGE, or similar job scheduling systems. It shows job state, queue, resources, and timing information.

PARAMETERS

-f

Full job information.
-u user
Jobs for specific user.
-Q
Queue status.
-q
Queue summary.
-r
Running jobs only.
-n
Show nodes.
-a
All jobs.

EXAMPLES

$ # All jobs
qstat

# My jobs
qstat -u $USER

# Job details
qstat -f 12345

# Queue status
qstat -Q

# Jobs with nodes
qstat -n

# All jobs, all users
qstat -a
copy

OUTPUT FORMAT

$ Job ID    Name       User     Time  S  Queue
--------- ---------- -------- ----- -  -----
12345.srv myjob      user01   02:30 R  batch
12346.srv analysis   user01   --    Q  batch
copy

JOB STATES

$ Q - Queued
R - Running
H - Held
E - Exiting
C - Completed
copy

CAVEATS

Syntax varies between PBS, SGE, SLURM. Use squeue for SLURM systems.

HISTORY

qstat is part of PBS (Portable Batch System), developed at NASA for HPC job scheduling.

SEE ALSO

qsub(1), qdel(1), squeue(1), bjobs(1)

Copied to clipboard