[mrtg] Problems with target math

Michael Robbins mdrobbins at cox.net
Thu Jul 11 21:05:02 MEST 2002


I'm having problems using math in the target line.  The OID is the used
disk space on an NT server.  The value returned is the number of
allocation units used, and I want to multiply this by 4096 so that I'm
showing the number of bytes.

My target statement is as follows:

	Target[target.disk]:
1.3.6.1.2.1.25.2.3.1.6.3&1.3.6.1.2.1.25.2.3.1.6.3:m0nit0r at 10.10.10.10
	MaxBytes[target.disk]: 50247815168
	Options[target.disk]: gauge, growright

Running this, will result in the following in my log file:

	1026413416 547879 547879
	1026413416 547879 547879 547879 547879
	1026413401 547879 547879 547879 547879
	1026413400 547879 547879 547879 547879
	1026413100 0 0 0 0
	1026412800 0 0 0 0
	1026412500 0 0 0 0
	1026412200 0 0 0 0

The problem is I need to multiply the resulting value by 4096, so if I
change the target to:

	Target[target.disk]:
1.3.6.1.2.1.25.2.3.1.6.3&1.3.6.1.2.1.25.2.3.1.6.3:m0nit0r at 10.10.10.10 *
4096
	MaxBytes[target.disk]: 50247815168
	Options[target.disk]: gauge, growright

The resulting log file looks like this:

	1026413496 2244112384 2244112384
	1026413496 0 0 0 0
	1026413494 0 0 0 0
	1026413400 0 0 0 0
	1026413100 0 0 0 0

The first time it is run, is returns the correct values, but it never
seems to add any more values to the log.  It's not generating any
errors, and the *.html and *.png files are updated (just not with the
right data).  My only thought is that the resulting integer might be too
large for MRTG.  Is there a limit on the integer size?  Am I using the
Target Math incorrectly?

Any help is greatly appreciated.

Mike

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