up | Inhaltsverzeichniss | Kommentar

Manual page for 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 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


The input data is already in diskusg output format; combine all lines for a single user into a single line.
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


used for user ID to login name conversions


acct.5 acct.8 acctsh.8

index | Inhaltsverzeichniss | Kommentar

Created by unroff & hp-tools. © by Hans-Peter Bischof. All Rights Reserved (1997).

Last modified 21/April/97