[mrtg] snmpget + CPU usage

MATEI Alexandru Alexandre.Matei at depinfo.enseeiht.fr
Wed Apr 26 18:23:34 MEST 2000

I want to monitor real-time CPU usage on my router, using the snmpget
function from SNMP_utils.pm module, by polling the device each 5 secs..
I used:

use SNMP_util "0.71";
while (1)
    $cpu_5sec=snmpget("public"."@"."router", "");
    print "CPU 5 sec: $cpu_5sec";

I always get 1 as the value of $cpu_5sec, which is not correct (I also
use the "straight" way, e.g. via a cfg file + Netscape, compare with
SunNet Manager results, and I get identical values, but I'm interested
in real-time CPU usage evolution)
If I replace that OID with something else, like, I do get an
error message coming from the router, saying:

SNMPGET Problem for on public at router, error status:

which is normal, because that OID doesn't really exist, I used just for
testing purposes.
Could anyone give me an idea about?

P.S."public" and "router" were of course replaced with real strings

Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org

More information about the mrtg mailing list