Monitor users activity on Linux system with psacct

We will look into tracking users activities on Linux – CentOS or REL system in particular. psacct is application for monitoring users activities on the system. In many cases you would like to know what was done on the system, while someone else working on it.
1. Lest install psacct utilitie

yum install psacct

2. Lets make sure service is started and running

systemctl enable psacct
systemctl start psacct

3. display statistics about users connect time

ac

4. display totals for each day

ac -d

5. display time totals for each user

ac -p

6. find out which command users executed last

lastcomm myuser