LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Any one know CPU monitor programe....Plz help me.... (https://www.linuxquestions.org/questions/programming-9/any-one-know-cpu-monitor-programe-plz-help-me-305347/)

rajsun 03-23-2005 10:54 PM

Any one know CPU monitor programe....Plz help me....
 
Hi all,
I Rajesh a new user and programmer in LINUX world.
I want to extract CPU details in linux platform without using /proc fs. Because there i'm getting very limited information. I want to know more and current executing state of CPU. I want to write my own C program that will disply all the details of CPU. That is how TOP command in LINUX works....

If any one of you know then please help me out......

Waiting for response............

With Regard
Rajesh.

jlliagre 03-23-2005 11:14 PM

top is using /proc fs under Linux.

rajsun 03-23-2005 11:36 PM

Can any one tell me where can i find the source code of TOP command or similar program for my reffrence....

If tpo is using /proc fs then what are the relevant files it is accessing........ to display messages about CPU.....

chrism01 03-24-2005 12:30 AM

/proc is not really a filesystem, it just pretends to be one (like a lot of things in Unix).
It's actually a window into the kernel, so do NOT change anything unless you are sure you know what you are doing.

rajsun 03-24-2005 12:59 AM

I do not want to change any thing in /proc just i want to retrive information from there about CPU usage ...... plz tell me how to get CPU usage ........ in LINUX.......... if possible then tell me sugest some code in C as well.........

jlliagre 03-24-2005 04:13 AM

For top source code, see http://www.groupsys.com/top/


All times are GMT -5. The time now is 08:54 AM.