LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Getting CPU usage (https://www.linuxquestions.org/questions/programming-9/getting-cpu-usage-266652/)

Nerox 12-15-2004 08:48 AM

Getting CPU usage
 
Hi, Does anyone know how to get the CPU usage by the entire system? May be it is written in /proc.

Thanks in advance.

MylesCLin 12-15-2004 10:00 AM

Try running 'gkrellm'

nedian123 12-15-2004 11:38 AM

HI,

$> xosview +cpu &

This is for RedHat Linux 9

Nerox 12-15-2004 02:00 PM

I meant a C function or something similar, not a program, because i want to call it in my program. Thanks

Tinkster 12-15-2004 04:23 PM

something like in /proc/loadavg ?


Cheers,
Tink

Nerox 12-16-2004 02:33 AM

Thanks, but i mean the percent CPU usage, like top does. The load average is useful too.


All times are GMT -5. The time now is 10:32 AM.