2 .\" Copyright 1989 AT&T Copyright (c) 1999 Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH ACCTCON 1M "Feb 22, 1999"
8 acctcon, acctcon1, acctcon2 \- connect-time accounting
12 \fB/usr/lib/acct/acctcon\fR [\fB-l\fR \fIlineuse\fR] [\fB-o\fR \fIreboot\fR]
17 \fB/usr/lib/acct/acctcon1\fR [\fB-p\fR] [\fB-t\fR] [\fB-l\fR \fIlineuse\fR] [\fB-o\fR \fIreboot\fR]
22 \fB/usr/lib/acct/acctcon2\fR
28 \fBacctcon\fR converts a sequence of login/logoff records to total accounting
29 records (see the \fBtacct\fR format in \fBacct.h\fR(3HEAD)). The login/logoff
30 records are read from standard input. The file \fB/var/adm/wtmpx\fR is usually
31 the source of the login/logoff records; however, because it might contain
32 corrupted records or system date changes, it should first be fixed using
33 \fBwtmpfix\fR. The fixed version of file \fB/var/adm/wtmpx\fR can then be
34 redirected to \fBacctcon\fR. The \fBtacct\fR records are written to standard
38 \fBacctcon\fR is a combination of the programs \fBacctcon1\fR and
39 \fBacctcon2\fR. \fBacctcon1\fR converts login/logoff records, taken from the
40 fixed \fB/var/adm/wtmpx\fR file, to ASCII output. \fBacctcon2\fR reads the
41 ASCII records produced by \fBacctcon1\fR and converts them to \fBtacct\fR
42 records. \fBacctcon1\fR can be used with the \fB-l\fR and \fB-o\fR options,
43 described below, as well as with the \fB-p\fR and \fB-t\fR options.
51 Print input only, showing line name, login name, and time (in both numeric and
61 \fBacctcon1\fR maintains a list of lines on which users are logged in. When it
62 reaches the end of its input, it emits a session record for each line that
63 still appears to be active. It normally assumes that its input is a current
64 file, so that it uses the current time as the ending time for each session
65 still in progress. The \fB-t\fR flag causes it to use, instead, the last time
66 found in its input, thus assuring reasonable and repeatable numbers for
73 \fB\fB-l\fR \fIlineuse\fR\fR
76 \fIlineuse\fR is created to contain a summary of line usage showing line name,
77 number of minutes used, percentage of total elapsed time used, number of
78 sessions charged, number of logins, and number of logoffs. This file helps
79 track line usage, identify bad lines, and find software and hardware oddities.
80 Hangup, termination of \fBlogin\fR(1) and termination of the login shell each
81 generate logoff records, so that the number of logoffs is often three to four
82 times the number of sessions. See \fB init\fR(1M) and \fButmpx\fR(4).
88 \fB\fB-o\fR \fIreboot\fR\fR
91 \fBreboot\fR is filled with an overall record for the accounting period, giving
92 starting time, ending time, number of reboots, and number of date changes.
97 \fBExample 1 \fRUsing the \fBacctcon\fR command.
100 The \fBacctcon\fR command is typically used as follows:
105 example% acctcon \fB-l\fR lineuse \fB-o\fR reboots < tmpwtmp > ctacct
112 The \fBacctcon1\fR and \fBacctcon2\fR commands are typically used as follows:
117 example% acctcon1 \fB-l\fR lineuse \fB-o\fR reboots < tmpwtmp | sort +1n +2 > ctmp
118 example% acctcon2 < ctmp > ctacct
127 \fB\fB/var/adm/wtmpx\fR\fR
130 History of user access and administration information
136 \fBacctcom\fR(1), \fBlogin\fR(1), \fBacct\fR(1M), \fBacctcms\fR(1M),
137 \fBacctmerg\fR(1M), \fBacctprc\fR(1M), \fBacctsh\fR(1M), \fBfwtmp\fR(1M),
138 \fBinit\fR(1M), \fBrunacct\fR(1M), \fBacct\fR(2), \fBacct.h\fR(3HEAD),
139 \fButmpx\fR(4), \fBattributes\fR(5)
146 The line usage report is confused by date changes. Use \fBwtmpfix\fR (see
147 \fBfwtmp\fR(1M)), with the \fB/var/adm/wtmpx\fR file as an argument, to correct
151 During a single invocation of any given command, the \fBacctcon\fR,
152 \fBacctcon1\fR, and \fBacctcon2\fR commands can process a maximum of:
157 6000 distinct session
163 1000 distinct terminal lines
169 2000 distinct login names
173 If at some point the actual number of any one of these items exceeds the
174 maximum, the command will not succeed.