Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ acctsh(ADM) — OpenDesktop 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

acct(ADM)

acct(FP)

acct(S)

acctcms(ADM)

acctcom(ADM)

acctcon(ADM)

acctmerg(ADM)

acctprc(ADM)

cron(C)

diskusg(ADM)

fwtmp(ADM)

runacct(ADM)

utmp(F)


 acctsh(ADM)                     19 June 1992                     acctsh(ADM)


 Name

    acctsh: chargefee, ckpacct, dodisk, lastlogin, monacct, nulladm, prctmp,
    prdaily, prtacct, runacct, shutacct, startup, turnacct - shell procedures
    for accounting

 Syntax

    /usr/lib/acct/chargefee login-name number

    /usr/lib/acct/ckpacct [ blocks ]

    /usr/lib/acct/dodisk [ -o ] [ files ... ]

    /usr/lib/acct/lastlogin

    /usr/lib/acct/monacct number

    /usr/lib/acct/nulladm file

    /usr/lib/acct/prctmp [ file ... ]

    /usr/lib/acct/prdaily [ -l ] [ -c ] [ mmdd ]

    /usr/lib/acct/prtacct file [ "heading" ]

    /usr/lib/acct/runacct [ mmdd ] [ mmdd state ]

    /usr/lib/acct/shutacct [ "reason" ]

    /usr/lib/acct/startup

    /usr/lib/acct/turnacct on | off | switch

 Description

    chargefee can be invoked to charge a number of units to login-name.  A
    record is written to /usr/adm/fee to be merged with other accounting
    records during the night.

    ckpacct should be initiated via cron(C)).  It periodically checks the
    size of /usr/adm/pacct.  If the size exceeds blocks, 1000 by default,
    turnacct will be invoked with argument switch.  If the number of free
    disk blocks in the /usr file system falls below 500, ckpacct will auto-
    matically turn off the collection of process accounting records via the
    off argument to turnacct.  When at least this number of blocks is
    restored, the accounting will be activated again.  This feature is sensi-
    tive to the frequency at which ckpacct is executed, usually by cron.

    dodisk should be invoked by cron to perform the disk accounting func-
    tions.  By default, it will do disk accounting on the special files in
    /etc/default/filesys.  If the -o flag is used, it will do a slower ver-
    sion of disk accounting by login directory.  Files specify the one or
    more filesystem names where disk accounting will be done.  If files are
    used, disk accounting will be done on these file systems only.  If the -o
    flag is used, files should be mount points of mounted filesystems.  If
    omitted, they should be the special file names of mountable file systems.

    lastlogin is invoked by runacct to update /usr/adm/acct/sum/loginlog,
    which shows the last date on which each person logged in.

    monacct should be invoked once each month or each accounting period.
    Number indicates which month or period it is.  If number is not given, it
    defaults to the current month (01-12).  This default is useful if monacct
    is to be executed via cron(C) on the first day of each month.  monacct
    creates summary files in /usr/adm/acct/fiscal and restarts summary files
    in /usr/adm/acct/sum.

    nulladm creates file with mode 664 and ensures that owner and group are
    adm.  It is called by various accounting shell procedures.

    prctmp can be used to print the session record file (normally
    /usr/adm/acct/nite/ctmp created by acctcon(ADM)).  It takes one or more
    file names as arguments; otherwise it reads from the standard input.

    prdaily is invoked by runacct to format a report of the previous day's
    accounting data.  The report resides in /usr/adm/acct/sum/rprtmmdd where
    mmdd is the month and day of the report.  The current daily accounting
    reports may be printed by typing prdaily.  Previous days' accounting
    reports can be printed by using the mmdd option and specifying the exact
    report date desired.  The -l flag prints a report of exceptional usage by
    login ID for the specified date.  Previous daily reports are cleaned up
    and therefore inaccessible after each invocation of monacct.  The -c flag
    prints a report of exceptional resource usage by command, and may be used
    on current day's accounting data only.

    prtacct can be used to format and print any total accounting (tacct)
    file.

    runacct performs the accumulation of connect, process, fee, and disk
    accounting on a daily basis.  It also creates summaries of command usage.
    For more information, see runacct(ADM)).

    shutacct is invoked during a system shutdown to turn process accounting
    off and append a ``reason'' record to /etc/wtmp.

    startup is called by /etc/init.d/acct to turn the accounting on whenever
    the system is brought to a multi-user state.

    turnacct is an interface to accton (see acct(ADM)) to turn process
    accounting on or off.  The switch argument turns accounting off, moves
    the current /usr/adm/pacct to the next free name in /usr/adm/pacctincr
    (where incr is a number starting with 1 and incrementing by one for each
    additional pacct file), then turns accounting back on again.  This pro-
    cedure is called by ckpacct and thus can be taken care of by the cron and
    used to keep pacct to a reasonable size.  acct starts and stops process
    accounting via init and shutdown accordingly.

 Files


    /usr/adm/fee        accumulator for fees
    /usr/adm/pacct      current file for per-process accounting
    /usr/adm/pacct*     used if pacct gets large and during execution of
                        daily accounting procedure
    /etc/wtmp           login/logoff summary
    /usr/lib/acct/ptelus.awk
                        contains the limits for exceptional usage by login ID
    /usr/lib/acct/ptecms.awk
                        contains the limits for exceptional usage by command
                        name
    /usr/adm/acct/nite  working directory
    /usr/lib/acct       holds all accounting commands listed in (ADM)
    /usr/adm/acct/sum   summary directory, should be saved

 See also

    acct(ADM), acct(FP), acct(S), acctcms(ADM), acctcom(ADM), acctcon(ADM),
    acctmerg(ADM), acctprc(ADM), cron(C), diskusg(ADM), fwtmp(ADM),
    runacct(ADM), utmp(F)

 Standards conformance

    chargefee is conformant with:

    ANSI X3.159-1989 Programming Language -- C.

    ckpacct, lastlogin, prctmp, runacct and shutacct are conformant with:

    AT&T SVID Issue 2.


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