1acctcon(1M) System Administration Commands acctcon(1M)
2
3
4
6 acctcon, acctcon1, acctcon2 - connect-time accounting
7
9 /usr/lib/acct/acctcon [-l lineuse] [-o reboot]
10
11
12 /usr/lib/acct/acctcon1 [-p] [-t] [-l lineuse] [-o reboot]
13
14
15 /usr/lib/acct/acctcon2
16
17
19 acctcon converts a sequence of login/logoff records to total accounting
20 records (see the tacct format in acct.h(3HEAD)). The login/logoff
21 records are read from standard input. The file /var/adm/wtmpx is usu‐
22 ally the source of the login/logoff records; however, because it might
23 contain corrupted records or system date changes, it should first be
24 fixed using wtmpfix. The fixed version of file /var/adm/wtmpx can then
25 be redirected to acctcon. The tacct records are written to standard
26 output.
27
28
29 acctcon is a combination of the programs acctcon1 and acctcon2. acct‐
30 con1 converts login/logoff records, taken from the fixed /var/adm/wtmpx
31 file, to ASCII output. acctcon2 reads the ASCII records produced by
32 acctcon1 and converts them to tacct records. acctcon1 can be used with
33 the -l and -o options, described below, as well as with the -p and -t
34 options.
35
37 -p Print input only, showing line name, login name, and time
38 (in both numeric and date/time formats).
39
40
41 -t acctcon1 maintains a list of lines on which users are
42 logged in. When it reaches the end of its input, it emits
43 a session record for each line that still appears to be
44 active. It normally assumes that its input is a current
45 file, so that it uses the current time as the ending time
46 for each session still in progress. The -t flag causes it
47 to use, instead, the last time found in its input, thus
48 assuring reasonable and repeatable numbers for non-cur‐
49 rent files.
50
51
52 -l lineuse lineuse is created to contain a summary of line usage
53 showing line name, number of minutes used, percentage of
54 total elapsed time used, number of sessions charged, num‐
55 ber of logins, and number of logoffs. This file helps
56 track line usage, identify bad lines, and find software
57 and hardware oddities. Hangup, termination of login(1)
58 and termination of the login shell each generate logoff
59 records, so that the number of logoffs is often three to
60 four times the number of sessions. See init(1M) and
61 utmpx(4).
62
63
64 -o reboot reboot is filled with an overall record for the account‐
65 ing period, giving starting time, ending time, number of
66 reboots, and number of date changes.
67
68
70 Example 1 Using the acctcon command.
71
72
73 The acctcon command is typically used as follows:
74
75
76 example% acctcon -l lineuse -o reboots < tmpwtmp > ctacct
77
78
79
80
81 The acctcon1 and acctcon2 commands are typically used as follows:
82
83
84 example% acctcon1 -l lineuse -o reboots < tmpwtmp | sort +1n +2 > ctmp
85 example% acctcon2 < ctmp > ctacct
86
87
88
90 /var/adm/wtmpx History of user access and administration information
91
92
94 See attributes(5) for descriptions of the following attributes:
95
96
97
98
99 ┌─────────────────────────────┬─────────────────────────────┐
100 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
101 ├─────────────────────────────┼─────────────────────────────┤
102 │Availability │SUNWaccu │
103 └─────────────────────────────┴─────────────────────────────┘
104
106 acctcom(1), login(1), acct(1M), acctcms(1M), acctmerg(1M), acctprc(1M),
107 acctsh(1M), fwtmp(1M), init(1M), runacct(1M), acct(2), acct.h(3HEAD),
108 utmpx(4), attributes(5)
109
110
111
112
114 The line usage report is confused by date changes. Use wtmpfix (see
115 fwtmp(1M)), with the /var/adm/wtmpx file as an argument, to correct
116 this situation.
117
118
119 During a single invocation of any given command, the acctcon, acctcon1,
120 and acctcon2 commands can process a maximum of:
121
122 o 6000 distinct session
123
124 o 1000 distinct terminal lines
125
126 o 2000 distinct login names
127
128
129 If at some point the actual number of any one of these items exceeds
130 the maximum, the command will not succeed.
131
132
133
134SunOS 5.11 22 Feb 1999 acctcon(1M)