LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to measure and get CPU & I/O utilization? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-measure-and-get-cpu-and-i-o-utilization-555751/)

3ttt 05-22-2007 04:11 AM

How to measure and get CPU & I/O utilization?
 
Hi Everybody :tisk:

*Can anybody explain me how to get %user, %nice, %sys and %iowait (in the way iostat) from /proc/stat?

e.g. "cat /proc/stat" from SuSe Linux 2.6.13-15-default
cpu 36074 365 31552 298360 28847 971 144 0
cpu0 36074 365 31552 298360 28847 971 144 0
intr 1270582 990729 2952 0 6737 1 1 52 1 2 10113 519 182058 115 0 43644 33658 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ctxt 1635334
btime 1179832166
processes 9658
procs_running 3
procs_blocked 0

*Is it possible to compute "CPU Utilization" as
CPU Utilization = %user + %sys ?

* What does %nice represent for?

*Is it possible to imply "%iowait" for "I/O utilization"?
If not how to measure and to get the value of "I/O utilization" for the whole system, which include mouse/storages (local and perepheral)/USB devices/CDRom/...?

Thank you very much for your help.

3TTT

biniou 05-22-2007 04:47 AM

Hello !

You can use "top" in a console ...

Regards,
Biniou

3ttt 05-22-2007 05:05 AM

Thanks your reply, Biniou :-)

yes, there are many tools to monitor such top, iostat, mpstat, ...
However I really want to know how to get "CPU utilization" and "I/O utilization" for the whole system?


All times are GMT -5. The time now is 01:00 AM.