Performs disk-usage accounting.
/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.
|-p File||Searches the specified file for login names and numbers, instead of searching the /etc/passwd file.|
|-u File||Places, in the specified file, records of the file names that are exempt from charges.|
Access Control: These commands should grant execute (x) access only to members of the adm group.
0 2 * * 4 /usr/sbin/acct/dodiskIn 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 -oIn 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.
|/usr/sbin/acct/acctdisk||Contains the acctdisk command.|
|/usr/sbin/acct/acctdusg||Containsthe acctdusg command.|
|/etc/passwd||Contains the basic attributes of user.|
|/usr/sbin/acct||Directory holding all accounting commands.|
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 Version 4.3 System Management Guide: 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 Version 4.3 System Management Guide: Operating System and Devices describes the steps you must take to establish an accounting system.