SAC(8)

NAME
sac - system accounting.

SYNOPSIS
sac [ -dpah ] [ -w wtmp ] [ userlist ]

DESCRIPTION
Sac is a system administration utility, based on the orginal BSD ac program, to read the wtmp log and produce more human readable system usage information than provided by last. Several features not found in the BSD version of this program have been added. Sac like ac produces three different types of output: Total usage in number of login hours since wtmp was created (default), login usage per day (-d option), total usage per user (-p option). The output of these three are modified by supplying either the average (-a) option and/or the hourly profile (-h) option. Selecting the average option for total usage, gives a average number of login hours per day since the creation of the wtmp file. For the daily option it prints the total # of logins for the day and the average login time per login. For the per person display it displays the total number of logins the user has made and the average amount of time spent on each login. Selecting the hourly profile option for total usage gives a visual display of the percentage of login time spent per hour for all the logins on the system. For the daily option it prints the same visual display for each day. For the per person display it displays the hourly breakdown of login time the user spends on the system (this can be pretty interesting). The optional userlist is only valid when the per user accouting (-p) has been selected. If the userlist is given sac will only print the login information for those users specified on the command line. This is usefull for hourly profiling only specific users.

OPTIONS
Sac understands the following command line switches:

-w wtmp
    Select a different input file instead of the default (/etc/wtmp).

-d  List login time per day instead of the default total time.

-p  List login time per user instead of the default total time.

-a  Print average information.

-h  Print hourly profile information.

FILES
/etc/wtmp login database.

AUTHOR
Steve Baker (ice@thunder.indstate.edu)

BUGS
The documentation for wtmp is lacking. It's not clear at all what all gets put in wtmp or the significance of any of it. Good luck getting this to work on Solaris machines. Sac is unable to handle changes in time (which may or may not be logged to wtmp). Changes in time result in too much login time or not enough login time being reported if there were users logged in during the time change. Negative login time is at least ignored. Too much accounting results in big brother.

SEE ALSO
last(1)