acctcon(1M) acctcon(1M)
NAME
acctcon1, acctcon2 - connect-time accounting
SYNOPSIS
/usr/lib/acct/acctcon1 [-lfile] [-ofile] [-p] [-t]
/usr/lib/acct/acctcon2
DESCRIPTION
acctcon1 reads a sequence of login/logoff records from its
standard input (redirected from /etc/wtmp) and converts them
to a sequence of records, one per login session, giving the
following ASCII output: device, user ID, login name, prime
connect time (seconds), non-prime connect time (seconds),
session starting time (numeric), and starting date and time.
The flag options are:
-l file create file showing the following line usage
summary: line name, number of minutes used,
percentage of total elapsed time used, number of
sessions charged, number of logins, and number of
logoffs. This file tracks line usage, identifies
bad lines, and finds software and hardware
oddities. Hanging-up, terminating login(1), and
terminating the login shell each generate logoff
records, so the number of logoffs is often three
to four times the number of sessions. See
init(1M) and utmp(4).
-o file fills file with an overall record for the
accounting period: starting time, ending time,
number of reboots, and number of date changes.
-p print input only: line name, login name, and time
(in both numeric and date/time formats).
-t acctcon1 maintains a list of lines on which users
are logged in. When it reaches the end of its
input, it emits a session record for each line
that still appears to be active. It normally
assumes that its input is a current file, so that
it uses the current time as the ending time for
each session still in progress. The -t flag
causes it to use, instead, the last time found in
its input, thus assuring reasonable and repeatable
numbers for non-current files.
acctcon2 reads a sequence of login session and converts them
into total accounting records (see tacct format in acct(4)).
EXAMPLE
These commands are typically used as shown below. The file
Page 1 (last mod. 1/15/87)
acctcon(1M) acctcon(1M)
ctmp is created only for acctprc(1M) commands:
acctcon1 -t -l lineuse -o reboots < wtmp | sort +1n +2 >
ctmp
acctcon2 < ctmp | acctmerg > ctacct
FILES
/usr/lib/acct/acctcon1
/usr/lib/acct/acctcon2
/etc/wtmp
SEE ALSO
acctcom(1), login(1), acct(1M), acctcms(1M), acctmerg(1M),
acctprc(1M), acctsh(1M), fwtmp(1M), runacct(1M), init(1M),
acct(2), acct(4), utmp(4).
BUGS
Date changes confuse the line usage report. Use wtmpfix
(see fwtmp(1M)) to correct this.
Page 2 (last mod. 1/15/87)