DISKUSG(8)

NAME
diskusg - generate disk accounting data by user

SYNOPSIS
diskusg [ -sv ] [ -p filename ] [ -u filename ] [ filename... ]

DESCRIPTION

diskusg generates intermediate disk accounting information from data in filename, or the standard input if filename is omitted. diskusg displays 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 user.

diskusg normally reads only the i-nodes of file systems for disk accounting. In this case, filenames are the special filenames of these devices.

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)).

OPTIONS

-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.

EXAMPLES

The following example generates daily disk accounting information:

    for i in /dev/xy0a /dev/xy0g /dev/xy1g; do
    	diskusg $i > dtmp.`basename $i` &
    done
    wait
    diskusg -s dtmp.* | sort +0n +1 | acctdisk > disktacct

FILES
/etc/passwd
    used for user ID to login name conversions

SEE ALSO
acct(5), acct(8), acctsh(8)