Compaq SC RMS Server User Manual


 
Listing of the Script
-p Sort the records by project name and then by user name. This is the
default.
-M Show time in minutes rather than seconds.
-H Show time in hours rather than seconds.
days Show statistics for the specified number of days. By default, statistics
are shown for the previous day only.
The script processes the arguments passed to it on the command line and generates a
SQL query which it passes to rmsquery. The query acts on two tables in the RMS
database: the accounting statistics (acctstats) table, and the resources table. The
information returned by the query is formatted to produce output as shown in
Section E.3.
If the -d option is specified on the command line, after printing the accounting
summary, the script generates another SQL query to delete all accounting records that
have their running field set to 0, denoting that the resource request has completed.
If a query fails, the script outputs an error message.
E.3 Example Output
An example of using the script, together with the output produced, follows. After
running the script, all of the accounting records for resource requests that have finished
are deleted.
# accounting_summary -d
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
-------------------------------------------------------------------------
E-2 Accounting Summary Script