dodisk Command

Purpose

Initiates disk-usage accounting.

Syntax

/usr/sbin/acct/dodisk [ -X ] [  -o ] [ File ... ]

Description

The dodisk command initiates disk-usage accounting by calling the diskusg command and the acctdisk command. If you specify the -o flag with the dodisk command, a more thorough but slower version of disk accounting by login directory is initiated using the acctdusg command. Normally, the cron daemon runs the dodisk command.

By default, the dodisk command does disk accounting only on designated files with stanzas in the /etc/filesystems file and that contain the attribute account=true. If you specify file names with the File parameter, disk accounting is done on only those files.

If you do not specify the -o flag, the File parameter should contain the special file names of mountable file systems. If you specify both the -o flag and the File parameter, the files should be mount points of mounted file systems.

Note: You should not share accounting files among nodes in a distributed environment. Each node should have its own copy of the various accounting files.

Flags

Item Description
-o Calls the acctdusg command, instead of the diskusg command, to initiate disk accounting by login directory.
-X Process all available characters of each user name instead of truncating to the first 8 characters.

Security

Access Control: This command should grant execute (x) access only to members of the adm group.

Examples

  1. To start automatic disk-usage accounting, add the following to the /var/spool/cron/crontabs/root file:
    0 2 * * 4 /usr/sbin/acct/dodisk 
    This example shows the instructions that the cron daemon will read and act upon. The dodisk command will run at 2 a.m. (0 2) each Thursday (4). This command is only one of the accounting instructions normally given to the cron daemon. See "Setting Up an Accounting System" in Operating system and device management for more information on typical cron accounting entries.
  2. To run disk-usage accounting on a system that contains user names greater than 8 character, add the following line to the /var/spool/cron/crontabs/root file:
    0 2 * * 4 /usr/sbin/acct/dodisk -X

Files

Item Description
/usr/sbin/acct The path to the accounting commands
/etc/filesystems Contains information about file system.