<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Here is what I don't understand:<br>
<br>
<blockquote><a class="moz-txt-link-freetext" href="http://oss.oetiker.ch/rrdtool/tut/rrd-beginners.en.html">http://oss.oetiker.ch/rrdtool/tut/rrd-beginners.en.html</a><br>
<i>GAUGE does not save the rate of change. It saves the actual
value itself. <big><b><font color="#cc0000">There are no
divisions or calculations</font></b></big>.<br>
</i></blockquote>
Looking at the source:<br>
<blockquote><tt> case DST_GAUGE:<br>
old_locale = setlocale(LC_NUMERIC, "C");<br>
errno = 0;<br>
pdp_new[ds_idx] =<br>
strtod(updvals[ds_idx + 1], &endptr) *
interval;<br>
if (errno) {<br>
rrd_set_error("converting '%s' to float:
%s",<br>
updvals[ds_idx + 1],
rrd_strerror(errno));<br>
return -1;<br>
};<br>
setlocale(LC_NUMERIC, old_locale);<br>
if (endptr[0] != '\0') {<br>
rrd_set_error<br>
("conversion of '%s' to float not
complete: tail '%s'",<br>
updvals[ds_idx + 1], endptr);<br>
return -1;<br>
}<br>
<big><big><b>rate = pdp_new[ds_idx] / interval;</b></big></big><br>
break;</tt><br>
</blockquote>
If this line is removed, it will behave as documented.<br>
I can not really see any point in this, a gauge is a gauge, its not
a rate.<br>
<br>
----------------<br>
<br>
<br>
On 8/18/2010 10:41 PM, Tobias Oetiker wrote:
<blockquote
cite="mid:alpine.DEB.2.00.1008190731320.27354@sebohet.brgvxre.pu"
type="cite">
<pre wrap="">Hi Marc,
Yesterday Marc MERLIN wrote:
</pre>
<blockquote type="cite">
<pre wrap="">On Wed, Aug 18, 2010 at 09:38:20AM -0700, Marc MERLIN wrote:
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">as for storing arbitrary binary data as time series in rrdtool, it
is all a matter of coming up with a sensible configuration model
and implementation strategy for makeing this work ... if you want
to spend your time on this, I'll be glad to review your plan and
code. And I will also merge your patches if we can agreee on things
...
but as you dive into the code you will seee that your project would
require rather fundamental 'work'
</pre>
</blockquote>
<pre wrap="">
I had a simple thought this morning: just ignore any value that's been
interpolated by cacti and throw it away.
An easy way to detect one is that it's very unlikely that it'll be an
integer, so instead of
</pre>
</blockquote>
<pre wrap="">
Going back to your point, while I don't need this myself anymore (although I
just see another message apparently asking for the same thing), how about
this:
- make a new DATA type that is similar to GAUGE without smoothing
</pre>
</blockquote>
<pre wrap="">
yes the separate datatype approach would be 'the thing todo' note
though rrdtool is not 'smoothing' anything, what happens, is that
rrdtool re-samples your input at the configured step frequency (so
if you put in your data at exactly the step-points, no re-sampling
will happen) for thing you do not need to change rrdtool, just fix
your input. If you do want to be able to have some of the data
re-sampled and some not inside the same rrd, code changes would be
required, as you would have to adopt some sort of 'keep the last
update that has arrived within the sampling interval and mark it
valid for the whole interval'- aproach.
At the next level you might also want to add a special RRA type
which does not do consolidation ... maybe the LAST type might
double as that ...
And thirdly you would have to change storage type of data inside
rrdtool to 'long long (64bit integer)' from the normal double
since double would prevent your bitfield input from working when
you use all the bits ...
Then the code in rrd_graph would have to be adapted to unserstand
the new DS and RRA types
....
</pre>
<blockquote type="cite">
<pre wrap="">or
- add a rrdtool create flag for GAUGE where it's marked as no smoothing
I haven't looked at the code and can't comment on how difficult either is,
but I can think of several legitate uses for GAUGE where smoothing would not
be ok (not counting my bitfield thing, which is admittedly mabye a bit
beyond what rrdtool fields were originally meant for, even if it happens to
work great ;) ).
</pre>
</blockquote>
<pre wrap="">
as I said ... I'll be glad to review any patches ...
cheers
tobi
</pre>
<blockquote type="cite">
<pre wrap="">
Marc
</pre>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
<br>
</body>
</html>