runacct takes care not to damage active accounting files or summary files in the event of errors. It records its progress by writing descriptive diagnostic messages into active. When an error is detected, a message is written to /dev/console, mail (see mail.1 is sent to root and adm, and runacct terminates. runacct uses a series of lock files to protect against re-invocation. The files lock and lock1 are used to prevent simultaneous invocation, and lastdate is used to prevent more than one invocation per day.
runacct breaks its processing into separate, restartable states using statefile to remember the last state completed. It accomplishes this by writing the state name into statefile. runacct then looks in statefile to see what it has done and to determine what to process next. states are executed in the following order:
To restart runacct after a failure, first check the active file for diagnostics, then fix any corrupted data files, such as pacct or wtmp. The lock, lock1, and lastdate files must be removed before runacct can be restarted. The argument mmdd is necessary if runacct is being restarted. mmdd specifies the month and day for which runacct will rerun the accounting. The entry point for processing is based on the contents of statefile; to override this, include the desired state on the command line to designate where processing should begin.
To restart runacct:
To restart runacct at a specific state:
If runacct failed in the PROCESS state, remove the last ptacct file because it will not be complete.
The runacct command can process a maximum of
6000 distinct sessions 1000 distinct terminal lines 2000 distinct login names
during a single invocation of the command. If at some point the actual number of any one of these items exceeds the maximum, the command will not succeed.
Created by unroff & hp-tools. © by Hans-Peter Bischof. All Rights Reserved (1997).
Last modified 21/April/97