]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/log
thirdparty/rrdtool-1.x.git
8 years agofix test list1 801/head
Alan Jenkins [Wed, 5 Jul 2017 23:07:12 +0000 (00:07 +0100)] 
fix test list1

$ cd tests && ./list1
...
ERROR: rrdcached@unix:/home/alan/src/rrdtool-1.x/tests/list1-rrdcached.sock
: Usage: LIST [RECURSIVE] /[<path>]

8 years agofix wrong printf specifier
Alan Jenkins [Wed, 5 Jul 2017 22:52:17 +0000 (23:52 +0100)] 
fix wrong printf specifier

$ cd tests && ./list1
...
ERROR: rrdcached@����������������������������������������������������������
��������������������������������������������正1: Usage: LIST [RECURSIVE]
/[<path>]

under valgrind:

==16450== Conditional jump or move depends on uninitialised value(s)
==16450==    at 0x4C356A9: wcslen (vg_replace_strmem.c:1848)
==16450==    by 0x535C953: wcsrtombs (in /usr/lib64/libc-2.24.so)
==16450==    by 0x52FFFC4: vfprintf (in /usr/lib64/libc-2.24.so)
==16450==    by 0x5328448: vsnprintf (in /usr/lib64/libc-2.24.so)
==16450==    by 0x4E6C848: rrd_set_error (rrd_error.c:51)
==16450==    by 0x4E6E113: response_read.constprop.5 (rrd_client.c:577)
==16450==    by 0x4E6E251: request.constprop.3 (rrd_client.c:659)
==16450==    by 0x4E6F319: rrd_client_list (rrd_client.c:1354)
==16450==    by 0x4E6F567: rrdc_list (rrd_client.c:1412)
==16450==    by 0x4E485C8: rrd_list (rrd_list.c:308)
==16450==    by 0x402D07: HandleInputLine (rrd_tool.c:696)
==16450==    by 0x40158B: main (rrd_tool.c:551)
==16450==
==16450== Invalid read of size 4
==16450==    at 0x4C356A4: wcslen (vg_replace_strmem.c:1848)
==16450==    by 0x535C953: wcsrtombs (in /usr/lib64/libc-2.24.so)
==16450==    by 0x52FFFC4: vfprintf (in /usr/lib64/libc-2.24.so)
==16450==    by 0x5328448: vsnprintf (in /usr/lib64/libc-2.24.so)
==16450==    by 0x4E6C848: rrd_set_error (rrd_error.c:51)
==16450==    by 0x4E6E113: response_read.constprop.5 (rrd_client.c:577)
==16450==    by 0x4E6E251: request.constprop.3 (rrd_client.c:659)
==16450==    by 0x4E6F319: rrd_client_list (rrd_client.c:1354)
==16450==    by 0x4E6F567: rrdc_list (rrd_client.c:1412)
==16450==    by 0x4E485C8: rrd_list (rrd_list.c:308)
==16450==    by 0x402D07: HandleInputLine (rrd_tool.c:696)
==16450==    by 0x40158B: main (rrd_tool.c:551)
...

$ man 3 printf
...
Conversion specifiers
...
S      (Not in C99 or C11, but in SUSv2, SUSv3, and SUSv4.)  Synonym for
       ls.  Don't use.
...
s      If  an l modifier is present: The const wchar_t * argument is
       expected to be a pointer to an array of wide characters.

8 years agoMerge branch 'master' of github.com:oetiker/rrdtool-1.x
Tobias Oetiker [Tue, 27 Jun 2017 05:49:58 +0000 (07:49 +0200)] 
Merge branch 'master' of github.com:oetiker/rrdtool-1.x

8 years agoinclude prebuilt makefile.in as well
Tobias Oetiker [Tue, 27 Jun 2017 05:49:35 +0000 (07:49 +0200)] 
include prebuilt makefile.in as well

8 years agoMerge pull request #797 from bangert/add_daemon_to_error_message
Tobias Oetiker [Tue, 27 Jun 2017 05:30:27 +0000 (07:30 +0200)] 
Merge pull request #797 from bangert/add_daemon_to_error_message

include the daemon name in the error message

8 years agodo not install systemd support automatically. fix for #798
Tobias Oetiker [Tue, 27 Jun 2017 05:29:03 +0000 (07:29 +0200)] 
do not install systemd support automatically. fix for #798

8 years agoinclude the daemon name in the error message 797/head
Thilo Bangert [Mon, 26 Jun 2017 11:20:49 +0000 (13:20 +0200)] 
include the daemon name in the error message

8 years agopermissions are 644 not 622
Tobias Oetiker [Sat, 24 Jun 2017 14:50:53 +0000 (16:50 +0200)] 
permissions are 644 not 622

