?
Solved

Linux processes monitor and utilization graph

Posted on 2011-10-17
15
Medium Priority
?
333 Views
Last Modified: 2012-05-12
HI
as far i belived there is not any thing on the self to  monitor processes and graph their utilization... ..

but may be i am wrong.. so please advise me .. if im wrong.
what i am after is :

i want to monitor : Process and their utilization and make a graph. its simple word make a bench mark system

example : when i isntall  a brand new os with some services (anywhintg)

the script or  program with start to monitor all the process or atlest first 10 high cpu and memory base process . and will create  a graph for that.

the reason is : suppose one process "mysqld" is normally using 10% cpu.. now its jumped to 80% cpu.. now we know where is the issue. from it will tell us from when it started ..

example : we us Vritualbox.. so we have 3 vms ..
now if we monitor those 3 vm whose cpu utilization is 30%., now if some one jumped to 80% , we know whic is problem and also we will be able to tell from when .. by looking at graph..


is there any script or cacti graph or n agios  .. or anything out there to do this task ??


or i might start to think to build some thing from scratch ..

thanks for your help ..
0
Comment
Question by:fosiul01
  • 6
  • 5
  • 2
  • +2
15 Comments
 
LVL 9

Assisted Solution

by:raysonlee
raysonlee earned 400 total points
ID: 36978534
munin http://munin-monitoring.org/wiki/faq may do exactly what you want.
0
 
LVL 9

Expert Comment

by:raysonlee
ID: 36978541
sysstat, atop and many more...
0
 
LVL 3

Expert Comment

by:sugunakar
ID: 36978546
you can install munin and write a custom plugin to get the desired output.

OR you can enable sar in your system and store the historical data with you as well.
you can use ksar  or the other tool listed at below which would convert sar output to rrdgraphs.
http://www.trickytools.com/php/sar2rrd.php
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 29

Author Comment

by:fosiul01
ID: 36978582
Hi thanks for response .. but let me try to explain again

i know what those tools does(sysstat, atop ) and i used all off them..  
lets starts from  bellow commands

 ps auxf | sort -nr -k 4 | head -10
root      2256 14.5  6.9 877704 428720 ?       Sl   09:12  13:51  \_ /usr/lib/virtualbox/VirtualBox --comment xxxx --startvm e30d01f7-3f4c-495a-a873-026979b67c1a --no-startvm-errormsgbox
root      2354 10.5  5.5 789692 341192 ?       Sl   09:13   9:50  \_ /usr/lib/virtualbox/VirtualBox --comment xxxx --startvm 7bf80cef-c6b7-4370-865b-46beeb638d5d --no-startvm-errormsgbox
root      2283 10.5  3.0 646912 187692 ?       Sl   09:12  10:01  \_ /usr/lib/virtualbox/VirtualBox --comment xxx --startvm 72e2e333-a114-482c-aa33-9b23e7c469ff --no-startvm-errormsgbox
root      1316  1.1  0.9 143508 56180 tty7     Ss+  09:11   1:04      \_ /usr/bin/Xorg :0 -br -verbose -audit 0 -novtswitch -auth /var/run/gdm3/auth-for-Debian-gdm-3sqzK2/database -nolisten tcp vt7
root      2207  0.8  0.6 493216 39596 ?        Sl   09:11   0:47 /usr/lib/virtualbox/VirtualBox
root      2169  0.0  0.3 222084 20480 ?        S    09:11   0:00              \_ python /usr/bin/system-config-printer-applet
root      2147  0.0  0.3 440268 20360 ?        S    09:11   0:01              \_ nautilus
root      2134  0.0  0.3 372280 22824 ?        S    09:11   0:02              \_ gnome-panel
root      2345  0.0  0.2 228332 13476 ?        Sl   09:13   0:02 gnome-terminal
root      2162  0.0  0.2 290488 15356 ?        S    09:11   0:00 /usr/lib/gnome-applets/mixer_applet2 --oaf-activate-iid=OAFIID:GNOME_MixerApplet_Factory --oaf-ior-fd=18
root@Vbox1:~#

as you see first 3 process consume most memory and cpu.

now i need to keep  on eye those process also if any new process starts to use more cpu and ram ..  ( and graph is + point)

with a perl script + mysql i will be able to do what i want ..

but i wanted to see if there is any tools or linxu command which i dont know might be help to complete my task .



0
 
LVL 3

Expert Comment

by:simoesp
ID: 36978638
if you want to report you can try mrtg but if you want monitor memory usage... cpu usage.. you can try monit its simple to use and can run tasks when it reaches certain parameters
0
 
LVL 29

Author Comment

by:fosiul01
ID: 36978660
@simoesp

i am not saying... totall memory or cpu uses..  

i am after system wide cpu and memory uses per p rocess..

0
 
LVL 3

Expert Comment

by:simoesp
ID: 36978676
0
 
LVL 29

Author Comment

by:fosiul01
ID: 36978691
@simoesp

could you be more specifiq please..

I use nagios  and cacti ..  how ever
could you please provide me the document of monit where it saying it allow to monitor per process of a system ??
0
 
LVL 3

Expert Comment

by:simoesp
ID: 36978701
0
 
LVL 3

Expert Comment

by:simoesp
ID: 36978723
you can also try munin

it does the mrtg for the process etc..

http://munin-monitoring.org/
0
 
LVL 29

Author Comment

by:fosiul01
ID: 36978735
@simoesp

"Monit can examine how much system resources a service is using. This test can only be used within a system or process service entry in the Monit control file."

can it be any resouces ??

example :
root      2256 14.5  6.9 877704 428720 ?       Sl   09:12  13:51  \_ /usr/lib/virtualbox/VirtualBox --comment xxxx --startvm e30d01f7-3f4c-495a-a873-026979b67c1a --no-startvm-errormsgbox
root      2354 10.5  5.5 789692 341192 ?       Sl   09:13   9:50  \_ /usr/lib/virtualbox/VirtualBox --comment xxxx --startvm 7bf80cef-c6b7-4370-865b-46beeb638d5d --no-startvm-errormsgbox
root      2283 10.5  3.0 646912 187692 ?       Sl   09:12  10:01  \_ /usr/lib/virtualbox/VirtualBox --comment xxx --startvm 72e2e333-a114-482c-aa33-9b23e7c469ff --no-startvm-errormsgbox

those 3 resource are not any default linux resource  like (mysqld,apache2 or smpd)..

so how some one will mention those services  in monit control panel >??


0
 
LVL 3

Accepted Solution

by:
simoesp earned 1600 total points
ID: 36978739
see if this works for you

http://binaryclouds.de/?p=133
0
 
LVL 29

Author Comment

by:fosiul01
ID: 36978748
thanks  for providing that , although I am trying to build some thing for universal sytem..
but that script will do my job for time being ..

i will have to do some workway round ..

may be will have to ask few perl question to get my answer ..



0
 
LVL 3

Expert Comment

by:simoesp
ID: 36979198
good luck on perl :)
0
 
LVL 5

Expert Comment

by:Sebastian Talmon
ID: 36997906

For nagios, you could use the plugin "check_mk" as an agent-based solution.

You could then define in the nagios server (check_mk config) for what processes you need full performance data (processor and memory usage, and also count of running processes)

so you could specify mysql, VirtualBox, ... as processes to monitor.

check_mk is compatible with the graphing solution pnp4nagios, so you could store the performance data as RRD
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month9 days, 17 hours left to enroll

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question