[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Commands Reference, Volume 3

monacct Command

Purpose

Performs monthly or periodic accounting.

Syntax

/usr/sbin/acct/monacct Number ]

Description

The monacct command performs monthly or periodic accounting. The intervals are set in the crontab file. You can set the cron daemon to run the monacct command once each month or at some other specified time period. The monacct example shows how to set up this command for use with the cron daemon. See the crontab command for more information about setting up cron files.

The Number parameter indicates which month or other accounting period to process. The default value of the Number parameter is the current month. The monacct command creates summary files in the /var/adm/acct/fiscal file and restarts summary files in the /var/adm/acct/sum file, the cumulative summary to which daily reports are appended.

Note: You should not share accounting files among nodes in a distributed environment. Each node should have its own copy of the various accounting files.

Security

Access Control: This command should grant execute (x) access only to members of the administrative group.

Example

To produce automatically a monthly accounting report, add the following to the /var/spool/cron/crontabs/root file:

15 5 1 * * /usr/sbin/acct/monacct 

This example shows the instructions that the cron daemon will read and act upon. The monacct command will run at 5:15 (15 5 ) the first day of each month (1 ). This command is only one of the accounting instructions normally given to the cron daemon. See "Setting Up an Accounting System" in AIX Version 4.3 System Management Guide: Operating System and Devices for more information on typical cron accounting entries.

Files

/usr/sbin/acct Contains the accounting commands.
/var/adm/acct/fiscal Contains accounting data files.
/var/adm/acct/sum Cumulative daily accounting records.
/var/spool/cron/crontabs Contains the commands to be run by the cron daemon at regularly scheduled intervals.

Related Information

The acctcms command, prtacct command, acctmerg command, crontab command.

The cron daemon.

For more information about the Accounting System, the preparation of daily and monthly reports, and the accounting files, see the Accounting Overview in AIX Version 4.3 System Management Guide: Operating System and Devices.

Setting Up an Accounting System in AIX Version 4.3 System Management Guide: Operating System and Devices explains the steps you must take to establish an accounting system.


[ Previous | Next | Contents | Glossary | Home | Search ]