LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-04-2007, 05:26 PM   #1
nsyed4
LQ Newbie
 
Registered: Dec 2007
Posts: 2

Rep: Reputation: 0
CPU utolization in percentage for each process


Hello all,

I am running Fedora 8 Linux distribtion.

I already went through the "man" and also previosly posted threads.

I want to get the CPU % utilization and Mem% utilization.
I do not want to use any utility such as top.

I know that we can get it by using /proc/[pid]/stat but I don't know which fields would help me derive the cpu and mem utilization.

eg. With process id of 2407 the cat command would display:

[xxx@machine 2407]$ cat stat
2407 (bluetooth-apple) S 2317 2317 2317 0 -1 4202496 1564 0 1 0 3 1 0 0 20 0 1 0 4794 18317312 1380 4294967295 134512640 134574160 3213748832 3213748356 1115138 0 0 536875008 1256 0 0 0 17 1 0 0 24

But I cannot interpret what these numbers mean.
Can some one please help me on this.

Thanks.
 
Old 12-04-2007, 05:51 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 20,948

Rep: Reputation: 4071Reputation: 4071Reputation: 4071Reputation: 4071Reputation: 4071Reputation: 4071Reputation: 4071Reputation: 4071Reputation: 4071Reputation: 4071Reputation: 4071
"man proc"
 
  


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
I/O wait CPU percentage definition DotHQ Linux - Enterprise 9 07-27-2007 01:36 AM
`top` Irregularities - cpu count, percentage, process lists ColinAnderson Linux - Software 4 05-09-2007 06:41 PM
Calculating the percentage completion of a process sharathksin Programming 2 03-06-2006 01:44 AM
ps -aux CPU usage percentage depdiver Linux - General 1 02-25-2006 02:02 AM
find remaining percentage of cpu happy78 Programming 11 09-26-2005 08:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:48 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