Results 1 to 2 of 2
i want to calculate %cpu usages... as glibtop is not available and i don't wanna use top under system()... so can any body help me in understanding user, nice, sys ...
- 07-11-2007 #1
/proc/stat
i want to calculate %cpu usages... as glibtop is not available and i don't wanna use top under system()... so can any body help me in understanding user, nice, sys and idle fields and it would be helpful if any math formula is given.....

thanx....
- 07-11-2007 #2
ok.... i think i figured out... the numbers r no of jiffies spent in each context (jiffies = 10ms)
so i for demo purpose, i took 2 iteration at an interval of 5 sec so
for percentage cpu load in user mode= (userITR2 - userITR1) / 5
i guess it is right.... is it??


Reply With Quote