Generates disk accounting data by user ID.
diskusg [ -U MaxUsers ] [ -i FileListName ] [ -p File ] [ -u File ] [ -v ] { -s [ File ... ] | FileSystem ... }
The diskusg command
generates intermediate disk-accounting information from data in the files
specified with the File or FileSystem parameters or from
standard input. The diskusg command writes one record per
user to standard output. This command is called by the
dodisk command, which can be run under the cron
daemon. The output is in the following format:
UID | Contains the numerical user ID of the user. |
Login | Contains the login name of the user. |
Blocks | Contains the total number of 512-byte disk blocks allocated to the user. |
The output of this command becomes the input of the acctdisk command, which converts the information to a total accounting record. The total accounting record is merged with other total accounting records to produce the daily report.
If you specify the FileSystem parameter, the diskusg command reads the i-nodes of the specified file systems to generate the usage data. The FileSystem parameters must be the special file names of the file system devices. For example, use the /dev/hd4 device instead of / (root) directory to generate usage data for the root file system.
If you specify the File parameter, the input must be in a diskusg output format.
For more information on disk usage, see the acctdusg command.
Note: This command is for local devices only.
Access Control: This command should grant execute (x) access only to members of the adm group.
To generate daily disk-accounting information, add a line similar to the following to the /var/spool/cron/crontab/root file:
0 2 * * 4 /usr/sbin/acct/dodisk
This command tells the cron daemon to run the dodisk command at 2 a.m. (02) each Thursday (4). The dodisk command calls both the diskusg and acctdisk commands.
Note: To perform this example, you must have root authority.
/usr/sbin/acct/diskusg | Contains the diskusg command. |
/etc/passwd | Contains the basic attributes of users. |
The acctdisk command, acctmerg command, dodisk command, runacct command.
The acct subroutine.
The acct file format and utmp file format.
Accounting Commands, Accounting Overview, Setting Up an Accounting System in AIX 5L Version 5.1 System Management Guide: Operating System and Devices