Peter A. Bigot [Fri, 16 May 2014 15:52:49 +0000 (10:52 -0500)]
rrd_scaled_duration: refactor as utility function
Move the infrastructure supporting expression of counts and durations by
suffixed integers into librrd where it can be used by other programs.
Clean up the documentation to remove redundancies.
Peter A. Bigot [Fri, 16 May 2014 14:16:19 +0000 (09:16 -0500)]
cleanup: remove compiler warnings
Eliminate the cause of several diagnostics emitted by gcc 4.6.3 and
4.9.0:
- index, time, tmpfile, optind, and remove are all globally-visible
symbols that were shadowed by local declarations
- time_t may be a signed type, resulting in a signed/unsigned comparison
warning from an operation in rrd_xport
- bypass declarations of variables not referenced due to DISABLE_FLOCK
Peter A. Bigot [Fri, 16 May 2014 11:09:48 +0000 (06:09 -0500)]
rrdcreate: improve scale support
- Fix missed diagnostic for negative values accepted by strtoul.
- Add detailed diagnostics for parsing failures.
- Add diagnostic when duration-based RRA steps (rows) are not multiples of
PDP interval (RRA span).
- Fix row count when PDP interval not one second.
- Extend documentation to special-function RRA example.
Martin Sperl [Tue, 6 May 2014 20:12:44 +0000 (20:12 +0000)]
added PREDICTPERC function
there is one still open question: should we interpolate to get the final value?
Say: if we have 8 values, and we want thd 95th percventile, then
we should actually take the 6.65th 0-based index value (=95/100*(8-1)).
with the current implementation we round, so we return actually the 100th percentile.
what we could also do is:
value=val[floor(idx)]+(idx-floor(idx))*(val[floor(idx)+1]-val[floor(idx)])
(besides some boundry checking for the explicit percentile 100)
Martin Sperl [Mon, 5 May 2014 16:18:55 +0000 (16:18 +0000)]
enabled template for rrdcached updates
this essentially "expands" the template to a "normal" update
based on the structure from the file itself.
This structure is cached in a GTree until the process dies - no validation is done to check if the file changed in the meantime
Sebastian Harl [Sat, 26 Apr 2014 09:51:01 +0000 (11:51 +0200)]
src/Makefile: Link rrdcached against ALL_LIBS directly.
rrdcached uses glib and, thus, needs to be linked against the lib directly.
While some linkers work fine since librrd_th is linked against ALL_LIBS, some
other linkers don't.
Peter Stamfest [Mon, 17 Mar 2014 07:39:00 +0000 (08:39 +0100)]
First step to really integrate modify into tune. Currently implemented
by doing all the "tune" conversions in place and doing the "modify"
operations through a temporary RRD file with a followed move to
the original file
Peter Stamfest [Sun, 16 Mar 2014 16:36:23 +0000 (17:36 +0100)]
Fix all usages of setlocale: setlocale might (and on linux DOES)
return a pointer to memory handled internally by libc, calling
setlocale twice and using the data returned from the first call
later on causes access to already free'd memory. This was clearly
seen through valgrind. Eg. use
TESTS_STYLE=valgrind ./tests/tune2
with this cs backed-out and you will see valgrind problems
related to setlocale.
Peter Stamfest [Wed, 12 Mar 2014 16:42:10 +0000 (17:42 +0100)]
Never ever should a function free an object that was passed in. At least this
is my opinion.
Also get rid of a specialised rrd_free function and clean up exit paths of
functions.
Peter Stamfest [Wed, 12 Mar 2014 16:39:13 +0000 (17:39 +0100)]
Try to handle freeing of mmapped and malloced rrd_t objects transparently
This IS rather hackish - an OO inspired approach might be better, but adding
knowledge about mmapped memory to the free path even allows mixed
mmapped/malloced objects
Peter Stamfest [Sat, 8 Mar 2014 12:32:49 +0000 (13:32 +0100)]
Revert "Make modify command available using RRDs"
This reverts commit c77b6b7a567bd787baa98a9e459bd64e9ef39154.
This cs should not have been on this branch, but because the branch was
pushed before, it can only be reverted...