Day-to-DayOperation
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 requirementsin this respect. A simple
example script to producea 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 havebeen 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 nightlywith a cron job, as shownin the
following example.
0 0 * * * /usr/opt/rms/examples/accounting_summary
9.4.4 Archiving Data
Tokeep the databaseto a reasonable size,old entries should be removed on aregular
basis as described in Section 9.4.5. Before clearing old entries from the database,
archive anydata you want to preserve. Generally, this is data from the followingtables:
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