How to use pbs_snapshot

Pbs_snapshot is a valuable tool for gathering PBS data for diagnostics on your PBS complex. It gathers configuration information, logs, hooks, reservation information, and system information. The information is gathered into a tar file which can easily be sent to support. Engineers can use the information to run a simulation of your system.


Usage: pbs_snapshot -o <path to existing output directory> [OPTION]

    -H <hostname>       Defaults to local host

    -l <loglevel>             set log level to one of INFO, INFOCLI, INFOCLI2, DEBUG, DEBUG2, WARNING, ERROR or FATAL

    -h, --help                  display this usage message

    --basic                      Capture only basic config & state data

    --daemon-logs=<num days>           number of daemon logs to collect

    --accounting-logs=<num days>       number of accounting logs to collect

    --additional-hosts=<hostname>.      collect data from additional hosts 'hostname' is a comma separated list

    --map=<file>            file to store the map of obfuscated data

    --obfuscate              obfuscates sensitive data

    --with-sudo              Uses sudo to capture privileged data

    --version                  print version number and exit



                1. # pbs_snapshot -o /tmp                

                2. # pbs_snapshot --daemon-logs=1 -o /tmp        

                3. # pbs_snapshot --daemon-logs=30 --accounting-logs=0 -o /tmp       

                4. # pbs_snapshot --obfuscate -o /tmp

                5. # pbs_snapshot --obfuscate --map /tmp/map2 -o /tmp


Please attach the output file (in the form of .tgz) to your Support ticket.


The following section provides more detail for the pbs_snapshot options.

  1. Logs

Pbs_snapshot gathers logs by default. You can specify the number of days of logs to collect:

            --accounting-logs=<number of days> – default is 30 days

            --daemon-logs=<number of days> – default is 5 days

See example 2 and 3 above.


        2. Anonymizing data

Sensitive data can be protected using the –obfuscate option. Some data is anonymized including user, group, host names, acl information, etc. Other data is deleted including path names, arguments etc.

See example 4 and 5 above.


This command is only available for Linux systems.

You must have proper access to the information that you are trying to collect. If you are not running the command as root, pbs_snapshot will use your system’s sudo infrastructure to capture root-owned information if you use the --with-sudo option. If you run pbs_snapshot as a non-privileged user and without the –with-sudo option, you will be required to enter your password.


You must specify a directory into which the tar file will be placed using the -o option. The path may be either relative to the current working directory, or an absolute path.


Please refer to the pbs_snapshot(8B) man page for more information.