Performs disk-usage accounting.
/usr/sbin/acct/acctdisk
/usr/sbin/acct/acctdusg [ -u File ] [ -p File ]
The acctdisk and acctdusg commands are called by the dodisk command to perform disk-usage accounting. Usually, this procedure is initiated when the cron daemon runs the dodisk command.
Normally, the output of the diskusg command becomes the input of the acctdisk command. If a more thorough but slower version of disk accounting is needed, use the dodisk -o command to call the acctdusg command instead of the diskusg command.
Accounting is only done for files on the local file system for local users. System administrators who want to count remote users (such as YP clients or diskless clients) should use the acctdusg -p command.
The acctdisk command reads the output lines of the diskusg or acctdusg commands from standard input, converts each individual record into a total accounting record, and writes the records to standard output. These records are merged with other accounting records by the acctmerg command to produce the daily accounting report.
The acctdusg command is called by using the dodisk -o command, when a slow and thorough version of disk accounting is needed. Otherwise, the dodisk command calls the diskusg command.
The acctdusg command reads a list of files from standard input (usually piped from a find / -print command), computes the number of disk blocks (including indirect blocks) allocated to each file owner, and writes an individual record for each user to standard output. By default, the command searches for login names and numbers in the /etc/passwd file. You can search other files by specifying the -p File flag and variable. Each output record has the following form:
uid login #blocks
The #blocks value is the number of 1KB blocks utilized by the user.
Access Control: These commands should grant execute (x) access only to members of the adm group.
0 2 * * 4 /usr/sbin/acct/dodisk
In this example, the dodisk procedure runs at 2 a.m. (0 2) every Thursday (4) and the dodisk procedure calls the diskusg and acctdisk commands to write disk usage records to the /usr/adm/acct/nite/dacct file.
0 2 * * 4 /usr/sbin/acct/dodisk -o
In this example, the dodisk procedure runs at 2 a.m. (0 2) every Thursday (4) and the dodisk procedure calls the acctdusg and acctdisk commands to write disk usage records to the /var/adm/acct/nite/dacct file.
The acctmerg command, diskusg command, dodisk command, runacct command.
The cron daemon.
The acct file format, utmp, wtmp, failedlogin file format.
The acct subroutine.
Accounting Overview in AIX 5L Version 5.1 System Management Concepts: Operating System and Devices provides more information about the accounting system, the preparation of daily and monthly reports, and the accounting files.
Setting Up an Accounting System in AIX 5L Version 5.1 System Management Guide: Operating System and Devices describes the steps you must take to establish an accounting system.