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:
Genoid - Android Theme for UbuntuIt’s theme for android lovers who use Gnome Environment,it’s called “Genoid”, not much to say,i just try replicated Android Theme to used on Gnome wit… Read More
setup Static IP Address in Ubuntu 10.10Setup Static IP Address If you want to setup a Static IP Address in your system , Modify the file /etc/network/interfaces. If your First Ethernet In… Read More
How to Recover/ Hack / Reset Windows NT/2000/XT/Vista Password Using Ubuntu Live CD You can easily hack Windows Password with Ubuntu. You may need to reset an admin password in windows (NT/2000/XT/Vista) for many reasons, such as y… Read More
Install PHP GD (PHP Graphics) support in Ubuntu / DebianPHP is not limited to creating just HTML output. It can also be used to create and manipulate image files in a variety of different image formats, inc… Read More
Howto find out Your Ubuntu / Debian is 32 bit or 64 bitSome times you need to know , Your Ubuntu / Debian is 32 bit or 64 bit, You can use the following command open a terminal and type $ uname -m Y… Read More
0 comments:
Post a Comment