Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CPU Percent

Status
Not open for further replies.

warmongr

MIS
Mar 17, 1999
214
US
Anyone have the formula for computing CPU percent from /proc/stat. I assume it is a matter of counting jiffies between intervals and then dividing over total jiffies but I'd like to get your take.

Thanks,
W
 
Sounds right.

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
Thanks,

I'd seen
before. I also found this script that eludes to a solution but I'm not sure it's correct. It suggests that the user space jiffy between intervals * 100/hz (100) is how that's calculated. So on a machine that is set to 100HZ, between any interval let's say there is a jiffy difference of 50 that means the user space CPU percent is 50%. (50*100)/100. Here's the link. Am I reading that right?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top