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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-20-2005, 06:50 AM
|
#1
|
LQ Newbie
Registered: May 2005
Posts: 3
Rep:
|
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
|
|
|
05-20-2005, 07:58 PM
|
#2
|
Senior Member
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
|
Why not just use 'top' or 'ps', since that's their purpose?
|
|
|
05-20-2005, 11:28 PM
|
#3
|
LQ Newbie
Registered: May 2005
Posts: 3
Original Poster
Rep:
|
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
|
|
|
05-20-2005, 11:40 PM
|
#4
|
Senior Member
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
|
You'll probably find this article usefull. Remember, you can always look at the source for top and ps as well.
|
|
|
12-04-2007, 05:14 PM
|
#5
|
LQ Newbie
Registered: Dec 2007
Posts: 2
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 03:33 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|