ACCTCON(8) | Maintenance Commands and Procedures | ACCTCON(8) |
acctcon, acctcon1, acctcon2 - connect-time accounting
/usr/lib/acct/acctcon [-l lineuse] [-o reboot]
/usr/lib/acct/acctcon1 [-p] [-t] [-l lineuse] [-o reboot]
/usr/lib/acct/acctcon2
acctcon converts a sequence of login/logoff records to total accounting records (see the tacct format in acct.h(3HEAD)). The login/logoff records are read from standard input. The file /var/adm/wtmpx is usually the source of the login/logoff records; however, because it might contain corrupted records or system date changes, it should first be fixed using wtmpfix. The fixed version of file /var/adm/wtmpx can then be redirected to acctcon. The tacct records are written to standard output.
acctcon is a combination of the programs acctcon1 and acctcon2. acctcon1 converts login/logoff records, taken from the fixed /var/adm/wtmpx file, to ASCII output. acctcon2 reads the ASCII records produced by acctcon1 and converts them to tacct records. acctcon1 can be used with the -l and -o options, described below, as well as with the -p and -t options.
-p
-t
-l lineuse
-o reboot
Example 1 Using the acctcon command.
The acctcon command is typically used as follows:
example% acctcon -l lineuse -o reboots < tmpwtmp > ctacct
The acctcon1 and acctcon2 commands are typically used as follows:
example% acctcon1 -l lineuse -o reboots < tmpwtmp | sort +1n +2 > ctmp example% acctcon2 < ctmp > ctacct
/var/adm/wtmpx
acctcom(1), login(1), acct(2), acct.h(3HEAD), utmpx(5), attributes(7), acct(8), acctcms(8), acctmerg(8), acctprc(8), acctsh(8), fwtmp(8), init(8), runacct(8)
The line usage report is confused by date changes. Use wtmpfix (see fwtmp(8)), with the /var/adm/wtmpx file as an argument, to correct this situation.
During a single invocation of any given command, the acctcon, acctcon1, and acctcon2 commands can process a maximum of:
If at some point the actual number of any one of these items exceeds the maximum, the command will not succeed.
February 22, 1999 | OmniOS |