Performs connect-time accounting.
acctcon1 [ -l File ] [ -o File ] [ -p ] [ -t ]
acctcon2
The acctcon1 command is called by the runacct command to convert a sequence of login and logoff records (read from standard input) to a sequence of login session records (written to standard output). Input is normally redirected from the /var/adm/wtmp file. The input file can be a file other than /var/adm/wtmp, as long as it is in the correct format.
The acctcon1 command displays the following in ASCII format:
The acctcon1 command also maintains a list of ports on which users are logged in. When the acctcon1 command reaches the end of its input, the command writes a session record for each port that still appears to be active. Unless the -t flag is used, the acctcon1 command assumes that input is a current file and uses the current time as the ending time for each session still in progress.
The summary file generated with the -l flag helps an administrator track line usage and identify bad lines. All hang-ups, terminations of the login command, and terminations of the login shell cause the system to write logoff records. Consequently, the number of logoffs is often much higher than the number of sessions.
The acctcon2 command, also called by the runacct command, converts a sequence of login session records produced by the acctcon1 command into connect-time total accounting records. These records are merged with other total accounting records by the acctmerg command to produce a daily report.
Note: The following flags are used with the acctcon1 command.
Access Control: These commands should grant execute (x) access only to members of the adm group.
acctcon1 -t -l/var/adm/acct/nite/lineuse \ -o/var/adm/acct/nite/reboots \ </var/adm/wtmp > /var/adm/logsess
The login session reports show an ending time that corresponds with the last time input was provided. Two reports are generated: a line-usage summary file named /var/adm/acct/nite/lineuse, an overall record for the accounting period, reported in the /var/adm/acct/nite/reboots file.
acctcon2 < /var/adm/acct/nite/ctmp \ > /var/adm/logacct
The acctmerg command, fwtmp, acctwtmp, or wtmpfix command, init command, login command, runacct command.
The acct file format, utmp, wtmp, failedlogin file format.
The acct subroutine.
For more information about the Accounting System, the preparation of daily and monthly reports, and the accounting files, see the Accounting Overview in AIX 5L Version 5.1 System Management Concepts: Operating System and Devices.
Setting Up an Accounting System in AIX 5L Version 5.1 System Management Guide: Operating System and Devices describes the steps you must take to establish an accounting system.