×


Monitor User Activity With acct Tool on Ubuntu 20.04

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 and so on.

Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform related Server Monitoring queries.

In this context, we shall look into how to monitor user activity with the acct tool on Ubuntu 20.04.


How to install acct package on Ubuntu ?

You can simply run the below apt command to install the acct package:

$ sudo apt install acct


How to display user connection time statistics on Ubuntu 20.04 ?

The ac command will display from the current wtmp file:

$ ac


How to display statistics of total login time day-wise on Ubuntu ?

You can Run the below command with -d option:

$ ac -d


How to display total login time of each user on Ubuntu ?

You can Run the below command with -p option:

$ ac -p


How to Show personal user time on Ubuntu ?

For example, We will statistic time of user "ubuntu":

$ ac ubuntu


How to Show day-wise login time of specified user on Ubuntu ?

For example, We will show of user "ubuntu":

$ ac -d ubuntu


[Need help in fixing Linux system issues ? We can help you. ]


Conclusion

This article covers how to monitor user activity with the acct tool on Ubuntu 20.04. In fact, Acct can monitor the user activity & getting the information about the user performance. It provides the information about last commands executed by users, user logins / logouts details in hours by day-wise, system activity information,& individuals user information.


How to install acct on ubuntu ?

1. Update the System:

$ apt-get update

2. Install the psacct or acct on system:

$ apt-get install acct

3. Check the acct version:

$ ac --version