The PBS server daemon maintains an accounting log. The accounting log files are placed normally in /var/spool/PBS/server_priv/accounting directory, but it depends of your installation.
The log name defaults are yyyymmdd where the file name is the date.
The PBS accounting file is a text file with each entry terminated by a new line. The format of an entry is:
For more information about log format, please consult your manual.
Written two programs for making a PBS reports:
pbs_accounting(old) and pacct.
Pbs_accounting:
These log files contain all information about your jobs, like: owner, name, group, job name, queue, CPU time, wall time, etc. But for make a report you don’t need all lines, only about the resources used, like: number of cpus, walltime, etc.
The program consists in two files:
PBS_HOME | where PBS was installed |
PBS_ACCT_DIR | directory where PBS create log files |
PBS_ACCT_OUT | directory where pbs_accounting put the report |
*** Portable Batch System accounting statistics *** Server Name: your.machine.edu *** PBS Per-User Usage Report *** User Group #Jobs Wall-Hours Nodes-Hours __________________________________________________________ bino nacad 6 0.0372 0.0692 dany extern 1 0.0153 0.0306 john acct 1 0.0006 0.0011 test intern 1 0.0150 0.0300 test2 intern 1 1.3361 4.0083 *** PBS Per-Group Usage Report *** Group #Jobs Wall-Hours Nodes-Hours _______________________________________________ acct 1 0.0006 0.0011 extern 1 0.0153 0.0306 intern 2 1.3511 4.0383 nacad 6 0.0372 0.0692
Where:
Wall-hours : walltime
Nodes-Hours: walltime * ncpus
pacct
It has been tested on linux cluster and SGI Altix.
PROGRAM_PATH | directory where the program will be installed (directory default: /usr/local/sbin) |
OPTIONS | pacct options that show in item options or writing "pacct -h" |
PBS_ACCT_DIR | directory where the PBS write log files |
OUTPUT | directory where storing the reports |
Options
Sinopse: pacct [-a][-u][-g][-b value][-n opt][-c][-s][-h][file(s)]
-a | report per-user and per-group usage |
-u | report per-user usage |
-g | report per-group usage |
-b value | cost per hour (working with -n options) |
-n opt | select how the cost is calculate, opt=[0..3] 0: value * cputime 1: value * walltime (default) 2: value * cputime * ncpus per jobs 3: value * walltime * ncpus per jobs The options 2 and 3 help to accounting in a cluster. |
-c | include information about cputime, if your operations system support |
-s | include statistics information |
-h | help |
# cat * | ./pacct -a *** Portable Batch System accounting *** Server Name: your.domain.edu.br *** PBS Per-User Usage Report *** User Group #Jobs Wall(h) Sum Wall(h) bino nacad 91 33.7547 154.5286 test nacad 1 0.0011 0.0044 *** PBS Per-Group Usage Report *** Group #Jobs Wall(h) Sum Wall(h) nacad 92 33.7558 154.5331
# cat * | ./pacct -a -b 10.00 *** Portable Batch System accounting *** Server Name: your.domain.edu.br *** PBS Per-User Usage Report *** User Group #Jobs Wall(h) Sum Wall(h) SBU bino nacad 91 33.7547 154.5286 337.55 cschaer nacad 1 0.0011 0.0044 0.01 *** PBS Per-Group Usage Report *** Group #Jobs Wall(h) Sum Wall(h) SBU nacad 92 33.7558 154.5331 337.56
# cat * | ./pacct -a -b 10.00 -n 3 *** Portable Batch System accounting *** Server Name: your.domain.edu.br *** PBS Per-User Usage Report *** User Group #Jobs Wall(h) Sum Wall(h) SBU bino nacad 91 33.7547 154.5286 1545.29 cschaer nacad 1 0.0011 0.0044 0.04 *** PBS Per-Group Usage Report *** Group #Jobs Wall(h) Sum Wall(h) SBU nacad 92 33.7558 154.5331 1545.33
# ./pacct -g -s 200302 *** Portable Batch System accounting *** Server Name: your.domain.edu.br *** PBS Per-Group Usage Report *** Group #Jobs Wall(h) Av.Wall(h) Av.#CPU Sum Wall(h) nacad 92 33.7558 0.3669 4.0 154.5331
# ./pactt -g -s -c 200302 *** Portable Batch System accounting *** Server Name: your.domain.edu.br *** PBS Per-Group Usage Report *** Group #Jobs Wall(h) CPU(h) Efcy(%) Av.Wall(h) Av.CPU(h) Av.#CPU Sum Wall(h) Sum CPU(h) nacad 92 33.7558 0.3419 1.01 0.3669 0.0037 4.0 154.5331 0.3419