DISKUSG(1M) DISKUSG(1M)
NAME
diskusg - generate disk accounting data by user ID
SYNOPSIS
diskusg [options] [files]
DESCRIPTION
diskusg generates intermediate disk accounting information
from data in files, or the standard input if omitted.
diskusg outputs 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; and
#blocks is the total number of disk blocks allocated to
this user.
diskusg normally reads only the i-nodes of file systems for
disk accounting. In this case, files are the special
filenames of these devices.
diskusg recognizes the following options:
-s specifies that the input data is already in
diskusg output format, not special filenames of
devices. diskusg combines all lines for a
single user into a single line.
-v verbose. Prints a list on standard error of all
files that are charged to no one.
-i fnmlist ignores the data on those file systems whose
file system name is in fnmlist. fnmlist is a
list of file-system names separated by commas or
enclosed within quotation marks. diskusg
compares each name in this list with the file
Page 1 May 1989
DISKUSG(1M) DISKUSG(1M)
system name stored in the volume ID [see
labelit(1M)].
-p file uses file as the name of the password file to
generate login names. /etc/passwd is used by
default.
-u file writes records to file of those files that are
charged to no one. Records consist of the
special file name, the i-node number, and the
user ID.
The output of diskusg is normally the input to acctdisk [see
acct(1M)] which generates total accounting records that can
be merged with other accounting records. diskusg is
normally run in dodisk [see acctsh(1M)].
Note that although the intent of options -v and -u are the
same, their outputs differ. For example,
diskusg -v /dev/usr writes BAD UID: filesystem=/dev/usr, i-
node=82, uid=105 to stderr whereas,
diskusg -u dtmp /dev/usr writes /dev/usr 82 105 to file
dtmp.
EXAMPLES
The following will generate daily disk accounting
information for root on /dev/dsk/m3230s0:
diskusg /dev/dsk/m3230s0 | acctdisk > disktacct
In the next example, the "usr" file system is ignored
despite its appearance later on the command line (i.e.,
/dev/usr):
diskusg -i "usr" /dev/usr /dev/dsk/m3230s0
It is very important to enclose "usr" in quotation marks.
Note that "usr" is derived from "labelit /dev/usr", which
Page 2 May 1989
DISKUSG(1M) DISKUSG(1M)
displays the current file system name.
FILES
/etc/passwd used for user ID to login name
conversions
SEE ALSO
acct(1M), acctsh(1M)
acct(4) in the Programmer's Reference Manual
Page 3 May 1989