8 years agothe switch in disambiguating m[inute] and m[onth] in time spec is 6 not 25. fix for...
Tobias Oetiker [Thu, 22 Jun 2017 06:23:36 +0000 (08:23 +0200)] 
the switch in disambiguating m[inute] and m[onth] in time spec is 6 not 25. fix for #796

8 years agoRemove all occurances of umask ... this is NOT thread safe! Fix for #794.
Tobias Oetiker [Sun, 11 Jun 2017 15:19:05 +0000 (17:19 +0200)] 
Remove all occurances of umask ... this is NOT thread safe! Fix for #794.

8 years agoregression caused by cd139a88f4994c3560b56d0a3166ebfc395e42b8 fix for #794
Tobias Oetiker [Sun, 11 Jun 2017 13:34:57 +0000 (15:34 +0200)] 
regression caused by cd139a88f4994c3560b56d0a3166ebfc395e42b8 fix for #794

8 years agoMerge branch 'master' of github.com:oetiker/rrdtool-1.x
Tobias Oetiker [Sun, 11 Jun 2017 13:31:56 +0000 (15:31 +0200)] 
Merge branch 'master' of github.com:oetiker/rrdtool-1.x

8 years agoMerge pull request #795 from rubenk/remove-unneeded-ifdef
Tobias Oetiker [Sun, 11 Jun 2017 13:13:07 +0000 (15:13 +0200)] 
Merge pull request #795 from rubenk/remove-unneeded-ifdef

Unconditionally include <stdint.h>

8 years agoUnconditionally include <stdint.h> 795/head
Ruben Kerkhof [Sun, 11 Jun 2017 11:43:16 +0000 (13:43 +0200)] 
Unconditionally include <stdint.h>

Code including rrd_client.h should not have to define HAVE_STDINT_H.

I accidentally bumped into this while porting Collectd's build system
from autotools to meson.

8 years agoMerge pull request #789 from svenpanne/no-init
Tobias Oetiker [Sun, 4 Jun 2017 13:14:18 +0000 (15:14 +0200)] 
Merge pull request #789 from svenpanne/no-init

Do not initialize Cairo/Pango on export.

8 years agoMerge pull request #790 from svenpanne/add-prototype
Tobias Oetiker [Wed, 31 May 2017 12:15:53 +0000 (14:15 +0200)] 
Merge pull request #790 from svenpanne/add-prototype

Fixed declaration and export of rrd_dump_opt_r.

