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 LinuxAPT, 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:
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. ]