{"id":13259,"date":"2022-01-03T15:05:12","date_gmt":"2022-01-03T15:05:12","guid":{"rendered":"https:\/\/linuxways.net\/?p=13259"},"modified":"2022-01-03T15:05:12","modified_gmt":"2022-01-03T15:05:12","slug":"monitor-user-activity-with-acct-tool-on-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/ubuntu\/monitor-user-activity-with-acct-tool-on-ubuntu-20-04\/","title":{"rendered":"Monitor User Activity With acct Tool on Ubuntu 20.04"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>acct is an open-source application that allows tracking user&#8217;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,&#8230;<\/p>\n<p>Now we&#8217;re gonna introduce you to monitoring user activity with the acct tool on Ubuntu 20.04. Hope you understand.<\/p>\n<h2>Installing acct package<\/h2>\n<p>Run the apt command to install:<\/p>\n<pre>$ sudo apt install acct<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"968\" height=\"531\" class=\"wp-image-13260\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-443.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-443.png 968w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-443-300x165.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-443-768x421.png 768w\" sizes=\"auto, (max-width: 968px) 100vw, 968px\" \/><\/p>\n<h2>Display user connection time statistics<\/h2>\n<p>The ac command will display from the current <strong>wtmp<\/strong> file:<\/p>\n<pre>$ ac<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"970\" height=\"75\" class=\"wp-image-13261\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-444.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-444.png 970w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-444-300x23.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-444-768x59.png 768w\" sizes=\"auto, (max-width: 970px) 100vw, 970px\" \/><\/p>\n<h2>Display statistics of total login time day-wise<\/h2>\n<p>Run with <strong>-d<\/strong> option:<\/p>\n<pre>$ ac -d<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"968\" height=\"364\" class=\"wp-image-13262\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-445.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-445.png 968w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-445-300x113.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-445-768x289.png 768w\" sizes=\"auto, (max-width: 968px) 100vw, 968px\" \/><\/p>\n<h2>Display total login time of each user<\/h2>\n<p>Run with <strong>-p<\/strong> option:<\/p>\n<pre>$ ac -p<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"136\" class=\"wp-image-13263\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-446.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-446.png 969w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-446-300x42.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-446-768x108.png 768w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/><\/p>\n<h2>Show personal user time<\/h2>\n<p>For example, I will statistic time of user &#8220;ubuntu&#8221;:<\/p>\n<pre>$ ac ubuntu<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"74\" class=\"wp-image-13264\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-447.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-447.png 969w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-447-300x23.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-447-768x59.png 768w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/><\/p>\n<h2>Show day-wise login time of specified user<\/h2>\n<p>For example, I will show of user &#8220;ubuntu&#8221;:<\/p>\n<pre>$ ac -d ubuntu<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"326\" class=\"wp-image-13265\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-448.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-448.png 969w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-448-300x101.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-448-768x258.png 768w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/><\/p>\n<h2>Conclusion<\/h2>\n<p>We just introduced you to how to monitor user activity with the acct tool on Ubuntu 20.04.<\/p>\n<p>Thank you for reading!<\/p>","protected":false},"excerpt":{"rendered":"<p>Introduction acct is an open-source application that allows tracking user&#8217;s activities on the system. It works in the background and monitors all user activity on the system and&hellip;<\/p>","protected":false},"author":1,"featured_media":13543,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[797,100,155],"class_list":["post-13259","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ubuntu","tag-acct-tool","tag-ubuntu-20-04","tag-user"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/13259","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=13259"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/13259\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/13543"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=13259"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=13259"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=13259"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}