DISKUSG(8) System Manager's Manual DISKUSG(8)
diskusg - generate disk accounting data by user
diskusg [ -sv ] [ -p filename ] [ -u filename ] [ filename... ]
diskusg generates intermediate disk accounting information from data in
filename, or the standard input if filename is omitted. diskusg dis-
plays one line per user on the standard output in the following format:
uid login #blocks
uid is the numerical user ID of the user. login is the user's login
name. #blocks is the total number of disk blocks allocated to the
diskusg normally reads only the i-nodes of file systems for disk
accounting. In this case, filenames are the special filenames of these
The output of diskusg is normally the input to acctdisk (see acct(8))
which generates total accounting records that can be merged with other
accounting records. diskusg is normally run in dodisk (see acctsh(8)).
-s The input data is already in diskusg output format; combine
all lines for a single user into a single line.
-v Print a list to the standard error of all files that are
not charged to any user.
-p filename Use filename as the name of the password file to generate
login names. /etc/passwd is used by default.
-u filename Write records to filename of files that are not charged to
any user. Records consist of the special file name, the i-
node number, and the user ID.
The following example generates daily disk accounting information:
for i in /dev/xy0a /dev/xy0g /dev/xy1g; do
diskusg $i >> dtmp.`basename $i` &&
diskusg -s dtmp.* | sort +0n +1 | acctdisk >> disktacct
/etc/passwd used for user ID to login name conversions
acct(5), acct(8), acctsh(8)
13 January 1990 DISKUSG(8)