PBS Accounting

The PBS system produces lots of logfile entries. There are two types of log files: the event log which record events from each PBS daemon and accounting log.

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:

date_time;record_type;id_string;message_text

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:

It has been tested on linux cluster.

Install:

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

Install and Configuration:

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

Samples Reports