Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ acctcon(8) — CLIX 3.1r7.6.22

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

login(1)

init(8)

acct(8)

acctcms(8)

acctmerg(8)

acctprc(8)

acctsh(8)

fwtmp(8)

runacct(8)

acct(2)

acct(4)

utmp(4)



  acctcon(8)                          CLIX                          acctcon(8)



  NAME

    acctcon:  acctcon1, acctcon2 - Perform connect-time accounting

  SYNOPSIS

    /usr/lib/acct/acctcon1 [-pt] [-l sumfile] [-o record-file]

    /usr/lib/acct/acctcon2

  FLAGS

    -p              Displays input only, showing line name, login name, and
                    time (in both numeric and date/time formats).

    -t              Causes acctcon1 to use the last time found in the input as
                    the ending time for each session still in progress,
                    instead of letting the command use the current time.  The
                    acctcon1 command maintains a list of lines on which users
                    are logged in.  When the command reaches the end of its
                    input, it produces a session record for each line that
                    still appears to be active.  The acctcon1 command assumes
                    its input is a current file and therefore uses the current
                    time.  Thus, it assures reasonable and repeatable numbers
                    for noncurrent files.

    -l sumfile      Creates sumfile to contain a summary of line usage showing
                    name of line, number of minutes used, percentage of total
                    elapsed time used, number of sessions charged, number of
                    logins, and number of logouts.  The sumfile helps to track
                    line usage, identify bad lines, and find software and
                    hardware oddities.  Hangup, termination of the login
                    command, and termination of the login shell each generate
                    logout records so that the number of logouts is often
                    three to four times greater than the number of sessions
                    (see init(8) and utmp(4)).

    -o recordfile   Fills recordfile with an overall record for the accounting
                    period, giving starting time, ending time, number of
                    reboots, and number of date changes.

  DESCRIPTION

    The acctcon1 command converts a sequence of login/logout records read from
    stdin (normally redirected from /etc/wtmp) to a more usable, intermediate
    form.  Its output, in ASCII, includes device, user ID, login name, prime-
    time usage in seconds, non-prime-time usage in seconds, session starting
    time (in numeric form), and starting date and time.

    The acctcon2 command is used to convert the records output from acctcon1
    into the tacct structure format (see acct(4)).  The acctcon2 command reads



  2/94 - Intergraph Corporation                                              1






  acctcon(8)                          CLIX                          acctcon(8)



    from stdin and writes to stdout.

  EXAMPLES

    These commands are typically used by the runacct command as shown below.
    The ctmp file is created only for the acctprc command.  In this example,
    the acctcon command uses the last time found in its input file as the
    ending time for each session in progress, creates lineuse as the summary
    file, and fills the record file reboots with an overall record for the
    accounting period.  This information comes from the wtmp file.  This
    output is sorted and stored in the file ctmp.  The acctcon2 command takes
    the contents of ctmp and converts the output from acctcon1 into tacct
    format.  This converted output is then used by the acctmerg command and
    stored in the ctacct file.

    acctcon1 -t -l lineuse -o reboots <wtmp|sort +1n -2 >ctmp \
    acctcon2<ctmp|acctmerg >ctacct


  FILES

    /etc/wtmp   Login/logout summary.

  CAUTIONS

    The line usage report is confused by date changes.  Use the wtmpfix
    command to correct this situation (see fwtmp(8)).

  DIAGNOSTICS

    If acctcon1 has a problem reading the wtmp file, one of the following
    messages appears:

    acctcon: bad times: old xxxx new yyyy
    bad wtmp: offset zzzz
    bad record is ppppppp


  EXIT VALUES

    If acctcon1 encounters any errors, it exits with a value greater than 0.

  RELATED INFORMATION

    Commands:  login(1), init(8), acct(8), acctcms(8), acctmerg(8),
    acctprc(8), acctsh(8), fwtmp(8), runacct(8)

    Functions:  acct(2)

    Files:  acct(4), utmp(4)




  2                                              Intergraph Corporation - 2/94




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