psacct or acct both are open source application for monitoring users activities on the system. These applications runs in the background and keeps track of each users activity on your system as well as what resources are being consumed.
I personally used this program in our company, we have development team where our developers continuously work on servers. So, this is one of best program to keep a eye on them. This program provides an excellent way to monitor what users are doing, what commands are they firing, how much resources are being consumed by them, how long users are active on the system. Another great feature of this program is it gives total resources consumed by services like Apache, MySQL, FTP,SSH etc.
I think this is one of the great and must needed application for every Linux/Unix System Administrators, who wanted to keep a track of user activities on their servers/systems.
The psacct or acct package provides several features for monitoring process activities.
- ac command prints the statistics of user logins/logouts (connect time) in hours.
- lastcomm command prints the information of previously executed commands of user.
- accton commands is used to turn on/off process for accounting.
- sa command summarizes information of previously executed commands.
- last and lastb commands show listing of last logged in users.
Installing psacct or acct Packages
psacct or acct both are similar packages and there is not much difference between them, but the psacct package only available for rpm based distributions such as RHEL, CentOS and Fedora, whereas acct package available for distributions like Ubuntu, Debian and Linux Mint.
To install psacct package under rpm based distributions issue the following yum command.
To install acct package using apt-get command under Ubuntu / Debian / Linux Mint.
Starting psacct or acct service
By default psacct service is in disabled mode and you need to start it manually under RHEL/CentOS/Fedora systems. Use the following command to check the status of service.
You see the status showing as disabled, so let’s start it manually using the following both commands. These two commands will create a /var/account/pacct file and start services.
After starting service, check the status again, you will get status as enabled as shown below.
Under Ubuntu, Debian and Mint service is started automatically, you don’t need to start it again.
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
► Read more: http://adf.ly/1n7SIB
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
No comments:
Post a Comment