Prints connect-time records.
The ac command prints the total connect time for all users or the connect time for specified users. Records are based on who logged in during the life of the current wtmp data file.
Connect-time records are created by the init and the login programs and are collected in the /var/adm/wtmp file, if that file exists. The root user or a member of the adm group should create the /var/adm/wtmp file with an initial record length of 0 (zero). Records should be processed periodically to keep the file from becoming too full. If the file has not been created, the following error message is returned:
No /var/adm/wtmp
If the file becomes too full, additional wtmp files are created. These files can be printed, if specified with the -w flag.
Item | Description |
---|---|
-d | Creates a printout for each day, from midnight to midnight. |
-p | Prints connect-time totals by individual login. Without this flag, a total for the time period is printed. |
-w File | Specifies a wtmp file other than the /var/adm/wtmp file. |
Access Control: This command should grant execute (x) access to all users.
/usr/sbin/acct/ac
/usr/sbin/acct/ac smith jones
/usr/sbin/acct/ac -p smith jones
Item | Description |
---|---|
/usr/sbin/acct/ac | Contains the ac command. |
/var/adm/wtmp | Contains the active data file for the collection of connect-time records. |