[mrtg] Re: (solved) Re: rateup writing *.log file incorrectly - post 2

paul beard paulbeard at mac.com
Mon Feb 4 07:14:14 MET 2002


well, this was answered in the docs but it still took some time to 
work out a solution. My memory of MRTG is obviously stale, as it 
used not to require 4 values as input: the last two could be 
zeroes or anything at all. Now, it seems you have to provide real 
data.

What I was trying to do was graph disk space: I can get the values 
with snmp just fine but without the uptime and target name, the 
log entries were never correct. Adding that stuff in proved to be 
troublesome to the point I have ended up faking the uptime (using 
the output of "perl -e 'print time()';" and just appending the time.

Target[red-root]:`/usr/local/bin/snmpget -m all -Oqv red public 
host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageSize.1 
host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.1`&`perl 
-e 'print time();'`&"red-root"

If anyone has a way to get the real uptime to be used, please 
advise. I would have said this was"human-readable" per the docs, 
but it kicked back "corrupt logfile" errors.

[/usr/local/etc/mrtg]# /usr/local/bin/snmpget -m all -Oqv red 
public host.hrSystem.hrSystemUptime.0
2:8:17:12.47


paul beard wrote:

> there's something else I am missing, possibly a FAQ: the docs were 
> distcleaned on this machine so I'll have to retrieve them.
> 
> I am curious as to why these values:
> 
> 19815
> 13679
> 
> are getting logged as these:
> 
> 1012780802 11000 -1
> 1012780802 11000 1 11000 1
> 1012780580 11011 1 11011 1
> 
> this is what I use to get them . . .
> 
> [/www/mrtg/red]:: /usr/local/bin/snmpget -m all -Ov red public 
> host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageSize.3 ; 
> /usr/local/bin/snmpget -m all -Ov red public 
> host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.3
> 
> 
> 
> --
> 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
> 
> 
> 



--
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