DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Using system accounting

How the runacct Program Works

The main daily accounting shell procedure, runacct, is normally invoked by cron during nonprime time hours. The runacct shell script processes connect, fee, disk, and process accounting files. It also prepares daily and cumulative summary files for use by prdaily and monacct for billing purposes.

The runacct shell script takes care not to damage files if errors occur. A series of protection mechanisms attempt to recognize an error, provide intelligent diagnostics, and end processing in such a way that runacct can be restarted with minimal intervention. It records its progress by writing descriptive messages into the file active. (Files used by runacct are assumed to be in the /var/adm/acct/nite directory unless otherwise noted.) All diagnostic output during the execution of runacct is written into fd2log.

If the files lock and lock1 exist when runacct is invoked, an error message is displayed. These files prevent simultaneous execution of runacct. The lastdate file contains the month and day runacct was last invoked and prevents more than one execution per day. If runacct detects an error, a message is written to the console, mail is sent to root and adm, locks are removed, diagnostic files are saved, and execution is ended.


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 22 April 2004