|
|||||||||||||||||||||||||
1. Managing Terminals and Modems (Overview) 2. Setting Up Terminals and Modems (Tasks) 3. Managing Serial Ports With the Service Access Facility (Tasks) 4. Managing System Resources (Overview) 5. Displaying and Changing System Information (Tasks) 8. Scheduling System Tasks (Tasks) 9. Managing System Accounting (Tasks) 10. System Accounting (Reference) 11. Managing System Performance (Overview) 12. Managing System Processes (Tasks) 13. Monitoring System Performance (Tasks) 14. Troubleshooting Software Problems (Overview) 16. Managing Core Files (Tasks) 17. Managing System Crash Information (Tasks) 18. Troubleshooting Miscellaneous Software Problems (Tasks) 19. Troubleshooting File Access Problems (Tasks) 20. Resolving UFS File System Inconsistencies (Tasks) |
runacct ScriptThe main daily accounting script, runacct, is normally invoked by the cron command outside of normal business hours. The runacct script processes connect, fee, disk, and process accounting files. This script also prepares daily and cumulative summary files for use by the prdaily and monacct scripts for billing purposes. The runacct script takes care not to damage files if errors occur. A series of protection mechanisms that are used to perform the following tasks:
This script records its progress by writing descriptive messages to the active file. Files used by the runacct script are assumed to be in the /var/adm/acct/nite directory, unless otherwise noted. All diagnostic output during the execution of the runacct script is written to the fd2log file. When the runacct script is invoked, it creates the lock and lock1 files. These files are used to prevent simultaneous execution of the runacct script. The runacct program prints an error message if these files exist when it is invoked. The lastdate file contains the month and day the runacct script was last invoked, and is used to prevent more than one execution per day. If the runacct script detects an error, the following occurs:
For instructions on how to restart the runacct script, see How to Restart the runacct Script. To allow the runacct script to be restarted, processing is broken down into separate re-entrant states. The statefile file is used to track the last state completed. When each state is completed, the statefile file is updated to reflect the next state. After processing for the state is complete, the statefile file is read and the next state is processed. When the runacct script reaches the CLEANUP state, it removes the locks and ends. States are executed as shown in the following table. Table 10-1 States of the runacct Script
Caution - When restarting the runacct script in the CLEANUP state, remove the last ptacct file because this file will not be complete. |
||||||||||||||||||||||||
|