Hi all,
After reading the proc.txt file,i come to the following
conclusion:
1. I get the total clock speed of the cpu
from /proc/cpuinfo from cpu MHz entry.
2. Now i add the values of all the colomns
in the first row of /proc/stat(the row which
starts with cpu).this gives the total cpu usage.
Then i am dividing the above value with 1000 and the resulting answer is again divided with the total clock speed to get the percentage of cpu usage.
Is my approach correct.
I am checking my results with system monitor but there is a variation.
Plz rectify me,if i am wrong.
Thanks,
Sounak.
(This is my best effort to write a mail)