Skip to content


The Portable Batch System (PBS) was written as a joint project between the Numerical Aerospace Simulation (NAS) Systems Division of NASA AMES Research Center and National Energy Research Supercomputer Center (NERSC) of Lawrence Livermore National Laboratory. It is a batch software processing system that provides a simple consistent mean of job submission to a flexible and configurable job scheduler. It is currently being employed across all of our HPC systems.

See the PBS Homepage for more details.

Although development (compiles, short runs, etc.) is allowed, there is a kernel limit of 15 CPU minutes on all interactive processes. Processes that exceed 15 minutes and are not submitted through the PBS system are subject to immediate termination without prior notification.

Batch Environment Variables

These are the environment variables set by PBS for a job run in October 2000 by user jhc.PBS_O_HOME=/home/chpc/jhc

PBS Batch Script Options

  • -adate_time. Declares the time after which the job is eligible for execution. The date_time element is in the form: [[[ CC YY]MM]DD]hhmm .S.
  • -epath. Defines the path to be used for the standard error stream of the batch job. The path is of the form: path_name.
  • -h. Specifies that a user hold will be applied to the job at submission time.
  • -I. Declares that the job is to be run "interactively". The job will be queued and scheduled as PBS batch job, but when executed the standard input, output, and error streams of the job will be connected through qsub to the terminal session in which qsub is running.
  • -jjoin. Declares if the standard error stream of the job will be merged with the standard ouput stream. The join argument is one of the following:
    • oe- Directs the two streams as standard output.
    • eo- Directs the two streams as standard error.
    • n- Any two streams will be separate_(Default)_.
  • -lresource_list. Defines the resources that are required by the job and establishes a limit on the amount of resources that can be consumed. Users will want to specify the walltime resource, and if they wish to run a parallel job, the ncpus resource.
  • -mmail_options. Conditions under which the server will send a mail message about the job. The options are:
    • n: No mail ever sent
    • a (default): When the job aborts
    • b: When the job begins
    • e: When the job ends
  • -Muser_list. Declares the list of e-mail addresses to whom mail is sent. If unspecified it defaults to userid@host from where the job was submitted. You will most likely want to set this option.
  • -Nname. Declares a name for the job.
  • -opath. Defines the path to be used for the standard output. path_name.
  • -qdestination. The destination is the queue.
  • -Spath_list. Declares the shell that interprets the job script. If not specified it will use the user's login shell.
  • -vvariable_list. Expands the list of environment variables which are exported to the job. The variable list is a comma-separated list of strings of the form variable or variable=value.
  • -V. Declares that all environment variables in the qsub command's environment are to be exported to the batch job.

PBS User Commands

For any of the commands listed below you may do a "man command" for syntax and detailed information.

Frequently used PBS user commands:

  • qsub. Submits a job to the PBS queuing system. Please see qsub Options below.
  • qdel. Deletes a PBS job from the queue.
  • qstat. Shows status of PBS batch jobs.
  • xpbs. X interface for PBS users.

Less Frequently-Used PBS User Commands:

  • qalter. Modifies the attributes of a job.
  • qhold. Requests that the PBS server place a hold on a job.
  • qmove. Removes a job from the queue in which it resides and places the job in another queue.
  • qmsg. Sends a message to a PBS batch job. To send a message to a job is to write a message string into one or more of the job's output files.
  • qorder. Exchanges the order of two PBS batch jobs within a queue.
  • qrerun. Reruns a PBS batch job.
  • qrls. Releases a hold on a PBS batch job.
  • qselect. Lists the job identifier of those jobs which meet certain selection criteria.
  • qsig. Requests that a signal be sent to the session leader of a batch job.
    Last Modified: October 06, 2008 @ 21:07:48
Last Updated: 7/5/23