Displaying connect time usage for accounting

You can display the connect time of all users, of individual users, and by individual login with the ac command.

The ac command extracts login information from the /var/adm/wtmp file, so this file must exist. 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; you can display connect-time information from these files by specifying them with the -w flag. For more information about the ac command, see ac.

To display the total connect time for all users, type:
/usr/sbin/acct/ac
This command displays a single decimal number that is the sum total connect time, in minutes, for all users who have logged in during the life of the current wtmp file.
To display the total connect time for one or more particular users, type:
/usr/sbin/acct/ac User1 User2 ...
This command displays a single decimal number that is the sum total connect time, in minutes, for the user or users you specified for any logins during the life of the current wtmp file.
To display the connect time by individual user plus the total connect time, type:
/usr/sbin/acct/ac -p User1 User2 ...
This command displays as a decimal number for each user specified equal to the total connect time, in minutes, for that user during the life of the current wtmp file. It also displays a decimal number that is the sum total connect time for all the users specified. If no user is specified in the command, the list includes all users who have logged in during the life of the wtmp file.