pbs_snapshot(8B)

πŸ“¦ version 23.06.06-unstable-2026-04, in nixos 26.05, nixpkgs unstable

πŸ’… pbs_snapshot(8B) β€” PBS Professional πŸ’…

✨ NAME ✨

pbs_snapshot β€” Linux only. Capture PBS data to be used for diagnostics. πŸŽ€


🌸 SYNOPSIS 🌸

pbs_snapshot -h, --help
pbs_snapshot -o <output directory path>
            [--accounting-logs=<number of days>]
            [--additional-hosts=<hostname list>] [--basic]
            [--daemon-logs=<number of days>] [-H <server host>]
            [-l <log level>] [--map=<file path>] [--obfuscate]
            [--with-sudo]
pbs_snapshot --version

πŸ’– DESCRIPTION πŸ’–

okay so bestie, you use pbs_snapshot to capture PBS data for diagnostics. This tool is written in Python and uses PTL libraries, including PBSSnapUtils, to extract the data. You can optionally anonymize the PBS data. The pbs_snapshot command captures data from all multischeds. The command detects which daemon or daemons are running on the host where it is collecting information, and captures daemon and system data accordingly. If no PBS daemons are running, the command collects system information. The output tarball contains information about the host specified via the -H option, or if that is not specified, the local host. If you specify additional hosts, the command creates a tarball for each additional host and includes it as a sub-tarball in the output. πŸ¦‹

If you want to capture only PBS configuration information, use the --basic option. πŸ’…

πŸ‘‘ Required Privilege πŸ‘‘

The pbs_snapshot command allows you to use the sudo infrastructure provided by the PTL framework to capture root-owned information via --with-sudo. All other information is collected as a normal user. If you need to run pbs_snapshot as a non-privileged user, and without using the PTL --with-sudo infrastructure, you must be root if you want root-owned information to be collected. 🫢

🚫 Restrictions 🚫

The pbs_snapshot command is not available on Windows. no cap.


πŸŽ€ OPTIONS πŸŽ€

  • --accounting-logs=<number of days> β€” Specifies number of days of accounting logs to be collected; this count includes the current day. Value of number of days must be >=0:
    • If number of days is 0, no logs are captured.
    • If number of days is 1, only the logs for the current day are captured.
    • Default: pbs_snapshot collects 30 days of accounting logs. πŸ’–
  • --additional-hosts=<hostname list> β€” Specifies that pbs_snapshot should gather data from the specified list of additional hosts. Launches the pbs_snapshot command on each specified host, creates a tarball there named <hostname>_snapshot.tgz, and includes it as a sub-tarball in the output for the main output. If you use the --with-sudo option, each launched copy uses that option as well. πŸ¦‹

The command does not query the server when it runs at a non-server host.

The command collects a full snapshot, including the following information:

  • Daemon logs, for the number of days of logs being captured, specified via the --daemon-logs=<number of days> option
  • The PBS_HOME/<daemon>_priv directory
  • Accounting logs if server daemon runs on host
  • System information

Format for hostname list is a comma-separated list of one or more hostnames:

<hostname>[, <hostname> ...]

  • --basic β€” Captures PBS configuration information only. Captures the following: πŸŽ€
    • server/qstat_Bf.out β€” Output of qstat -Bf
    • server/qstat_Qf.out β€” Output of qstat -Qf
    • scheduler/qmgr_lsched.out β€” Output of qmgr -c 'list sched'
    • node/pbsnodes_va.out β€” Output of pbsnodes -va
    • reservation/pbs_rstat_f.out β€” Output of pbs_rstat -f
    • job/qstat_f.out β€” Output of qstat -f
    • hook/qmgr_lpbshook.out β€” Output of qmgr -c 'list pbshook'
    • sched_priv/ for each scheduler instance β€” Copy of each scheduler's sched_priv directory
    • server_priv/resourcedef β€” Copy of server_priv/resourcedef file
    • pbs.conf β€” Copy of /etc/pbs.conf on server host
    • pbs_snapshot.log β€” Log of pbs_snapshot execution
    • ctime β€” Timestamp of when the snapshot was taken

Can be combined with other options such as --accounting-logs and --daemon-logs in order to capture additional information. ✨

  • --daemon-logs=<number of days> β€” Specifies number of days of daemon logs to be collected; this count includes the current day. Value of number of days must be >=0:
    • If number of days is 0, no logs are captured.
    • If number of days is 1, only the logs for the current day are captured.
    • Default: pbs_snapshot collects 5 days of daemon logs. πŸ’œ
  • -h, --help β€” Prints usage and exits.
  • -H <hostname> β€” Specifies hostname for host whose retrieved data is to be at the top level in the output tarball. If not specified, pbs_snapshot puts data for the local host at the top level in the output tarball. 🌈
  • -l <log level> β€” Specifies level at which pbs_snapshot writes its log. The log file is pbs_snapshot.log, in the output directory path specified using the -o <output directory path> option.

