1829447 Members
1689 Online
109992 Solutions
New Discussion

Re: Linux box

 
Choppa Kumar
Occasional Advisor

Linux box

Can some one help me how to monitor memory utilisation by services wise
4 REPLIES 4
Marco Di Ianni
Frequent Advisor

Re: Linux box

From shell you can use 'top' command
or read /proc/meminfo
From Grafical Interface there are many tools for monitor a linux box, one of these is gkrellm (http://www.gkrellm.net/). This tool monitor CPU, MEM, FileSystem, Network, etc....

By!
Muthukumar_5
Honored Contributor

Re: Linux box

We can memory informations with top for most using process? It is also containing the service informations too.

Some sort of scripting to pipe the top output and get only service memory usage informations.

As like,

top -d 1 -n 100 -f /tmp/topoutput

It will contain 100 process informations there.
Easy to suggest when don't know about the problem!
Rick Garland
Honored Contributor

Re: Linux box

If you have RH and installed the System Tools/System Monitor, this will also give you the info you seek.
Johannes Krackowizer_1
Valued Contributor

Re: Linux box

For automateted monitoring use a cron-script like this:

top -n 1 -b -p `pidof -s PROCESSNAME` | tail -2 | mail -s "Top Information for process PROCESSNAME" your@e-mail.address

top -n 1 -b -p blabla
---------------------
-n 1: top runs once then exits
-b: for dumb terminals, don't use escaps (for colouring terminal for example)
-p Number: wich PID to show (this switch could be used up to 20 times per top
`pidof -s PROCNAME`: searches for the first process with the name PROCNAME and returns its PID


tail -2
-------

-2: show the last 2 lines of output. if you are using more then one -p argument at top, you should increase the value to -3, -4, ...

mail -s "blabla" e-mail
-----------------------

-s "blabla": the subject for the e-mail
e-mail: your e-mail address
"First off, I'd suggest printing out a copy of the GNU coding standards, and NOT read it. Burn them, it's a great symbolic gesture." (Linus Torvalds)