Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

acctcom(8)

acctcms(8)

acctcon(8)

acctmerg(8)

acctprc(8)

acctsh(8)

diskusg(8)

fwtmp(8)

runacct(8)

acct(2)

acct(4)

utmp(4)



  acct(8)                             CLIX                             acct(8)



  NAME

    acct:  acctdisk, acctdusg, accton, acctwtmp - Overview of accounting and
    miscellaneous accounting commands

  SYNOPSIS

    /usr/lib/acct/acctdisk

    /usr/lib/acct/acctdusg [-u file] [-p passwdfile]

    /usr/lib/acct/accton [file]

    /usr/lib/acct/acctwtmp reason

  FLAGS

    The following flags are used with the /usr/lib/acctdusg procedure only:

    -u file         Records consisting of filenames for which acctdusg does
                    not charge are placed in the specified file.  This is a
                    potential source for finding users trying to avoid disk
                    charges.

    -p passwdfile   Allows the user to specify the name of any password file.
                    For example, the user may see a list of disk usages for
                    the users on the system in January, contained in the file
                    /etc/passwd_jan, by specifying -p /etc/passwd_jan on the
                    command line.

  DESCRIPTION

    Accounting software consists of executable modules and shell procedures
    that may be used to build accounting systems.  The system-supplied set of
    shell procedures built on top of the executable modules is described in
    acctsh(8).

    Connect-time accounting (when a user logs in and out) is handled by
    various commands.  These commands write records to the files /etc/utmp and
    /etc/wtmp.  Both files are described in utmp.  The /etc/utmp file contains
    the current logins.  The /etc/wtmp file contains a record of logins since
    the last time the file was created.  The commands described in acctcon
    convert the information in /etc/wtmp into session and charging records,
    which are then summarized by the acctmerg command.

    The CLIX system kernel performs process accounting.  When a process
    terminates, a record is written to a file (normally /usr/adm/pacct).  The
    commands in acctprc summarize the data in this file.  The acctcms command
    summarizes command usage.  Current process data may be examined by using
    the acctcom command.




  2/94 - Intergraph Corporation                                              1






  acct(8)                             CLIX                             acct(8)



    The acctmerg command can merge and summarize process accounting, connect-
    time accounting, and any accounting records in the format described in
    acct.  The prtacct command formats any or all accounting records (see
    acctsh(8)).

    Disk accounting information is kept within the file system.  It is
    obtained using either acctdusg or diskusg.  The acctdusg command computes
    disk usage for each login directory.  It reads a list of files from stdin
    (usually from a find -print command) and computes disk resource
    consumption (including indirect blocks) for each login.  (See the FLAGS
    section for flags which are used with this command.)  The diskusg command
    computes disk usage from the file system inodes.  Both commands produce
    lines containing the user ID, login name, and the number of disk blocks
    used.  The acctdisk command processes this output to convert it to the
    acct structure format (see acct(4)).  The output may then be merged with
    other accounting data.  The dodisk command is a shell procedure usually
    used for disk accounting (see acctsh(8)).

    The accton command attempts to turn process accounting on if a file is
    specified.  Otherwise the command turns process accounting off.  The
    specified file must be the name of an existing file (usually
    /usr/adm/pacct) to which process accounting records are appended (see
    acct(2) and acct(4)).  The accton command is normally accessed from the
    shell procedure turnacct (see acctsh(8)).

    The acctwtmp command writes a utmp record to a stdout file.  The record
    contains the current time and a string of characters that describe the
    reason.  A record type of ACCOUNTING is assigned (see utmp(4)).  The
    reason must be a string of 11 or fewer characters, numbers, $, or spaces.

  EXAMPLES

    The following commands may be used during reboot and shutdown procedures,
    respectively.  The first command writes a utmp record to the file
    /etc/wtmp.  The other command specifies that the reason for the shutdown
    is a ``file save'' and writes a utmp record to the file /etc/wtmp.

    acctwtmp uname >> /etc/wtmp
    acctwtmp "file save" >> /etc/wtmp


  FILES

    /etc/passwd      Used for login name to user ID conversions.

    /usr/lib/acct    Holds all accounting commands in section (8).

    /usr/adm/pacct   Current process accounting file.

    /etc/wtmp        Login/logout history file.




  2                                              Intergraph Corporation - 2/94






  acct(8)                             CLIX                             acct(8)



  DIAGNOSTICS

    There are no diagnostic messages in acctdisk.  The acctdusg command
    displays the following error message if it cannot open a file, or if there
    is not enough memory to run:  ``out of core''.  The acctwtmp command
    displays an error if the command line arguments are bad.  The accton
    command displays a message if the invoking user is not the root or adm
    user.  This command also displays a message if it cannot turn accounting
    on or off.

  EXIT VALUES

    The acctdisk command always exits with a value of 0.

    The acctdusg command exits with a value of 2 if it runs out of memory.  It
    exits with a value of 1 if it cannot open a file.

    The accton command exits with a value of 1 on any error.

    The acctwtmp command exits with a value of 1 if the command line arguments
    are bad.

  RELATED INFORMATION

    Commands:  acctcom(8), acctcms(8), acctcon(8), acctmerg(8), acctprc(8),
    acctsh(8), diskusg(8), fwtmp(8), runacct(8)

    Functions:  acct(2)

    Files:  acct(4), utmp(4)
























  2/94 - Intergraph Corporation                                              3




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