Operating System - Linux
1828248 Members
2725 Online
109975 Solutions
New Discussion

Cpu, memory, I/O statistics with Mandrake ?

 
SOLVED
Go to solution
labadie_1
Honored Contributor

Cpu, memory, I/O statistics with Mandrake ?

Mandrake 9.2 on Armada 700

While Ksysguard shows some fine graphs (Cpu load, physical memory, swap memory...) I am looking for a tool with a finer granularity, that could show the top 10 Cpu users, the top 10 I/O processes on each "disk", the top 10 physical memory users...
and if this tool can record in a file, and then draw graphs later on various periods (day, week, month...) it would be great.

Thanks for any hint.

Gerard
9 REPLIES 9
Claudio Cilloni
Honored Contributor

Re: Cpu, memory, I/O statistics with Mandrake ?

the 'top' command can sort his output by various values. By default it sorts by cpu usage, pressing 'M' (not 'm') it sorts by memory usage.
'top' can write his output screen to file, but it is designed for an interactive use.

man page, as always, helps,

Ciao
Claudio
Mark Grant
Honored Contributor

Re: Cpu, memory, I/O statistics with Mandrake ?

You migh tneed to start looking at "sar". It doesn't produce nice graphs and stuff but you can produce ones yourself from the data it provides.
Never preceed any demonstration with anything more predictive than "watch this"
Huc_1
Honored Contributor

Re: Cpu, memory, I/O statistics with Mandrake ?

Yes both the above and a littel scriting to suite your needs.

So a mix of top, sa, acct, sa2 with a zest of scipting outputed to calc/spreadsheet !

lots, of work that but then you control it to suite your needs.

You probably already have sa2 running in crontab !

J-P
Smile I will feel the difference
Huc_1
Honored Contributor

Re: Cpu, memory, I/O statistics with Mandrake ?

Gerard,

I have just had a look at your profile I see OpenVms there..

So I suppose your are new or not to familiare with "unix/linux"?

there is also a tool I should have mention a bit like the following vms command

$show device/files disk$something:

On linux
the following allow you to see file in use

#lsof

Well just a bit like, cause every thing is a file under "unix/linux" lsof take a lot of option man page lsof is needed.

#lsof -u root

will show all the file open by root, to filter this to make it like "show dev/file"

#lsof | grep "8,3"

would show used files on /dev/sda3

I just wanted to mention this because when I started using "unix" I missed a few command to monitor/log system.

#lsof -u root | grep "8,1"

Show file open by user root on /dev/sda1

I have not realy found something like

$advice

Dont know if this help but just thought I would mention it

J-P
Smile I will feel the difference
Martin P.J. Zinser
Honored Contributor

Re: Cpu, memory, I/O statistics with Mandrake ?

Hello Gerard,

and just in case you do not have it yet, you can find sar et al at

http://perso.wanadoo.fr/sebastien.godard/

plus other "monitoring" links at

http://linuxperf.nl.linux.org/links.html

Greetings, Martin

Steven E. Protter
Exalted Contributor

Re: Cpu, memory, I/O statistics with Mandrake ?

I'm attaching you a HP-UX script that can be ported to help you gather some data.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
labadie_1
Honored Contributor

Re: Cpu, memory, I/O statistics with Mandrake ?

Thanks to all

I do not find sar, sa2 or lsof with my mandrake 9.2, but I have not looked at the other 5 CD.

A related question: does lsof or another tool give statistics similar as, for Vms, the following link
http://h18000.www1.hp.com/support/asktima/operating_systems/CHAMP_SRC010730002768.html

(if this has a meaning of course, under Linux)
so for a process, the total of reads and writes on all files opened by this process

Regards

Gerard
Huc_1
Honored Contributor
Solution

Re: Cpu, memory, I/O statistics with Mandrake ?

Gerard

A good way to find sa, sa2, lsof is to use
ex:
#locate sa

this should find sa for you if its there (you may need to run /usr/sbin/makewhatis the first time, but this is has probably already run).

As for SDA there is nothing that I know of that is an exact match for this is use a set of tools

for ex: to see what mozilla is doing

#ps -ef | grep -v "grep" | grep "mozilla"
hucjp 12790 12755 0 18:30 pts/0 00:01:40 /usr/lib/mozilla-1.2.1/mozilla-bin -UILocale en-US

from that I take the pid to look at mapping of this process in memory like this

#ls -l /proc/12790

this show ressource used by proc 12790 in a sort of structured fashion on theses file and directory you can do operation cat, ls, file
you can even write if you have the priviledge
!! A word of caution here You must know what your doing here certainly if you are root !!

ex: but cat, ls, file are read only so no prob here

#cat /proc/12790/status
#cat /proc/12790/cmdline

In fact /proc is used by /usr/sbin/lsof top and such ...

So you can in fact do it with out lsof, but lsof is a good tool and easy, once you have worked you way down the man page.

hope this get you going

J-P
Smile I will feel the difference
Ragu_1
Regular Advisor

Re: Cpu, memory, I/O statistics with Mandrake ?

Have you tried out `gkrellm' ? There are many plugins for the krell. The graphic representation is quite informative and fine granularity can be obtained by sizing the grid scale. Stunning indeed!
Share and share alike