/usr/lib/acct/runacct [mmdd [state]]
runacct is the main daily accounting shell procedure. It is normally initiated using cron. runacct processes connect, fee, disk, and process accounting files. It also prepares summary files for prdaily or billing purposes. runacct is distributed only to source code licensees.
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:
The following example starts runacct:
example% nohup runacct 2> /var/adm/acct/nite/fd2log &
Example 2 Restarting runacct
The following example restarts runacct:
example% nohup runacct 0601 2>> /var/adm/acct/nite/fd2log &
Example 3 Restarting runacct at a Specific State
The following example restarts runacct at a specific state:
example% nohup runacct 0601 MERGE 2>> /var/adm/acct/nite/fd2log &
It is not recommended to restart runacct in the SETUP state. Run SETUP manually and restart using:
runacct mmdd WTMPFIX
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
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.
Do not invoke runacct at the same time as ckpacct, as there may be a conflict if both scripts attempt to execute turnacct switch simultaneously.
|May 11, 1999||OmniOS|