LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-23-2005, 10:54 PM   #1
rajsun
Member
 
Registered: Mar 2005
Posts: 61

Rep: Reputation: 15
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.
 
Old 03-23-2005, 11:14 PM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
top is using /proc fs under Linux.
 
Old 03-23-2005, 11:36 PM   #3
rajsun
Member
 
Registered: Mar 2005
Posts: 61

Original Poster
Rep: Reputation: 15
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.....
 
Old 03-24-2005, 12:30 AM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,348

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
/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.
 
Old 03-24-2005, 12:59 AM   #5
rajsun
Member
 
Registered: Mar 2005
Posts: 61

Original Poster
Rep: Reputation: 15
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.........
 
Old 03-24-2005, 04:13 AM   #6
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Monitor Flickers too much...plz help...!! jhazzy Linux - Newbie 13 08-17-2004 08:37 AM
plz help: monitor turns off Pacemaker Linux - Newbie 10 04-07-2004 06:11 PM
monitor me plz!!!! navid Linux - Newbie 2 03-03-2004 07:04 AM
cpu monitor doralsoral Linux - Software 2 01-07-2004 04:08 PM
silly monitor.. help me plz X-SLACK Linux - Hardware 1 05-13-2002 03:34 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration