Skip to main content

Posts

Showing posts from March, 2013

Secure nginx with Let's Encrypt on Ubuntu 18.04

Monitoring User Activity with psacct On Linux

One of the big advantages of using psacct on your server is that it provides excellent logging for activities of applications and users.





Installation :-

for Redhat, Fedora, CentOs

yum install psacct
service psacct start

For Ubuntu Debian

apt-get install acct
service acct start



How to use psacct :

The connect time in hours is based on logins and logouts. 

root@Vishalvyas:~#  ac -p
        vishal                        9.12
        Ashish                      20.60
        Vipul                        15.80
        Anil                          17.33
        Akshay                     10.92
        pritesh                      4.10
        chirag                       8.75
        total                         168.95

Which user has executed what command on system :

root@Vishalvyas:~# lastcomm vishal

Process        Flag    Username  Terminal    Time

vim                          X vishal        pts/2         0.01 secs Tue Mar  5 10:16
su               S           vishal            pts/2         0.00 secs Tu…