8 years agoImproved buffering (#792)
Sven Panne [Wed, 31 May 2017 12:14:42 +0000 (14:14 +0200)] 
Improved buffering (#792)

* Encapsulate access to write buffer.

Fixed ssize_t vs. size_t confusion on the way.

* Improve wbuf_append's time complexity from linear to amortized constant.

This is done by the usual technique employed in many, may libraries out
there (C++'s vector, Java's ArrayList, Python's list, ...): Distinguish
between the size and the capacity of the underlying container.  The capacity
grows by some *factor* (2 in our case) if it is too small, amortizing the
needed allocations/copies over time.

In a nutshell: Adding a single character to the buffer can now be done in
constant amortized time.

* Simplify and improve handle_request_fetch.

Now that add_response_info is efficient (thanks to the improved
wbuf_append), we can vastly simplify handle_request_fetch and even remove
some arbitrary length restrictions on the way.

8 years agoMerge pull request #793 from svenpanne/suspend-resume
Tobias Oetiker [Wed, 31 May 2017 12:10:42 +0000 (14:10 +0200)] 
Merge pull request #793 from svenpanne/suspend-resume

Added SUSPEND/RESUME/SUSPENDALL/RESUMEALL commands.

8 years agoAdded SUSPEND/RESUME/SUSPENDALL/RESUMEALL commands. 793/head
Sven Panne [Tue, 30 May 2017 12:12:20 +0000 (14:12 +0200)] 
Added SUSPEND/RESUME/SUSPENDALL/RESUMEALL commands.

Suspending/resuming is essential to make e.g. backups of RRDs while
rrdcached is running.

8 years agoMerge pull request #791 from svenpanne/no-version-info
Tobias Oetiker [Tue, 30 May 2017 08:05:54 +0000 (10:05 +0200)] 
Merge pull request #791 from svenpanne/no-version-info

Do not specify -version-info for convenience libraries.

8 years agoDo not specify -version-info for convenience libraries. 791/head
Sven Panne [Tue, 30 May 2017 07:49:09 +0000 (09:49 +0200)] 
Do not specify -version-info for convenience libraries.

libtool warns about a useless -version-info flag for convenience libraries,
see:

   http://git.savannah.gnu.org/cgit/libtool.git/tree/build-aux/ltmain.in#n6882

Let's just remove it, it doesn't serve a purpose.

8 years agoFixed declaration and export of rrd_dump_opt_r. 790/head
Sven Panne [Tue, 30 May 2017 07:19:04 +0000 (09:19 +0200)] 
Fixed declaration and export of rrd_dump_opt_r.

The previous state of affairs regarding rrd_dump_opt_r was a bit
inconsistent: The dynamic library didn't export it, while the static one
did.  So the right way to fix it will be exporting it in both variants,
because removing it from the static library would require a major version
change.  Furthermore, rrd_dump_opt_r is mentioned in the documentation at
librrd.pod, so this is another hint for the fix.

In addition, a C prototype was wmissing, so GCC complained about it.

8 years agoDo not initialize Cairo/Pango on export. 789/head
Sven Panne [Tue, 30 May 2017 06:11:24 +0000 (08:11 +0200)] 
Do not initialize Cairo/Pango on export.

On a heavily loaded rrdcached, initializing lots of unnecessary Cairo/Pango
data structures (surfaces, font-related structures, etc.) is not a good
idea. Do this only when we really want to draw something.

8 years agoMerge pull request #788 from svenpanne/log-to-file
Tobias Oetiker [Mon, 29 May 2017 11:43:48 +0000 (13:43 +0200)] 
Merge pull request #788 from svenpanne/log-to-file

Added -o option for logging into a file instead of using syslog.

8 years agoAdded -o option for logging into a file instead of using syslog. 788/head
Sven Panne [Mon, 29 May 2017 08:32:04 +0000 (10:32 +0200)] 
Added -o option for logging into a file instead of using syslog.

For some use cases it is better to keep log output separated from the normal
syslog. To handle such scenarios, a new -o option has been added.

Fixed foreground logging on the way, too: There was a missing mutex for
avoiding intermingled output.

8 years agoMerge pull request #787 from svenpanne/fix-thread-init
Tobias Oetiker [Fri, 26 May 2017 05:56:56 +0000 (07:56 +0200)] 
Merge pull request #787 from svenpanne/fix-thread-init

Added missing GLib thread initialization.

8 years agoAdded missing GLib thread initialization. 787/head
Sven Panne [Wed, 24 May 2017 13:18:54 +0000 (15:18 +0200)] 
Added missing GLib thread initialization.

Older GLib versions (< 2.32, e.g. the ones shipped with CentOS 5 and 6,
SLES11, Debian 6) need an explicit initialization to make things
thread-safe, see:

  https://developer.gnome.org/glib/stable/glib-Deprecated-Thread-APIs.html#g-thread-init

RRDtools didn't do that, so you get random crashes in clients and the
rrdcached on those systems.  Now we make sure that GLib is properly
initialized before calling into it.

8 years agogeting ready for 1.7.0
Tobias Oetiker [Tue, 16 May 2017 12:27:07 +0000 (14:27 +0200)] 
geting ready for 1.7.0

8 years agoget ready for 1.7.0 v1.7.0
Tobias Oetiker [Tue, 16 May 2017 12:07:35 +0000 (14:07 +0200)] 
get ready for 1.7.0

8 years agobump library version since three additional functions have been added
Tobias Oetiker [Tue, 16 May 2017 08:33:30 +0000 (10:33 +0200)] 
bump library version since three additional functions have been added

8 years agoexport 3 extra functions rrd_reduce_data(), rrd_lcd() and rrd_cf_conv()
Tobias Oetiker [Tue, 16 May 2017 08:32:19 +0000 (10:32 +0200)] 
export 3 extra functions rrd_reduce_data(), rrd_lcd() and rrd_cf_conv()

8 years agocleanup THREADs notes since the library is now threadsafe
Tobias Oetiker [Tue, 16 May 2017 08:31:06 +0000 (10:31 +0200)] 
cleanup THREADs notes since the library is now threadsafe

8 years agoMerge pull request #781 from Marek77/pr_coverity
Tobias Oetiker [Thu, 4 May 2017 13:32:41 +0000 (15:32 +0200)] 
Merge pull request #781 from Marek77/pr_coverity

Pr coverity

8 years agosrc/rrd_graph_helper.c: fix Coverity CID #32827 Copy into fixed size buffer 781/head
Marek Schimara [Thu, 4 May 2017 09:22:28 +0000 (11:22 +0200)] 
src/rrd_graph_helper.c: fix Coverity CID #32827 Copy into fixed size buffer

8 years agobindings/rrdtoolmodule.c: fix Coverity CIDs #32891, #32892 Resource leak
Marek Schimara [Thu, 4 May 2017 08:55:04 +0000 (10:55 +0200)] 
bindings/rrdtoolmodule.c: fix Coverity CIDs #32891, #32892 Resource leak

8 years agobindings/rrdtoolmodule.c: fix Coverity CID #32890 Resource leak
Marek Schimara [Thu, 4 May 2017 08:46:26 +0000 (10:46 +0200)] 
bindings/rrdtoolmodule.c: fix Coverity CID #32890 Resource leak

8 years agobindings/rrdtoolmodule.c: fix Coverity CIDs #32888, #32889 Resource leak
Marek Schimara [Thu, 4 May 2017 08:42:22 +0000 (10:42 +0200)] 
bindings/rrdtoolmodule.c: fix Coverity CIDs #32888, #32889 Resource leak

8 years agobindings/rrdtoolmodule.c: fix Coverity CID #32887 Explicit null dereferenced
Marek Schimara [Thu, 4 May 2017 08:29:50 +0000 (10:29 +0200)] 
bindings/rrdtoolmodule.c: fix Coverity CID #32887 Explicit null dereferenced

8 years agosrc/rrd_tune.c: fix Coverity CID #32826 Resource leak
Marek Schimara [Thu, 4 May 2017 08:26:18 +0000 (10:26 +0200)] 
src/rrd_tune.c: fix Coverity CID #32826 Resource leak

8 years agosrc/rrd_rados.c: fix Coverity CID #32884 Dereference after null check
Marek Schimara [Thu, 4 May 2017 08:17:41 +0000 (10:17 +0200)] 
src/rrd_rados.c: fix Coverity CID #32884 Dereference after null check

8 years agoMerge pull request #777 from urbalazs/hun
Tobias Oetiker [Thu, 13 Apr 2017 06:51:05 +0000 (08:51 +0200)] 
Merge pull request #777 from urbalazs/hun

Added Hungarian translation

8 years agoAdded Hungarian translation 777/head
Balázs Úr [Wed, 12 Apr 2017 21:17:00 +0000 (23:17 +0200)] 
Added Hungarian translation

8 years agoMerge pull request #775 from sonertari/sonertari-patch-issue#774
Tobias Oetiker [Tue, 21 Mar 2017 16:08:38 +0000 (17:08 +0100)] 
Merge pull request #775 from sonertari/sonertari-patch-issue#774

Fix oetiker/rrdtool-1.x#774

8 years agoFix oetiker/rrdtool-1.x#774 775/head
Soner Tari [Sat, 18 Mar 2017 21:00:34 +0000 (23:00 +0200)] 
Fix oetiker/rrdtool-1.x#774

8 years agoMerge pull request #772 from Marek77/pr_dist-hook
Tobias Oetiker [Fri, 10 Mar 2017 18:05:32 +0000 (19:05 +0100)] 
Merge pull request #772 from Marek77/pr_dist-hook

Makefile.am: Fix broken build on Fedora

8 years agoMakefile.am: Fix broken build on Fedora 772/head
Jean-Vincent Ficet [Tue, 7 Mar 2017 15:14:36 +0000 (16:14 +0100)] 
Makefile.am: Fix broken build on Fedora

Fix the following build error:

make top_distdir="bxrrdtool-1.6.1" distdir="bxrrdtool-1.6.1" dist-hook
make[2]: Entering directory '/home/vficet/src/rrdtool-1.x'
cd bxrrdtool-1.6.1 && /usr/bin/perl -i -p -e 's/^\1ERSION.+/\1ERSION='1.6002';/' bindings/perl-*/*.pm
Reference to nonexistent group in regex; marked by <-- HERE in m/^\1 <-- HERE ERSION.+/ at -e line 1.
Makefile:933: recipe for target 'dist-hook' failed

8 years agoMerge pull request #771 from tvestelind/systemd-logic-in-rpm-spec
Tobias Oetiker [Thu, 2 Mar 2017 13:10:54 +0000 (14:10 +0100)] 
Merge pull request #771 from tvestelind/systemd-logic-in-rpm-spec

use systemd macros for rrdcached in rpm spec file

8 years agouse systemd macros for rrdcached in rpm spec file 771/head
Tomas Vestelind [Wed, 1 Mar 2017 15:15:53 +0000 (16:15 +0100)] 
use systemd macros for rrdcached in rpm spec file

I've added:
* a variable to control whether or not to build for systemd
* systemd-provided macros in the RPM spec-file according what Fedora
  recommends.

Signed-off-by: Tomas Vestelind <tomas.vestelind@gmail.com>
8 years agorrd_list: adds --recursive option (daemon: LIST [RECURSIVE] /<path..>) (#767)
Marek77 [Fri, 17 Feb 2017 15:33:16 +0000 (16:33 +0100)] 
rrd_list: adds --recursive option (daemon: LIST [RECURSIVE] /<path..>) (#767)

* rrd_list: adds --recursive option (daemon: LIST [RECURSIVE] /<path..>)

* tests/list1: updates LIST tests

8 years agopython-rrdtool as replacement for the upstream Python bindings (#755)
Christian Kröger [Thu, 16 Feb 2017 16:06:37 +0000 (17:06 +0100)] 
python-rrdtool as replacement for the upstream Python bindings (#755)

* Replaced Python bindings with python-rrdtool

* Updated Makefile.in contents

* Added missing import

* Path correction

* Python 3 compatible print statements in acinclude.m4

* Updated configure script

* Added LIST command to Python binding

* Added missing var decls

* Added callback support for Python binding and initial tests suite for the binding

* Fixed some gcc compiler errors in pre-C99 mode

* setuptools is required to build the Python bindings

* Directory traversal

8 years agoupdate for #765
Tobias Oetiker [Sun, 29 Jan 2017 20:15:50 +0000 (21:15 +0100)] 
update for #765

8 years agoMerge branch 'master' of github.com:oetiker/rrdtool-1.x
Tobias Oetiker [Sun, 29 Jan 2017 20:15:42 +0000 (21:15 +0100)] 
Merge branch 'master' of github.com:oetiker/rrdtool-1.x

8 years agoexplicitly linking against libdl is not necessary anymore. fix for #765
Tobias Oetiker [Sun, 29 Jan 2017 20:14:02 +0000 (21:14 +0100)] 
explicitly linking against libdl is not necessary anymore. fix for #765

8 years agorestart rrdcached on upgrade, start and stop in install/uninstall (#764)
Tomas Vestelind [Wed, 25 Jan 2017 17:30:27 +0000 (18:30 +0100)] 
restart rrdcached on upgrade, start and stop in install/uninstall (#764)

* restart rrdcached on upgrade, start and stop in install/uninstall

Start rrdcached and enable autostart when installing
Restart rrdcached and enable autostart when upgrading
Stop rrdcached and disable autostart when uninstalling

Catch non-zero return codes and return 0 in scriptlets

Signed-off-by: Tomas Vestelind <tomas.vestelind@gmail.com>
* enable and restart on both install and upgrade just before finishing the rpm installation

Signed-off-by: Tomas Vestelind <tomas.vestelind@gmail.com>
8 years agobetter use the right number of arguments in the format string
Tobias Oetiker [Fri, 20 Jan 2017 08:00:10 +0000 (09:00 +0100)] 
better use the right number of arguments in the format string

8 years agoattempt to fix #763
Tobias Oetiker [Thu, 19 Jan 2017 14:21:12 +0000 (15:21 +0100)] 
attempt to fix #763

8 years agoDEBUG should not be active and libraries should not exit anyway ... fix for #760
Tobias Oetiker [Wed, 4 Jan 2017 16:15:36 +0000 (17:15 +0100)] 
DEBUG should not be active and libraries should not exit anyway ... fix for #760

8 years agoDEBUG should not be active and libraries should not exit anyway ... fix for #760
Tobias Oetiker [Wed, 4 Jan 2017 16:15:07 +0000 (17:15 +0100)] 
DEBUG should not be active and libraries should not exit anyway ... fix for #760

8 years agofix #760
Tobias Oetiker [Wed, 4 Jan 2017 06:58:21 +0000 (07:58 +0100)] 
fix #760

8 years agorevert 0eed0e5
Tobias Oetiker [Wed, 4 Jan 2017 06:57:32 +0000 (07:57 +0100)] 
revert  0eed0e5

8 years agofix #760
Tobias Oetiker [Tue, 3 Jan 2017 15:18:24 +0000 (16:18 +0100)] 
fix #760

8 years agoMerge pull request #756 from bangert/add_deamon_to_cache_key
Tobias Oetiker [Wed, 9 Nov 2016 13:54:10 +0000 (14:54 +0100)] 
Merge pull request #756 from bangert/add_deamon_to_cache_key

Add deamon variable to cache key

8 years agoAdd deamon variable to cache key 756/head
Thilo Bangert [Wed, 9 Nov 2016 12:07:34 +0000 (13:07 +0100)] 
Add deamon variable to cache key

This allows for two identically named rrd's on two different rrdcache daemons
to be graphed on the samen graph. Without this patch the following

rrdtool graph - --start=1478559600 --end=1478685600 --width=1000 --step=300 --imgformat=JSONTIME \
  DEF:rrd1=aname.rrd:ds_name:AVERAGE:daemon=rrdcache1 \
  DEF:rrd2=aname.rrd:ds_name:AVERAGE:daemon=rrdcache2

would not actually fetch any data from rrdcache2, but rrd2 would reuse the data from rrd1,
since the current logic determines them to be equal.

With this patch rrd2 data is actually fetched from rrdcache2.

8 years agorebuilt autoconf
Tobias Oetiker [Thu, 3 Nov 2016 13:47:47 +0000 (14:47 +0100)] 
rebuilt autoconf

8 years agomaster will become 1.7 ... so prepare
Tobias Oetiker [Thu, 3 Nov 2016 13:44:39 +0000 (14:44 +0100)] 
master will become 1.7 ... so prepare

8 years agoupdated autotools
Tobias Oetiker [Thu, 3 Nov 2016 12:32:51 +0000 (13:32 +0100)] 
updated autotools

8 years agoMerge pull request #752 from Marek77/pr_daemon_fetch_fix
Tobias Oetiker [Mon, 24 Oct 2016 13:09:04 +0000 (15:09 +0200)] 
Merge pull request #752 from Marek77/pr_daemon_fetch_fix

src/rrd_daemon.c: fix incorrect line number reporting by rrdcached in fetch

8 years agosrc/rrd_daemon.c: fix incorrect line number reporting by rrdcached in fetch 752/head
Marek Schimara [Mon, 24 Oct 2016 11:11:24 +0000 (13:11 +0200)] 
src/rrd_daemon.c: fix incorrect line number reporting by rrdcached in fetch

  Example of error:
    rrdtool fetch --daemon 127.0.0.1:42218 <path to>.rrd --start -5min LAST
    ERROR: rrdc_fetch: Got 34 lines, expected 37

  While the same, without '--daemon <address>' works fine.

  The bug manifests itself when the last element of line to write falls
  within the last 10% of the length of 'char linebuf[1024]', ie between
  922 and 1023 bytes; in that case the '\n' at the end of the line is
  not written, and so not seen by count_lines(), wrong number of lines
  given in the daemon's response -> 'rrdtool fetch' errors out.

8 years agoMerge pull request #750 from he32/unsigned-fix
Tobias Oetiker [Tue, 18 Oct 2016 22:15:31 +0000 (00:15 +0200)] 
Merge pull request #750 from he32/unsigned-fix

Fix a signedness/unsignedness conversion bug in the expression

8 years agoFix a signedness/unsignedness conversion bug in the expression 750/head
Havard Eidnes [Tue, 18 Oct 2016 21:12:29 +0000 (23:12 +0200)] 
Fix a signedness/unsignedness conversion bug in the expression
calculating "now" before printout of the timestamp.  Negative values
are first cast to unsigned, it seems, causing overflow.

8 years agoImprove the RRD client API (#742)
Sebastian Harl [Mon, 17 Oct 2016 07:40:22 +0000 (09:40 +0200)] 
Improve the RRD client API (#742)

* RRD client: Add an interface allowing for multiple client connections.

Add a client object which resembles a persistent connection to a server.
Multiple such objects may be used in parallel.

The old, "simple" interface is a wrapper around the new interface now, using
a default client connection. As before, this can only be used for one
connection.

8 years agoalso parse the daemon parameter in DEF as specified in the documentation (#748)
Thilo Bangert [Tue, 11 Oct 2016 09:03:44 +0000 (11:03 +0200)] 
also parse the daemon parameter in DEF as specified in the documentation (#748)

8 years agoMake sure all listen_fds have their own copy of the addr string. (#746)
Thilo Bangert [Wed, 5 Oct 2016 17:04:58 +0000 (19:04 +0200)] 
Make sure all listen_fds have their own copy of the addr string. (#746)

Fixes double free on shutdown #745.

8 years agoRead the last timestamp from the RRD file, instead of setting it to zero. (#744)
Thilo Bangert [Tue, 4 Oct 2016 23:33:50 +0000 (01:33 +0200)] 
Read the last timestamp from the RRD file, instead of setting it to zero. (#744)

This fixes a dataloss problem when trying to insert old data. rrdcached
will accept the data at first, but then fail the whole batch when trying
to flush the data to disk.

The last timestamp is initially set to 0, and later updated to the
timestamp of the first update. However, if the RRD file already contains
newer data,  fails later on. And since RRD cache writes all updates
in one go, the whole batch of samples fails and is discarded (even though,
just the first few updates are too old).

By reading in the last timestamp from the RRD file, we already fail
correctly on the individual update commands (ie. on the protocol layer).

RRD  ----------------------|
RRDcached         |------------------| <- Flush
                           |---------| <- Dataloss

With this patch, the initial updates, that overlap with data in the RRD
file will fail indivdually (at submission time).

RRD  ----------------------|
RRDcached         |xxxxxxxx----------| <- Flush

8 years ago Improve messages for rrdcached daemon failed due to PID Exist (#743)
Manoj Kumar [Wed, 28 Sep 2016 16:29:12 +0000 (21:59 +0530)] 
 Improve messages for rrdcached daemon failed due to PID Exist (#743)

*  Improve messages for rrdcached daemon failed due to PID Exist
    New messages added in order to get clarity about the nature of problem

* Review Comment incorporated regarding indentation of error messages

8 years agoMerge pull request #741 from sharuzzaman/patch-1
Tobias Oetiker [Fri, 23 Sep 2016 09:36:13 +0000 (11:36 +0200)] 
Merge pull request #741 from sharuzzaman/patch-1

fixed typo for 100,000 second in example1

8 years agofixed typo for 100,000 second in example1 741/head
Sharuzzaman Ahmat Raslan [Thu, 22 Sep 2016 11:11:23 +0000 (19:11 +0800)] 
fixed typo for 100,000 second in example1

the example show heartbeat of 100,000 but the explanation show 10,000

8 years agoMerge pull request #739 from oetiker/cb-fix
Tobias Oetiker [Thu, 8 Sep 2016 12:33:20 +0000 (14:33 +0200)] 
Merge pull request #739 from oetiker/cb-fix

detect overlong keys in callbacks ... fix for #738

8 years agodetect overlong keys in callbacks ... fix for #738 739/head
Tobias Oetiker [Thu, 8 Sep 2016 07:59:45 +0000 (09:59 +0200)] 
detect overlong keys in callbacks ... fix for #738

8 years agoMerge pull request #737 from Marek77/pr_list_fix
Tobias Oetiker [Wed, 7 Sep 2016 13:09:00 +0000 (15:09 +0200)] 
Merge pull request #737 from Marek77/pr_list_fix

src/rrd_list.c: fix local directory listing when connection to rrdcached fails

8 years agosrc/rrd_list.c: fix local directory listing when connection to rrdcached fails 737/head
Marek Schimara [Wed, 7 Sep 2016 12:24:21 +0000 (14:24 +0200)] 
src/rrd_list.c: fix local directory listing when connection to rrdcached fails

        Without this fix, when the remote rrdcached cannot be reached
        and a path that exists on the local machine (such as '/') is
        asked for,  'list' returns 'ls' of the local path.

        Example of erroneous output:

$ rrdtool list -d rrdcached-host:42222 /
        Error connecting to rrdcached: Unable to connect to rrdcached: Connection refused
        var
        storage
        lib
        sysroot
        rules.d
        lib64
        backup
        opt
        bin
        sbin
        boot
        proc
        usr
        dev
        sys
        srv
        mnt
        run
        etc
        media
        tmp
        home
        root
        ERROR: Unable to connect to rrdcached: Connection refused

8 years agoMerge pull request #735 from Marek77/pr_compiler_warnings
Tobias Oetiker [Mon, 5 Sep 2016 10:16:20 +0000 (12:16 +0200)] 
Merge pull request #735 from Marek77/pr_compiler_warnings

Pr compiler warnings

8 years agosrc/rrd_info.c: fix icc warnings "external declaration in primary source file" 735/head
Marek Schimara [Fri, 2 Sep 2016 12:49:58 +0000 (14:49 +0200)] 
src/rrd_info.c: fix icc warnings "external declaration in primary source file"

8 years agosrc/rrd_dump.c: fix icc warning "external declaration in primary source file"
Marek Schimara [Fri, 2 Sep 2016 12:44:54 +0000 (14:44 +0200)] 
src/rrd_dump.c: fix icc warning "external declaration in primary source file"

8 years agosrc/rrd_list.c: fix icc warnings "external declaration in primary source file"
Marek Schimara [Fri, 2 Sep 2016 12:41:40 +0000 (14:41 +0200)] 
src/rrd_list.c: fix icc warnings "external declaration in primary source file"

8 years agosrc/rrd_create.c: fix icc warning "variable was set but never used"
Marek Schimara [Fri, 2 Sep 2016 12:26:36 +0000 (14:26 +0200)] 
src/rrd_create.c: fix icc warning "variable was set but never used"

8 years agosrc/rrd_create.c: fix icc warnings "external declaration in primary source file"
Marek Schimara [Fri, 2 Sep 2016 12:03:27 +0000 (14:03 +0200)] 
src/rrd_create.c: fix icc warnings "external declaration in primary source file"

        FnvHash() is declared in fnv.h

8 years agosrc/rrd_graph_helper.c: fix icc warnings "external declaration in primary source...
Marek Schimara [Fri, 2 Sep 2016 11:54:58 +0000 (13:54 +0200)] 
src/rrd_graph_helper.c: fix icc warnings "external declaration in primary source file"

        parse_print(), parse_grad(): removed as declared but undefined

8 years agosrc/rrd_xport.c: fix icc warnings "external declaration in primary source file"
Marek Schimara [Fri, 2 Sep 2016 11:16:39 +0000 (13:16 +0200)] 
src/rrd_xport.c: fix icc warnings "external declaration in primary source file"

8 years agosrc/rrd_graph.c: fix icc warning "external declaration in primary source file"
Marek Schimara [Thu, 1 Sep 2016 14:48:16 +0000 (16:48 +0200)] 
src/rrd_graph.c: fix icc warning "external declaration in primary source file"

8 years agosrc/rrd_update.c: fix icc warnings "external declaration in primary source file"
Marek Schimara [Thu, 1 Sep 2016 14:43:40 +0000 (16:43 +0200)] 
src/rrd_update.c: fix icc warnings "external declaration in primary source file"

8 years agosrc/rrd_rpncalc.c: fix icc warnings "external declaration in primary source file"
Marek Schimara [Thu, 1 Sep 2016 14:36:34 +0000 (16:36 +0200)] 
src/rrd_rpncalc.c: fix icc warnings "external declaration in primary source file"

8 years agosrc/rrd_tune.c: fix icc warnings "external declaration in primary source file"
Marek Schimara [Thu, 1 Sep 2016 14:32:52 +0000 (16:32 +0200)] 
src/rrd_tune.c: fix icc warnings "external declaration in primary source file"

8 years agosrc/rrd_tool.c: fix icc warnings "external declaration in primary source file"
Marek Schimara [Thu, 1 Sep 2016 13:46:20 +0000 (15:46 +0200)] 
src/rrd_tool.c: fix icc warnings "external declaration in primary source file"

        All these functions are internal to rrd_tool.c

8 years agosrc/rrd_cgi.c: fix icc warnings "function was declared but never referenced"
Marek Schimara [Thu, 1 Sep 2016 13:10:52 +0000 (15:10 +0200)] 
src/rrd_cgi.c: fix icc warnings "function was declared but never referenced"

        Functions rrdcgiHeader(), rrdcgiFree(), rrdcgiFreeList() are
        never called.

8 years agosrc/rrd_cgi.c: fix icc warnings "external declaration in primary source file"
Marek Schimara [Thu, 1 Sep 2016 13:06:21 +0000 (15:06 +0200)] 
src/rrd_cgi.c: fix icc warnings "external declaration in primary source file"

        All these functions are internal to rrd_cgi.c

8 years agobindings/perl-shared/RRDs.xs: fix gcc warning "pointer targets differ in signedness"
Marek Schimara [Thu, 1 Sep 2016 11:52:11 +0000 (13:52 +0200)] 
bindings/perl-shared/RRDs.xs: fix gcc warning "pointer targets differ in signedness"

RRDs.xs:98:16: warning: pointer targets in passing argument 2 of 'Perl_newSVpv' differ in signedness [-Wpointer-sign]
    hvs(newSVpv(data->value.u_blo.ptr,data->value.u_blo.size)); \
                ^

8 years agobindings/perl-shared/RRDs.xs: fix gcc warning "unused variable"
Marek Schimara [Thu, 1 Sep 2016 11:24:15 +0000 (13:24 +0200)] 
bindings/perl-shared/RRDs.xs: fix gcc warning "unused variable"

RRDs.xs:136:22: warning: unused variable 'new_end' [-Wunused-variable]
     time_t new_start,new_end;
                      ^

RRDs.xs:524:31: warning: unused variable 'row_cnt' [-Wunused-variable]
   unsigned long step, col_cnt,row_cnt,i,ii;
                               ^

8 years agobindings/perl-shared/RRDs.xs: fix gcc warning "enumeration value 'CF_HWPREDICT' not...
Marek Schimara [Thu, 1 Sep 2016 09:39:27 +0000 (11:39 +0200)] 
bindings/perl-shared/RRDs.xs: fix gcc warning "enumeration value 'CF_HWPREDICT' not handled in switch"

RRDs.xs:150:5: warning: enumeration value 'CF_HWPREDICT' not handled in switch [-Wswitch]
     switch(cf_idx){
     ^

Same for: CF_SEASONAL, CF_DEVPREDICT, CF_DEVSEASONAL, CF_FAILURES, CF_MHWPREDICT

8 years agosrc/rrd_graph.c: fix gcc warning "'tmp' may be used uninitialized in this function"
Marek Schimara [Fri, 2 Sep 2016 12:23:24 +0000 (14:23 +0200)] 
src/rrd_graph.c: fix gcc warning "'tmp' may be used uninitialized in this function"

rrd_graph.c:2678:13: warning: 'tmp' may be used uninitialized in this function [-Wmaybe-uninitialized]
         tmp += 1.0;
             ^