[mrtg] Re: hrSystemUptime

Brett Marler brett at asroma.homeip.net
Wed Feb 19 11:11:30 MET 2003


Hello Antoine,

> On a console, if I go:
> # snmpget -v 2c -c public localhost host.hrSystem.hrSystemUptime.0
(snip)
> HOST-RESOURCES-MIB::hrSystemUptime.0 = Timeticks: (105259891) 12 days,
> 4:23:18.91
> 
> But I have no idea how to tell mrtg to use this.

I get the "uptime" of my Windows XP box by simply running a small script from 
my Linux box which simply does an snmpwalk, searches for the sysuptime, strips 
the "days" off and puts it into a format which MRTG can then make a graph 
from. Script is below if you would like it, just a no brainer shell script!

--
#!/bin/sh
uptime=`/usr/local/bin/snmpwalk -v1 -c private 172.16.0.1 | /bin/grep -i 
sysuptime | awk '{print $5}' | sed 's/days//'`
echo "$uptime";
--

Hope this is of some help.


Regards.
-- 
Brett Marler <brett at asroma.homeip.net>
WWW:	http://asroma.homeip.net/




-- Binary/unsupported file stripped by Ecartis --
-- Err : No filename to use for decode, file stripped.
-- Type: application/pgp-signature


--
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
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list