Percentage of CPU Utilization using SNMP
I was wondering if you could help out with a question on SNMP.
It should be pretty simple for you but trust me, I'm having a very hard time to make some sense of it.
I'm trying to basically create a script on Linux to display a message whenever my processor utilization percentage reaches a specified limit.
What I can't understand is how to "read" the info I get from SMNP.
I tried the following lines:
snmpget -v2c -c public 127.0.0.1 ssCpuRawIdle.0
And I observe results like "231273" and "233607". Now, I read somewhere that to get a percentage, I should divide the difference betwen these 2 values by the sum of them. That's where I got myself stuck on.
Could you please give me any hints? Or maybe another MIB I should be querying or anything that gives some light?
Thank you so very much,