> The first output is total time on battery from last restart, not total
> time remaining.  The second output is always 0, the script outputs a 0
> just in case the "noo" option was missed.  The third output will be the
> current up time when I get it fixed.  The forth output is the device name.
> 
> I don't think I want the gauge option, I want to count how many seconds
> on battery from the last power failure, not from last restart.
> Hopefully they're not the same.

You do need 'gauge' - this says to graph the value as given, rather than the
rate of change of this value.  There's no way to do exactly what you want,
as MRTG has no way of knowing when the last power failure was - your choices
are to graph it as one of:

COUNTER - the default, which is y=(current_value -
previous_value)/time_interval, if (current_value>previous_value)
GAUGE - y=current_value
ABSOLUTE - y=current_value/time_interval
DERIVE - like COUNTER, but without the requirement that
current_value>previous_value

There is also the caveat that all values are time window normalised, which
will change them slightly.  This is only apparent when you have small values
and GAUGE type.

If you really want to do seconds since last failure, you will need to
calculate when the last failure was in your script, and subtract this value
from the retrieved value before giving the output to MRTG.

Steve

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
mrtg mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/mrtg

Reply via email to