If you Enable process accounting in your system, it will help you to keep track of your user processes. It is very useful for System administrators for keeping log of your users.
in Ubuntu Process accounting can be done by installing utility called Acct
$ sudo apt-get install acct
$ sudo touch /var/log/pacct - make a log file for process accounting
$ sudo accton /var/log/pacct - enable process accounting on
or
$ /etc/init.d/acct start
For viewing the Process Information Use the following command
Display details about users' connect time
$ ac
ac command displays a report of connect time in hours based on the logins/logouts.
ac - Print total connection time.
ac -dp - display daily (-d) connection totals by person (-p)
Display information about previously executed user commands
$ sudo lastcomm john - will display the commands executed by user john
$ sudo lastcomm rm - search and display log by command rm
$ sudo lastcomm pts/1 - search and display log by terminal name
Print Accounting statistics
$ sudo sa
sa command will display information about previously executed commands, The information can also be summarized on a per-user basis
The output fields are labeled as follows:
cpu sum of system and user time in cpu seconds
re “real time” in cpu seconds
k cpu-time averaged core usage, in 1k units
avio average number of I/O operations per execution
tio total number of I/O operations
k*sec cpu storage integral (kilo-core seconds)
u user cpu time in cpu seconds
s system time in cpu seconds
Display ouput per user
$ sudo sa -u
Display the number of processes and number of CPU minutes on a per-user basis
$sudo sa -m
By using sa command and looking at re, k, cp/cpu time you can find out suspicious activity or user and command who is eating your CPU and Memory . An increase in CPU/memory usage is indication of problem.
see more here http://www.gnu.org/software/acct/manual/html_mono/accounting.html
Enable Process Accounting in Ubuntu: Acct will log user process
Related Posts:
Howto Enable and Disable Ubuntu Root PasswordUbuntu is one of the few Linux distributions out there that will not enable the root account.If you want to do something with root permission on the c… Read More
Howto get iOS 4 (iPhone OS) to sync with rhythmbox in ubuntu 10.04 (Lucid)Well with the release of iOS 4, many Ubuntu users are complaining of incompatibility with between rhythmbox and the new update. Here is a simple way t… Read More
Install Adobe Flash Player 10 in Ubuntu 8.04 (32 bit and 64 bit Hardy heron)15th Oct 2008 adobe released Flash Player version 10.If you want to know what is new in adobe flash player 10 check this.In this tutorial we will see … Read More
Install wammu : Mobile phone Manager for Ubuntu / Debian Linuxknow everybody is looking for a mobile phone manager for Linux. text based gammu is there, but it is not user friendly . wammu is a graphical front en… Read More
How to release and renew a DHCP IP address in Ubuntu 10.04 (Lucid)/9.10 (Karmic)/9.04(Jaunty)This tutorial will explain how to release and renew a DHCP IP address in Ubuntu 10.04 (Lucid)/9.10 (Karmic)/9.04(Jaunty) Release a DHCP ip address in … Read More
0 comments:
Post a Comment