Monitoring user activity is part of the system administrator’s duties and an essential task in tracking how system resources are being used. The
w command tells the system administrator who is logged in, where he is logged in, and what he is doing. No one can hide from the super user. The
w command can be followed by a specific user’s name to show only that user.
ac command provides information about the total connect time of a user measured in hours. It accesses the
/var/log/wtmp file for the source of its information. The
ac command proves most useful in shell scripts to generate reports on operating system usage for management review. Note that to use the
ac command you must install the
acct package ...