LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-20-2005, 06:50 AM   #1
kunal_patel22
LQ Newbie
 
Registered: May 2005
Posts: 3

Rep: Reputation: 0
per process Cpu utilization


hello frnds,


Can you plz tell me how do i calculate per process cpu utilization ......

i m sorry i m posting it again but didnt get a rational ans during my first post


i know that we have to calculate uisng /proc/PID/stat n specifically frm fields 14 to 17.........but my main question is HOW????????????

HOW USING THOSE FIELDS?????????????????

plz clarify me on that.........


Once again i m sorry for posting it again...........but i m in need of it badly


Regards,

Kunal
 
Old 05-20-2005, 07:58 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Why not just use 'top' or 'ps', since that's their purpose?
 
Old 05-20-2005, 11:28 PM   #3
kunal_patel22
LQ Newbie
 
Registered: May 2005
Posts: 3

Original Poster
Rep: Reputation: 0
hello frnds,


I know i can use top or ps command but then i have simulate that command as a project so i need that statics


plz tell me frnds way of this
 
Old 05-20-2005, 11:40 PM   #4
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
You'll probably find this article usefull. Remember, you can always look at the source for top and ps as well.
 
Old 12-04-2007, 05:14 PM   #5
nsyed4
LQ Newbie
 
Registered: Dec 2007
Posts: 2

Rep: Reputation: 0
Get CPU Utilization in % for a Process

Hello Kunal,

I have the same question as you had. Did you resolve it.
Were you able to get the CPU % and Mem % for each process through the /proc/pid/stat or /proc/pid/statm.

Please reply me if you have the solution.

Thanks,
Noor
 
  


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
cpu and memory utilization laxmi_cs Linux - General 2 08-29-2005 04:06 PM
per process cpu utilization kunal_patel22 Linux - Software 1 05-19-2005 10:26 AM
getting total cpu utilization using c theog Programming 2 03-19-2005 04:41 PM
100 % CPU utilization Ganesh Kamat Linux - General 14 04-18-2003 01:34 PM
can I limit CPU utilization per user? adenardo Linux - General 2 11-13-2001 11:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:33 PM.

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