Valid values, from most comprehensive to least: DEBUG2, DEBUG, INFOCLI2, INFOCLI, INFO, WARNING, ERROR, FATAL

Default: INFOCLI2

  • --map=<file path> β€” Specifies path for file containing obfuscation map, which is a <key>:<value> pair-mapping of obfuscated data. Path can be absolute or relative to current working directory.

Default: pbs_snapshot writes its obfuscation map in a file called obfuscate.map in the location specified via the -o <output directory path> option.

Can only be used with the --obfuscate option. πŸ’…

  • --obfuscate β€” Obfuscates (anonymizes) or deletes sensitive PBS data captured by pbs_snapshot.

Obfuscates the following data:

  • euser, egroup, project, Account_Name, operators, managers, group_list, Mail_Users, User_List, server_host, acl_groups, acl_users, acl_resv_groups, acl_resv_users, sched_host, acl_resv_hosts, acl_hosts, Job_Owner, exec_host, Host, Mom, resources_available.host, resources_available.vnode

Deletes the following data:

  • Variable_List, Error_Path, Output_Path, mail_from, Mail_Points, Job_Name, jobdir, Submit_arguments, Shell_Path_List 😭
  • --version β€” The pbs_snapshot command prints its PBS version information and exits. Can only be used alone. ⭐
  • --with-sudo β€” Uses the PTL sudo infrastructure in order capture root-owned information via sudo. (Information not owned by root is captured using normal privilege, not root privilege.) With this option, you do not need to prefix your pbs_snapshot command with sudo, and you do not need root privilege. 🫢

πŸ¦‹ Arguments to pbs_snapshot πŸ¦‹

  • -o <output directory path> β€” Path to directory where pbs_snapshot writes its output tarball. Required. Path can be absolute or relative to current working directory.

For example, if you specify -o /temp, pbs_snapshot writes /temp/snapshot_<timestamp>.tgz.

The output directory path must already exist. πŸ’–

πŸ’Ύ OUTPUT πŸ’Ύ

okay bestie, here's where all the snapshot tea gets poured out β˜•βœ¨

πŸ“‚ Output Location πŸ“‚

You must use the -o <output directory path> option to tell pbs_snapshot where to write its output. The path can be absolute or relative to the current working directory. The output directory has to already exist β€” it will not create it for you, ngl.

🚨 fr fr: pbs_snapshot needs that directory to be there already. No magical mkdir moment.

For example, if you specify -o /temp, then pbs_snapshot writes /temp/snapshot_<timestamp>.tgz.

πŸ“¦ Output Contents πŸ“¦

The pbs_snapshot command writes the output for the local host and each specified remote host as a tarball. Tarballs for remote hosts are included in the main tarball. 🫢

The command captures JSON output from qstat-f -F json and pbsnodes -av -F json.

