DISKUSG(8,C) AIX Commands Reference DISKUSG(8,C)
-------------------------------------------------------------------------------
diskusg
PURPOSE
Generates disk accounting data by userid.
SYNTAX
+---------------+ +- -p/etc/passwd -+
/usr/lib/acct/diskusg ---| +-----------+ |---| |--->
+-| -s |-+ +---- -pfile -----+
A| -ifnmlist ||
|+-----------+|
+-------------+
+-------------+ +--------+
>---| one of |---| |---|
| +---------+ | +- file -+
+-| -u file |-+ A |
| -v | +------+
+---------+
Warning: See restrictions, Chapter 18, AIX Programming Tools and Interfaces.
DESCRIPTION
The diskusg command generates intermediate disk accounting information from
data in files or from standard input, if you do not specify any files. The
diskusg command writes lines to standard output, one per user, in the following
format:
uid login #blocks
where:
uid is the numerical user ID of the user
login is the login name of the user
#blocks is the total number of disk blocks allocated to the user.
The diskusg command normally reads only the inodes of file systems for disk
accounting. In this case, files are the special file names of these devices.
AIX uses a disk block allocation strategy such that no blocks are allocated for
files of 384 or fewer bytes. The data for such files is held in the inode.
diskusg reports these files as using 0 disk blocks.
Note: This command is for local devices only.
Processed November 8, 1990 DISKUSG(8,C) 1
DISKUSG(8,C) AIX Commands Reference DISKUSG(8,C)
FLAGS
-ifnmlist Ignores the data on those file systems with a file system
name in fnmlist. The fnmlist is a list of file system
names. The diskusg compares each name in this list with
the file system name stored in the volume ID.
-pfile Uses file as the name of the password file to generate
login names. The file /etc/passwd is used by default.
-s Combines all lines for a single user into a single line.
(The input date is already in diskusg command output
format.)
-u file Writes records to file of files that are charged to no
one. Records consist of the special file name, the inode
number, and the user ID.
-v Writes a list to standard error of all files that are
charged to no one.
The output of the diskusg command is normally the input to the acctdisk
command, which generates total accounting records that can be merged with other
accounting records. The diskusg command is normally run in dodisk (see
"acct/*").
EXAMPLES
The following sequence of commands generates daily disk accounting information:
for i in /dev/hd0 /dev/hd1 /dev/hd2 /dev/hd3
do
diskusg $i > dtmp.'basename $i' &
done
wait
diskusg -s dtmp.* | sort +On +1 | acctdisk > dacct
FILES
/etc/passwd Used for user-ID-to-login-name conversions.
RELATED INFORMATION
See the following commands: "acct/*," "acctcms," "acctcom," "acctcon1,
acctcon2," "acctmerg," and "runacct."
See the acct system call and the acct and utmp files in AIX Operating System
Technical Reference.
See the discussion of accounting in Managing the AIX Operating System.
Processed November 8, 1990 DISKUSG(8,C) 2