Commonly Used PBS Commands

Article ID: 174
Last updated: 01 Sep, 2026

The four most commonly used PBS commands, qsub, qstat, qdel, and qhold, are briefly described below. See man pbs for a list of all PBS commands.

qsub

To submit a batch job to the specified queue using a script:

%qsub -q queue_name job_script 

Queue names on Aitken and Electra include normal, debug, long, devel, and low. When queue_name is omitted, the job is routed to the default queue, which is the normal queue.

To submit an interactive PBS job:

%qsub -I -q queue_name -l resource_list 

No job_script should be included when submitting an interactive PBS job.

The resource_list typically specifies the number of nodes, CPUs, amount of memory and wall time needed for this job. The following example shows a request for a single Aitken Rome node and a wall time of 2 hours.

%qsub -I -lselect=1:ncpus=128:model=rom_ait,walltime=2:00:00

See man pbs_resources for more information on what resources can be specified.

Note: If -l resource_list is omitted, the default resources for the specified queue is used. When queue_name is omitted, the job is routed to the default queue, which is the normal queue.

qstat

To display queue information:

%qstat -Q queue_name
%qstat -q queue_name
%qstat -fQ queue_name 

Each option uses a different format to display all of the queues available, and their constraints and status. The queue_name is optional.

To display job status:

-a
Display all jobs in any status (running, queued, held)
-r
Display all running or suspended jobs
-n
Display the execution hosts of the running jobs
-i
Display all queued, held or waiting jobs
-u username
Display jobs that belong to the specified user
-s
Display any comment added by the administrator or scheduler. This option is typically used to find clues of why a job has not started running.
-f job_id
Display detailed information about a specific job
-xf job_id,
-xu user_id
Display status information for finished jobs (within the past 7 days).
TIP: Some of these flags can be combined when you are checking the job status.

Note: The versions of qstat on newer NAS systems (including Athena and Cabeus GH200 nodes) and older NAS systems (including Electra, Aitken, and Endeavour, and Cabeus A100 nodes) are different. To get the same look and feel of qstat on the newer systems as the older systems, it is recommended to use a NAS provided script called nas_qstat, available under /usr/local/bin on athfe[01-04] and cghfe[01-02]. In addition, the script showq under /u/hsp/bin can be used to visually see all jobs that are running or pending and their status, along with node availability at the bottom of the output.

qdel

To delete (cancel) a job:

%qdel job_id 

qhold

To hold a job:

%qhold job_id 

Only the job owner or a system administrator with "su" or "root" privilege can place a hold on a job. The hold can be released using the qrls command.

For more detailed information on each command, see their corresponding man pages.

Also read

Contact Us

General User Assistance

Security

  • Report security issues 24x7x365
  • Toll-free: 1-877-NASA-SEC (1-877-627-2732)
  • E-mail: soc@nasa.gov

User Documentation

High-End Computing Capability (HECC) Portfolio Office

NASA High-End Computing Program

Tell Us About It

Our goal is furnish all the information you need to efficiently and effectively use the HECC resources needed for your NASA computational projects.

We welcome your input on features and topics that you would like to see included on this website.

Please send us email with your wish list and other feedback.