The main tarball contains this whole little ecosystem of directories, files, and tarballs:

  • server/ β€” server-side output vibes πŸ‘‘
    • qstat_B.out β€” Output of qstat -B
    • qstat_Bf.out β€” Output of qstat -Bf
    • qmgr_ps.out β€” Output of qmgr print server
    • qstat_Q.out β€” Output of qstat -Q
    • qstat_Qf.out β€” Output of qstat -Qf
    • qmgr_pr.out β€” Output of qmgr print resource
  • server_priv/ β€” Copy of the PBS_HOME/server_priv directory. Core files are captured separately; see core_file_bt/.
    • accounting/ β€” Accounting logs from the PBS_HOME/server_priv/accounting/ directory for the number of days specified via --accounting-logs option
  • server_logs/ β€” Server logs from the PBS_HOME/server_logs directory for the number of days specified via --daemon-logs option
  • job/ β€” all the job moments πŸ’…
    • qstat.out β€” Output of qstat
    • qstat_f.out β€” Output of qstat -f
    • qstat_f_F_json.out β€” Output of qstat -f -F json
    • qstat_t.out β€” Output of qstat -t
    • qstat_tf.out β€” Output of qstat -tf
    • qstat_x.out β€” Output of qstat -x
    • qstat_xf.out β€” Output of qstat -xf
    • qstat_ns.out β€” Output of qstat -ns
    • qstat_fx_F_dsv.out β€” Output of qstat -fx -F dsv
    • qstat_f_F_dsv.out β€” Output of qstat -f -F dsv
  • node/ β€” node info, iconic 🌈
    • pbsnodes_va.out β€” Output of pbsnodes -va
    • pbsnodes_a.out β€” Output of pbsnodes -a
    • pbsnodes_avSj.out β€” Output of pbsnodes -avSj
    • pbsnodes_aSj.out β€” Output of pbsnodes -aSj
    • pbsnodes_avS.out β€” Output of pbsnodes -avS
    • pbsnodes_aS.out β€” Output of pbsnodes -aS
    • pbsnodes_aFdsv.out β€” Output of pbsnodes -aF dsv
    • pbsnodes_avFdsv.out β€” Output of pbsnodes -avF dsv
    • pbsnodes_avFjson.out β€” Output of pbsnodes -avF json
    • qmgr_pn_default.out β€” Output of qmgr print node @default
  • mom_priv/ β€” Copy of the PBS_HOME/mom_priv directory. Core files are captured separately; see core_file_bt/.
  • mom_logs/ β€” MoM logs from the PBS_HOME/mom_logs directory for the number of days via --daemon-logs option
  • comm_logs/ β€” Comm logs from the PBS_HOME/comm_logs directory for the number of days specified via --daemon-logs option
  • sched_priv/ β€” Copy of the PBS_HOME/sched_priv directory, with all files. Core files are not captured; see core_file_bt/.
  • sched_logs/ β€” Scheduler logs from the PBS_HOME/sched_logs directory for the number of days specified via --daemon-logs option
  • sched_priv_<multisched name>/ β€” Copy of the PBS_HOME/sched_priv_<multisched_name> directory, with all files. Core files are not captured; see core_file_bt/.
  • sched_logs_<multisched name>/ β€” Scheduler logs from the PBS_HOME/sched_logs_<multisched_name> directory for the number of days specified via --daemon-logs option
  • reservation/ β€” reservation receipts πŸŽ€
    • pbs_rstat_f.out β€” Output of pbs_rstat -f
    • pbs_rstat.out β€” Output of pbs_rstat
  • scheduler/ β€” scheduler output
    • qmgr_lsched.out β€” Output of qmgr list sched
  • hook/ β€” hook output
    • qmgr_ph_default.out β€” Output of qmgr print hook @default
    • qmgr_lpbshook.out β€” Output of qmgr list pbshook
  • datastore/ β€” datastore things
    • pg_log/ β€” Copy of the PBS_HOME/datastore/pg_log directory for the number of days specified via --daemon-logs option
  • core_file_bt/ β€” Stack backtrace from core files
    • sched_priv/ β€” Files containing the output of thread apply all backtrace full on all core files captured from PBS_HOME/sched_priv
    • sched_priv_<multisched name>/ β€” Files containing the output of thread apply all backtrace full on all core files captured from PBS_HOME/sched_priv
    • server_priv/ β€” Files containing the output of thread apply all backtrace full on all core files captured from PBS_HOME/server_priv
    • mom_priv/ β€” Files containing the output of thread apply all backtrace full on all core files captured from PBS_HOME/mom_priv
    • misc/ β€” Files containing the output of thread apply all backtrace full on any other core files found inside PBS_HOME
  • system/ β€” system-y evidence 🧚
    • pbs_probe_v.out β€” Output of pbs_probe -v
    • pbs_hostn_v.out β€” Output of pbs_hostn -v $(hostname)
    • pbs_environment β€” Copy of PBS_HOME/pbs_environment file
    • os_info β€” Information about the OS
    • process_info β€” List of processes running on the system when the snapshot was taken. Output of ps -aux | grep [p]bs on Linux systems, or tasklist /v on Windows systems
    • ps_leaf.out β€” Output of ps -leaf. Linux only.
    • lsof_pbs.out β€” Output of lsof | grep [p]bs. Linux only.
    • etc_hosts β€” Copy of /etc/hosts file. Linux only.
    • etc_nsswitch_conf β€” Copy of /etc/nsswitch.conf file. Linux only.
    • vmstat.out β€” Output of the command vmstat. Linux only.
    • df_h.out β€” Output of the command df -h. Linux only.
    • dmesg.out β€” Output of the dmesg command. Linux only.
  • pbs.conf β€” Copy of the pbs.conf file on the server host
  • ctime β€” Contains the time in seconds since epoch when the snapshot was taken
  • pbs_snapshot.log β€” Log messages written by pbs_snapshot
  • <remote hostname>.tgz β€” Tarball of output from running the pbs_snapshot command at a remote host

✨ EXAMPLES ✨

okay, example time, bestie πŸ˜­πŸ’–

pbs_snapshot -o /tmp

Writes a snapshot to /temp/snapshot_<timestamp>.tgz that includes 30 days of accounting logs and 5 days of daemon logs from the server host.

pbs_snapshot --daemon-logs=1 --accounting-logs=1 -o /tmp --obfuscate --map=mapfile.txt

Writes a snapshot to /temp/snapshot_<timestamp>.tgz that includes 1 day of accounting and daemon logs. Obfuscates the data and stores the data mapping in the map file named "mapfile.txt".


that's literally the whole page, bestie πŸ’– source/version: Local β€’ date: 20 September 2019 β€’ page: pbs_snapshot(8B) β€” go snapshot and slay βœ¨πŸŽ€

πŸ“¦ where this page comes from