Several environment variables are provided to PBS jobs. Some are taken from the user's environment and carried with a job, and others are created by PBS. There are also some environment variables that you can explicitly create for exclusive use by PBS jobs.
All PBS-provided environment variable names start with the characters "PBS_". Some start with "PBS_O_", which indicates that the variable is taken from the job's originating environment (that is, the user's environment).
A few useful PBS environment variables are described in the following list:
- PBS_O_WORKDIR
- Contains the name of the directory from which the user submitted the PBS job
- PBS_O_PATH
- Value of PATH from submission environment
- PBS_JOBID
- Contains the PBS job identifier
- PBS_JOBDIR
- Pathname of job-specific staging and execution directory
- PBS_NODEFILE
- Contains a list of vnodes assigned to the job
- TMPDIR
- The job-specific temporary directory for this job. Defaults to /tmp/pbs.job_id on the vnodes.