Day-to-Day Operation
9.4.3 Summarizing Accounting Data
Accounting records accumulate in the RMS database as each job is run. By default, they
are not processed as each site has its own requirements in this respect. A simple
example script to produce a summary of resource usage is included in the release in
/usr/opt/rms/examples/scripts/accounting_summary. See
Appendix E (Accounting Summary Script) for a listing. The script produces the following
output.
Accounting Summary of Machine atlas at 16:01 Wed 21 Feb 2001
Usage by Project/User For Previous Day
Project User CPU User Sys Number
Name Name Secs Secs Secs Sessions
-------------------------------------------------------------------------
default addy 596 533 6 8
duncan 58 37 2 6
johnt 540 227 51 15
root 29272 2 8 37
stephen 286 87 134 56
-------------------------------------------------------------------------
Total default 30751 885 201 122
-------------------------------------------------------------------------
Grand Total 30751 885 201 122
-------------------------------------------------------------------------
When the accounts have been processed, the script can optionally delete the accounting
records for resource requests that have completed.
This script (or one based on it) can be run nightly with a cron job, as shown in the
following example.
0 0 * * * /usr/opt/rms/examples/accounting_summary
9.4.4 Archiving Data
To keep the database to a reasonable size, old entries should be removed on a regular
basis as described in Section 9.4.5. Before clearing old entries from the database,
archive any data you want to preserve. Generally, this is data from the following tables:
resources Descriptions of each request to allocate resources
jobs Descriptions of each job
node_stats Utilization statistics for each node
acctstats Accounting statistics logged by RMS
9-6 Setting up RMS