Installation guide
You can compare the last column to the fourth column to determine if a
line is bad.
The following example produces a sample /var/adm/acct/reboots file.
It writes records to a file in ASCII overall-record format, which specifies a
starting time, an ending time, the number of restarts, and the number of
date changes.
# acctcon1 −o overall_file < /var/adm/wtmp | more overall_file
from Thu Jan 13 17:20:12 1994 EDT
to Fri Jan 14 09:56:42 1994 EDT
2 date changes
2 acctg off
0 run-level S
2 system boot
2 acctg on
1 acctcon1
The overall-record format includes the from and to fields, which specify
the time that the last accounting report was generated and the time of the
current report. These fields are followed by a list of records from the
/var/adm/wtmp file.
12.4.6 The acctcon2 Command
The runacct shell script invokes the acctcon2 command to convert the
/var/adm/acct/nite/ctmp connect session file, which is produced by the
acctcon1 command, from ASCII format into binary format.
12.4.7 The prctmp Shell Script
The prctmp shell script writes column headings on a connect session
database file that has the utmp.h header file structure, such as the
/var/adm/acct/nite/ctmp file, which is created by the acctcon1
command. The prctmp shell script has the following syntax:
/usr/sbin/acct/prctmp
[ filename]
Refer to the prctmp(8) reference page for more information.
12.4.8 The lastlogin Shell Script
The lastlogin shell script writes the last date that a user logged in to the
system to the /var/adm/acct/sum/loginlog file. The script invokes the
printpw command to access the login names and user identification
numbers in the /etc/passwd file.
Administering the System Accounting Services 12–19