#1023 closed defect (wontfix)

Derive of Epoch

Reported by: fgm Owned by: nobody
Priority: low Milestone: Munin 1.4.7
Component: plugins Version: 1.4.4
Severity: minor Keywords:


A very simple plugin plotting time() since the Epoch as a counter should return a
straight horizontal line at 1 second per second, and that is mostly the case. However, several times a day, the value drops slightly below 1, and the daily average can be below 0.997


case $1 in
    cat << EOT
graph_title	Date as seconds
graph_vlabel	seconds per second
graph_info	The number of seconds since the last measurement. Should be a continuous line.
graph_category	osinet
date.info	Info about date seconds
date.label	seconds
date.type	COUNTER
date.max	1.01
date.min	0.99
    exit 0;;

echo -n "date.value "
date +%s

Change History (2)

comment:1 Changed at 2012-02-05T16:11:22+01:00 by cbiedl

Seems you got bitten by two effects. But at first, a workaround: Prefix the value with a time stamp, like in

    NOW=$(date +%s)
    echo "date.value $NOW:$NOW"

Regarding your report, the first thing is rrdtool does interpolation. So, if the interval between data fetches is not exactly every 300 seconds, but 299 or 301 instead, rrdupdate will take this into accout. The 0.997 values you see are just the result of 299/300.

The second question is: If the long-time average no doubt is just 1, why don't you see 1.003 in the maximum value? Well, that's rounding in the presentation. The rrd has the values, they are not shown in that precision.

To check, graph the double and half values of the current time:

    NOW=$(date +%s)
    printf "date2.value %d\n" $(($NOW*2))
    printf "date5.value %d\n" $(($NOW/2))

This yields for me:

  • For duplicated: Exactly 2.000 for cur/min/avg/max
  • For half: 499.30m up to 500.57m



comment:2 Changed at 2012-02-29T10:55:36+01:00 by kenyon

  • Resolution set to wontfix
  • Status changed from new to closed

Thanks for the report and explanation. I have linked to this ticket from the faq.

It seems that there is nothing for munin to do here, so I will close this ticket.

Note: See TracTickets for help on using tickets.