Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

acct(8)

acctmerg(8)

acctdusg(8)

acctdisk(8)

dodisk(8)

runacct(8)

acct(2)

diskusg(8)  —  Maintenance

OSF

NAME

diskusg − Generates disk accounting data by user ID

SYNOPSIS

diskusg [-U number] [-sv] [-p pw_file] [-u ufile] [-i ignlist] [ file ...]

The diskusg command generates intermediate disk accounting information and writes one record per user to standard output. 

FLAGS

-U numberSets the number of internal allocated user structures to number, one for each user. The default is 1000. 

-i ignlistIgnores the data in the ignlist file system. The ignlist parameter specifies a list of file system names that are separated with commas or are enclosed within quotation marks. 

-p pw_fileUses pw_file as the alternate password file used to generate login names. The default password file is /etc/passwd. 

-sCombines all records for a single user into a single record. Input data must be already in the previously described format. In combination with this option specified file arguments are regular files containing data in the described output format. When file is not specified, input data are taken from standard input. 

-u ufileWrites a record to ufile for each file that has changed its user ID to no one. Each record consists of the special file name, the inode number, and the user ID. 

-vWrites a list of all files charged to user no one to standard error. 

DESCRIPTION

The diskusg command generates intermediate disk accounting information from data in files specified with the file parameter, which is the name of the raw device the data files reside on, or from standard input, and writes one record per user to standard output. This command is normally called from the dodisk shell procedure when the cron daemon executes commands in ­/usr/spool/cron/crontabs/[Filename]. The output, produced when this command is executed, is redirected as input to the acctdisk command. When the -o flag is used with the dodisk command, the acctdusg command replaces the diskusg command.  Records output by this command provide the following output:

1  User IDThe assigned user number. 

2  Login name
The user login name.

3  Number of blocks
The total number of disk blocks allocated to this user.

The output of this command becomes the input of the acctdisk command, which converts the information to a total accounting record.  This total accounting record is merged with other total accounting records to produce a daily report. 

The diskusg command normally reads only the inodes of file systems specified by the file parameter, which provides the special file names of the raw devices. When you need a more thorough accounting of disk usage, see the acctdusg command. 

This command is for local devices only. 

EXAMPLES

To generate daily disk accounting information, add a line similar to the following to the /usr/spool/cron/crontabs/adm file:

0 2 ∗ ∗ 4 /usr/sbin/acct/dodisk

This is an example of a typical, periodically invoked command that the cron daemon reads and executes. The period is expressed by a 6-field entry having the format: mm hh daymon monyr wkday cmd (where numbers are integers and mm has a value 0 through 59 expressing minutes past the hour, hh is the hour of the day in 24-hour clock notation, daymon is day of the month, monyr is ­month of the year, wkday is the day or days of the week, where 0 is Sunday and inclusive days are separated with a - (hyphen), and cmd is the command the cron daemon must execute.  Unspecified times must use the ∗ (asterisk) to define an empty field. 

In this example, the dodisk shell procedure runs at 02:00 hours (2) every Thursday (4). Normally, 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 ouput. The file stored in the ­/var/adm/acct/nite subdirectory is a permanent binary record of disk usage for the specified period. 

FILES

/usr/sbin/acct/diskusg
Specifies the command path.

/usr/include/sys/acct.h
Accounting header files that define formats for writing accounting files.

/etc/passwd
User database file.

RELATED INFORMATION

Commands:  acct(8), acctmerg(8), acctdusg(8), acctdisk(8), dodisk(8), runacct(8)

Functions: acct(2)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026