[rrd-users] [rrd] Can't I turn off data smoothing for GAUGE?

Marc MERLIN marc_rrd at merlins.org
Thu Aug 19 19:22:05 CEST 2010


On Thu, Aug 19, 2010 at 08:58:49AM -0700, Philip Peake wrote:
>  On 8/19/2010 8:14 AM, Marc MERLIN wrote:
> > On Thu, Aug 19, 2010 at 07:52:06AM -0700, Philip Peake wrote:
> >>  Yes ... I am actually measuring two parameters.
> >> One of them has fairly high numbers (in the 100's), the interpolation
> >> (or whatever you want to call it) is ok there. The actual number
> >> displayed is not too important as long as its something like right.
> >>
> >> The second set of samples are more like:
> >>
> >>     0 0 0 0 0 0 1 0 0 0 1 1 0 0 2 0 5 0 0 0 0 3 0 0 1 0 0 0 0 0 1
> >>
> >> They are integer values. Displaying them as (for example) 0.666732134 is
> >> meaningless.
> > So if you don't have a workaround, at this point the fix is to give Tobias a
> > patch that doesn't break the common case.
> >
> > Marc
> I *think* that's fairly easy. But I only spent about 5 minutes last
> night looking at the source.
> 
> I would start by adding a new command line option
> (/--dont_screw_with_gauge_data/ or similar), and change this line:
> 
>      rate = pdp_new[ds_idx] / interval;
> 
> To look more like:
> 
>     if (dont_screw_with_gauge_data) {
>             rate = pgp_new[ds_idx];
>     } else {
>        rate = pdp_new[ds_idx] / interval;
>     }
 
I think that would do it, but you'd have to store that
dont_screw_with_gauge_data in the RRD file somewhere and I'm not sure if the
file format has free bits that can be used for that (hopefully it does).

> Now your case, as I understand it (I didn't go back and look in the
> archives to fully understand what you wanted to do) is to store a set of
> bits. If that's true, that is a bit more work because it looks (in my 5
> minutes of digging) that the values are stored as floating point values,
> not integer, so that would require a lot more digging to see how to do
> that. Its probably a quite pervasive change ....

No change needed for me. If I store a 16 (or likely 32bit) int, it gets
stored as a float but I get back an int when I query. It works fine as is
right now, except between state changes where rrdtool is trying to be useful
and interpolates data (now giving me meaningless float numbers).

If you solve your case, it would solve mine too (although I'm already ok as
is since I just now discard any values that non integer, which mostly takes
care of my problem).

Marc
-- 
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/  



More information about the rrd-users mailing list