up | Inhaltsverzeichniss | Kommentar

Manual page for ACCTCON(8)

acctcon1, acctcon2 - connect-time accounting

SYNOPSIS

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

/usr/lib/acct/acctcon2

DESCRIPTION

acctcon1

acctcon1 converts a sequence of login/logoff records read from its standard input to a sequence of records, one per login session. Its input should normally be redirected from /var/adm/wtmp. Its output is ASCII, giving device, user ID, login name, prime connect time (seconds), non-prime connect time (seconds), session starting time (numeric), and starting date and time.

acctcon2

acctcon2 expects as input a sequence of login session records and converts them into total accounting records (see tacct format in acct.5

OPTIONS

acctcon1

-p
Print input only, showing line name, login name, and time (in both numeric and date/time formats).
-t
Test mode. 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.
-l file
file is created to contain a summary of line usage showing 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 helps track line usage, identify bad lines, and find software and hardware oddities. Hang-up, termination of login.1 and termination of the login shell each generate logoff records, so that the number of logoffs is often three to four times the number of sessions. See init.8 and utmp.5v
-o file
file is filled with an overall record for the accounting period, giving starting time, ending time, number of reboots, and number of date changes.

EXAMPLES

These commands are typically used as shown below. The file ctmp is created only for the use of acctprc.8 commands:

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

FILES

/var/adm/wtmp

SEE ALSO

acctcom.1 login.1 acct.2v acct.5 utmp.5v acct.8 acctcms.8 acctmerg.8 acctprc.8 acctsh.8 fwtmp.8 init.8 runacct.8

BUGS

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


index | Inhaltsverzeichniss | Kommentar

Created by unroff & hp-tools. © by Hans-Peter Bischof. All Rights Reserved (1997).

Last modified 21/April/97