Using pbs_snapshot

Here is the PBS Professional 18.2 man page for pbs_snapshot:

pbs_snapshot(8B)               PBS Professional               pbs_snapshot(8B)



NAME
       pbs_snapshot - Linux only.  Capture PBS data to be used for diagnostics

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

DESCRIPTION
       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.

       Required Privilege
       To run pbs_snapshot , you must be root on Linux or Admin on Windows.


OPTIONS
       -H <server host>
            Specifies server hostname.   By  default,  pbs_snapshot  uses  the
            value  of the PBS_SERVER parameter in pbs.conf.  When you use this
            option, pbs_snapshot uses server host instead.


       -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


       --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  non-server hosts.  pbs_snapshot always gathers data from
            the server host.
            The command collects the following information from the  specified
            hosts:
               MoM and comm logs, for the number of days of logs being
               captured, specified via the --daemon-logs=<number of days>
               option
               The PBS_HOME/mom_priv directory
               System information
            Format  for hostname list is a comma-separated list of one or more
            hostnames:
            <hostname>[, <hostname> ...]
            This option can greatly bloat the size of the snapshot, and  cause
            pbs_snapshot to take a long time copying what may be large amounts
            of data over the network.


       --daemon-logs=<number of days>
            Specifies number of days of daemon  logs  to  be  collected;  this
            count  includes  the current day.  All daemon logs are captured on
            the server host, and if you  specify  --additional-hosts=<hostname
            list>, MoM logs are captured on those hosts as well.
            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


       --map=<file path>
            Specifies  path  for  file  containing obfuscation map, which is a
            <key>:<value> pair-mapping of obfuscated data.  Path can be  abso-
            lute 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  direc-
            tory 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 returns its PBS version information and
            exits.  This option can only be used alone.


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
       Output Location
       You  must  use  the  -o  <output  directory path> option to specify the
       directory where pbs_snapshot writes its output.  The path can be  abso-
       lute  or  relative  to current working directory.  The output directory
       must already  exist.   As  an  example,  if  you  specify  "-o  /temp",
       pbs_snapshot writes "/temp/snapshot_<timestamp>.tgz".

       Output Contents
       The  pbs_snapshot  command writes its output as a tarball.  The tarball
       contains the following directory structure and files:

       Directory  Directory
       or File    Contents             Description
       ------------------------------------------------------------------------
       server/
                  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
                                       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/
                  qstat.out            Output of qstat
                  qstat_f.out          Output of qstat -f
                  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/
                  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 -aFdsv
                  pbsnodes_avFdsv.out  Output of pbsnodes -avFdsv
                  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
                                       specified 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/
                  pbs_rstat_f.out      Output of pbs_rstat -f

                  pbs_rstat.out        Output of pbs_rstat

       scheduler/
                  qmgr_lsched.out      Output of qmgr list sched

       hook/
                  qmgr_ph_default.out  Output of qmgr print hook @default

                  qmgr_lpbshook.out    Output of qmgr list pbshook

       datastore/
                  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_          Files containing the output of thread
                  <multisched name>/   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/
                  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



Examples
       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".




Local                            26 April 2018                pbs_snapshot(8B)