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.
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?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.