Manual Page Result
0
Command: diskusg | Section: 8 | Source: Digital UNIX | File: diskusg.8.gz
diskusg(8) System Manager's Manual diskusg(8)
NAME
diskusg - Generates disk accounting data by user ID
SYNOPSIS
diskusg [-U number] [-s] [-v] [-p pw_filename] [-u u_filename] [-i ign-
list] [ filesystem ...]
The diskusg command generates intermediate disk accounting information
and writes one record per user to standard output.
FLAGS
Sets the number of internal allocated user structures to the specified
number, one for each user. The default is 1000. Ignores the data in
the specified ignlist file system. The ignlist parameter specifies a
list of file system names, separated with commas or enclosed by quota-
tion marks. Uses the specified pw_filename file as the password file
used to generate login names. The default password file is
/etc/passwd. Combines all records for a single user into a single
record. Input data must be in the same format as the output of the
diskusg command. If you specify the filesystem parameter with the -s
flag, the parameter must be an ASCII file containing data in the appro-
priate format. If filesystem is not specified, input data will be
taken from standard input. Writes a record to u_filename for each file
that has changed its user ID to user no one. Each record consists of
the special file name, the inode number, and the user ID. Writes a
list of all files charged to user no one to standard error.
DESCRIPTION
The diskusg command generates intermediate disk accounting information
about files in the specified filesystem or from standard input. You
must specify the raw device special file for filesystem (for example,
/dev/rrz3c). A file system must exist on the device.
The diskusg command obtains user login names from the /etc/passwd file,
by default, and reports one record per user to standard output. The
command usually reads only the inodes of the specified file system.
The diskusg command is usually called from the dodisk shell procedure
when the cron daemon executes commands in the
/usr/spool/cron/crontabs/root file. You can also manually invoke the
command.
If the diskusg command is executed from the dodisk command, its output
is directed to the /var/adm/dtmp file, which is used as input to the
acctdisk command to produce a total accounting record. This total ac-
counting record can be merged with other total accounting records to
produce a daily report. Note that if the -o flag is specified with the
dodisk command, the acctdusg command is used instead of the diskusg
command. The acctdusg command provides a more thorough accounting of
disk usage than the diskusg command.
Records output by the diskusg command are in the following format:
user_ID login_name disk_blocks
The output contains the following information: Assigned user number
User login name Total number of disk blocks allocated to the user
Note that this command can be used only for local devices.
EXAMPLES
To manually invoke the diskusg command, you must be logged in as supe-
ruser. For example, you could enter the following command: #
/usr/sbin/acct/diskusg /dev/rrz3a
0 root 63652
1 daemon 84
2 bin 71144
4 adm 976
5 uucp 3324
322 homer 2
521 whistler 2
943 cellini 363 1016 pollock 92 1098 hopper
317
To generate daily disk accounting information, add a line similar to
the following to the /usr/spool/cron/crontabs/root file: 0 2 * * 4
/usr/sbin/acct/dodisk
The previous example shows a typical, periodically invoked command that
the cron daemon reads and executes. The time period is expressed by a
6-field entry using the format:
mm hh dayofmonth month wkday command
The previous format shows the following information: The number of min-
utes past the hour, from 0 to 59 The hour of the day in 24-hour clock
notation The day of the month The month, from 1 to 12 The day or days
of the week, from 0 to 6, where 0 is Sunday and inclusive days are sep-
arated with a - (hyphen) The command that the cron daemon must execute.
Unspecified times must use an * (asterisk) to define an empty field.
In the previous example, the dodisk shell procedure runs at 02:00 hours
(2) every Thursday (4). Usually, the dodisk shell procedure calls the
diskusg command to redirect its output to a temporary file and then
calls acctdisk to redirect disk usage records from the temporary file
as input to the /var/adm/acct/nite/[filename] file as output. The file
stored in the /var/adm/acct/nite subdirectory is a permanent binary
record of disk usage for the specified period.
FILES
Specifies the command path. Accounting header files that define for-
mats for writing accounting files. User database file.
RELATED INFORMATION
Commands: acct(8), dodisk(8), runacct(8), acctmerg(8), acctdusg(8),
acctdisk(8)
Functions: acct(2)
System Administration delim off
diskusg(8)