Monitor user activity with acct tool on ubuntu 20. 04

Monitor User Activity With acct Tool on Ubuntu 20.04

Introduction

acct is an open-source application that allows tracking user’s activities on the system. It works in the background and monitors all user activity on the system and the resources used. It is often used at companies and must work continuously on servers. It is very useful because it provides resources used by Apache, MySQL, FTP,…

Now we’re gonna introduce you to monitoring user activity with the acct tool on Ubuntu 20.04. Hope you understand.

Installing acct package

Run the apt command to install:

$ sudo apt install acct

Output:

Monitor user activity with acct tool on ubuntu 20. 04 25

Display
Sponsored
user connection time statistics

The ac command will display from the current wtmp file:

$ ac

Output:

Monitor user activity with acct tool on ubuntu 20. 04 26

Display statistics of total login time day-wise

Run with -d option:

$ ac -d

Output:

Monitor user activity with acct tool on ubuntu 20. 04 27

Display total login time of each user

Run with -p option:

Sponsored
$ ac -p

Output:

Monitor user activity with acct tool on ubuntu 20. 04 28

Show personal user time

For example, I will statistic time of user “ubuntu”:

$ ac ubuntu

Output:

Monitor user activity with acct tool on ubuntu 20. 04 29

Show day-wise login time of specified user

For example, I will show of user “ubuntu”:

$ ac -d ubuntu

Output:

Monitor user activity with acct tool on ubuntu 20. 04 30

Conclusion

We just introduced you to how to monitor user activity with the acct tool on Ubuntu 20.04.

Thank you for reading!

Karim buzdar

Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications including CCNA RS, SCP, and ACE. As an IT engineer and technical author, he writes for various websites.


Discover more from Ubuntu-Server.com

Subscribe to get the latest posts sent to your email.

Comments

No comments yet. Why don’t you start the discussion?

    Leave a Reply