DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

diskusg(ADM)


diskusg -- generate disk accounting data by user ID

Syntax

/usr/lib/acct/diskusg [ -v ] [ -p passwdfile ] [ -u nouser ]
[ -i vol[,vol ... ] ] [ file ... ]

/usr/lib/acct/diskusg -s [ diskusgfile ... ]

Description

diskusg generates intermediate disk accounting information for the specified files, or those specified on the standard input if these are omitted.

diskusg normally reads only the inodes of filesystems for disk accounting. In this case, files are the special filenames of these devices.

diskusg outputs lines on the standard output, one per user, in the following format:

uid login #blocks

The fields are:


uid
numerical user ID

login
user's login name

#blocks
total number of disk blocks allocated to the user
diskusg recognizes the following options:

-i vol[,vol ... ]
Ignore the data on the named filesystems (vols). The list of filesystem names must be separated by commas, or can be separated by spaces if enclosed within quotes. diskusg compares each name in this list with the filesystem name stored in the volume ID (see labelit(ADM)).

-p passwdfile
Use passwdfile as the name of the password file to generate login names; /etc/passwd is used by default.

-s [ diskusgfile ... ]
Filter input data from the files diskusgfiles. If no diskusgfiles are specified, diskusg reads from the standard input. The input data must already be in diskusg output format. diskusg combines all lines for a single user into one line.

-u nouser
Write records to nouser of files that are not charged to anyone. Records consist of the special filename, the inode number, and the user ID.

-v
Verbose: print a list on stderr (standard error) of all files that are not charged to anyone.
The output of diskusg is normally used as input to acctdisk (see acct(ADM)). This generates total accounting records that can be merged with other accounting records. diskusg is normally run in dodisk (see acctsh(ADM)).

Examples

The following example generates daily disk accounting information:
   for i in /dev/dsk/0s1 /dev/dsk/0s3; do
   	diskusg $i > dtmp.`basename $i` &
   done
   wait
   diskusg -s dtmp.* | sort +0n +1 | acctdisk > disktacct

Limitations

Note that diskusg uses quot(ADM) to account filesystem disk space usage.

Files


/etc/passwd
used to convert user IDs to login names

See also

acct(ADM), acct(FP), acctsh(ADM), labelit(ADM), quot(ADM)

Standards conformance

diskusg is conformant with AT&T SVID Issue 2.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003