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:
How to Use more than 3GB RAM on 32-bit UbuntuCurrently It seems that the current 32 bit editions of Ubuntu can only take advantage of 3GB (sometimes a little more) of physical memory. Desktops an… Read More
Howto Install E17 Enlightenment Desktop in UbuntuEnlightenment, commonly referred to as e, is a open source software X window manager primarily for Unix-like computers. Enlightenment focuses on pushi… Read More
How to Convert a .nrg (Nero) file to a .iso file in UbuntuIf you want to convert .nrg file to .iso file you can use nrg2iso tool to create this. nrg2iso is a program that extracts ISO9660 data from Nero “.nrg… Read More
How to get Flash working in Opera 9.20 in ubuntuOpera is a cross-platform web browser and Internet suite which handles common internet-related tasks including visiting web sites, sending and receivi… Read More
How to Rip DVD audio to mp3 or ogg in ubuntuYou can extract sound from a DVD, one track at a time or a chapter at a time. Some simple command line examples should suffice to demonstrate how this… Read More
0 comments:
Post a Comment