]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/log
thirdparty/rrdtool-1.x.git
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;
             ^

8 years agosrc/rrd_graph.c: fix gcc warning "assignment discards 'const' qualifier"
Marek Schimara [Thu, 1 Sep 2016 09:22:30 +0000 (11:22 +0200)] 
src/rrd_graph.c: fix gcc warning "assignment discards 'const' qualifier"

rrd_graph.c:5221:25: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
        im->imginfo = poptions->optarg;
                    ^

8 years agosrc/rrd_graph_helper.c: fix gcc warning "comparison is always false"
Marek Schimara [Thu, 1 Sep 2016 09:11:31 +0000 (11:11 +0200)] 
src/rrd_graph_helper.c: fix gcc warning "comparison is always false"

rrd_graph_helper.c:747:25: warning: comparison is always false due to limited range of data type [-Wtype-limits]
     if (vname && (*vname>128)) {
                         ^

        Effectively, as 'vname' is a (char *), the values can go from
        -128 to 127, so this was deadcode.

8 years agosrc/rrd_list.c: fix gcc warning "ISO C does not permit named variadic macros"
Marek Schimara [Thu, 1 Sep 2016 09:25:20 +0000 (11:25 +0200)] 
src/rrd_list.c: fix gcc warning "ISO C does not permit named variadic macros"

rrd_list.c:16:50: warning: ISO C does not permit named variadic macros [-Wvariadic-macros]
        #define SANE_ASPRINTF(_dest_str, _format, _params...)   \
                                                         ^

rrd_list.c:24:51: warning: ISO C does not permit named variadic macros [-Wvariadic-macros]
        #define SANE_ASPRINTF2(_dest_str, _format, _params...)   \
                                                          ^

8 years agosrc/optparse.c: fix gcc warning "ISO C does not permit named variadic macros"
Marek Schimara [Thu, 1 Sep 2016 08:42:32 +0000 (10:42 +0200)] 
src/optparse.c: fix gcc warning "ISO C does not permit named variadic macros"

optparse.c:4:39: warning: ISO C does not permit named variadic macros [-Wvariadic-macros]
  #define opterror(options, format, args...) \
                                        ^

8 years agosrc/rrd_info.c: fix gcc warning "assignment discards 'const' qualifier"
Marek Schimara [Thu, 1 Sep 2016 08:36:20 +0000 (10:36 +0200)] 
src/rrd_info.c: fix gcc warning "assignment discards 'const' qualifier"

rrd_info.c: In function 'rrd_info_r':
rrd_info.c:178:16: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
        info.u_str = filename;
                   ^

8 years agoMerge pull request #733 from Marek77/pr_list
Tobias Oetiker [Thu, 1 Sep 2016 06:48:59 +0000 (08:48 +0200)] 
Merge pull request #733 from Marek77/pr_list

adds command 'LIST'

8 years agotests/: adds list1 'rrdtool list' test script 733/head
Marek Schimara [Wed, 31 Aug 2016 12:35:49 +0000 (14:35 +0200)] 
tests/: adds list1 'rrdtool list' test script

8 years agosrc/rrd_daemon.c,src/rrd_list.c: moves LIST-specific code into rrd_list_r
Marek Schimara [Tue, 30 Aug 2016 15:06:28 +0000 (17:06 +0200)] 
src/rrd_daemon.c,src/rrd_list.c: moves LIST-specific code into rrd_list_r

8 years agosrc/rrd_list.c: fix option handling
Marek Schimara [Thu, 25 Aug 2016 14:35:49 +0000 (16:35 +0200)] 
src/rrd_list.c: fix option handling

8 years agosrc/rrd_daemon.c: adds symlink check for the 'LIST' command
Marek Schimara [Thu, 25 Aug 2016 08:19:54 +0000 (10:19 +0200)] 
src/rrd_daemon.c: adds symlink check for the 'LIST' command

        make sure we aren't following a symlink pointing outside of
        base_dir

8 years agoMerge pull request #734 from biell/master
Tobias Oetiker [Thu, 25 Aug 2016 05:56:11 +0000 (07:56 +0200)] 
Merge pull request #734 from biell/master

fix segfault on non-existent RRD file when using rrdcached

8 years agofix segfault on non-existent RRD file when using rrdcached 734/head
biell [Wed, 24 Aug 2016 18:39:32 +0000 (14:39 -0400)] 
fix segfault on non-existent RRD file when using rrdcached

8 years agodoc: adds documentation for the LIST command
Marek Schimara [Wed, 24 Aug 2016 13:20:43 +0000 (15:20 +0200)] 
doc: adds documentation for the LIST command

8 years agoPerl shared bindings: Add bindings for the LIST command
Sebastien Dugue [Fri, 13 Feb 2015 09:29:36 +0000 (10:29 +0100)] 
Perl shared bindings: Add bindings for the LIST command

8 years agoPython bindings: Add bindings for the LIST command
Sebastien Dugue [Thu, 30 Oct 2014 08:33:26 +0000 (09:33 +0100)] 
Python bindings: Add bindings for the LIST command

8 years agorrd_daemon: Add LIST command to list the rrd databases
Sebastien Dugue [Tue, 28 Oct 2014 14:37:03 +0000 (15:37 +0100)] 
rrd_daemon: Add LIST command to list the rrd databases

8 years agoMerge pull request #732 from Marek77/pr_mkdir
Tobias Oetiker [Wed, 24 Aug 2016 09:34:23 +0000 (11:34 +0200)] 
Merge pull request #732 from Marek77/pr_mkdir

Fix "mkdir -p"

8 years agoMerge pull request #731 from Marek77/pr_loglevel
Tobias Oetiker [Wed, 24 Aug 2016 08:41:24 +0000 (10:41 +0200)] 
Merge pull request #731 from Marek77/pr_loglevel

rrdcached: Adds CLI option '-V log_level'

8 years agorrd_daemon: Log strerror(errno) when rrd_mkdir_p() fails 732/head
Jean-Vincent Ficet [Tue, 10 Feb 2015 15:39:18 +0000 (16:39 +0100)] 
rrd_daemon: Log strerror(errno) when rrd_mkdir_p() fails

Log strerror(errno) when rrd_mkdir_p() fails in order to know what went wrong
from a client application perspective.

In this particular case, rrd_mkdir_p failed due to the lack of inodes.
Sending a message with 'No Space left on device' allowed the application
to limit the logs in the code in charge of handling the
RRDTOOL_FILESYSTEM_FULL error, rather than flooding the logs with all
the failed queries.

8 years agorrd_utils: Fix broken recusive directory creation in multithreaded context
Jean-Vincent Ficet [Mon, 9 Feb 2015 15:26:00 +0000 (16:26 +0100)] 
rrd_utils: Fix broken recusive directory creation in multithreaded context

Multithreaded applications can issue CREATE commands simultaneously
from several threads. Such commands may require to create directories
from the same root path.

Example:

Thread #1 creates /var/cache/rrd/data/switch/isw61/board0/chip1/port1
Thread #2 creates /var/cache/rrd/data/switch/isw61/board0/chip1/port3

If 2 threads attempt to create the above directories, one thread may
fail when creating a directory already created by the other thread.

The mkdir syscall fails with an error (errno = EEXIST), which causes
the whole CREATE transaction to fail.

Fixed by checking errno after invoking mkdir when creating
directories recursively.

8 years agodoc/rrdcached.pod: adds description of the '-V log_level' CLI option 731/head
Marek Schimara [Wed, 24 Aug 2016 08:00:58 +0000 (10:00 +0200)] 
doc/rrdcached.pod: adds description of the '-V log_level' CLI option

8 years agoMerge pull request #730 from Marek77/pr_acinclude
Tobias Oetiker [Wed, 24 Aug 2016 07:28:27 +0000 (09:28 +0200)] 
Merge pull request #730 from Marek77/pr_acinclude

m4/acinclude.m4: fix for build error 'possibly undefined macro: AS_VAR_COPY

8 years agoMerge pull request #729 from Marek77/pr_fallocate
Tobias Oetiker [Tue, 23 Aug 2016 14:19:20 +0000 (16:19 +0200)] 
Merge pull request #729 from Marek77/pr_fallocate

src/rrd_open.c: fix crash (SIGBUS) trying to CREATE a rrd on a full fs

8 years agosrc/rrd_daemon.c: adds option '-V LOGLEVEL'
Marek Schimara [Fri, 24 Jun 2016 08:27:55 +0000 (10:27 +0200)] 
src/rrd_daemon.c: adds option '-V LOGLEVEL'

        Default log level when this flag is NOT present: LOG_ERR

8 years agom4/acinclude.m4: fix for build error 'possibly undefined macro: AS_VAR_COPY' 730/head
Marek Schimara [Wed, 22 Jun 2016 08:41:25 +0000 (10:41 +0200)] 
m4/acinclude.m4: fix for build error 'possibly undefined macro: AS_VAR_COPY'

        This happens with autoconf 2.63 or older (RHEL 6)

8 years agosrc/rrd_open.c: fix crash (SIGBUS) trying to CREATE a rrd on a full filesystem 729/head
Marek Schimara [Thu, 12 Sep 2013 11:57:50 +0000 (13:57 +0200)] 
src/rrd_open.c: fix crash (SIGBUS) trying to CREATE a rrd on a full filesystem

        Condition (posix_fallocate(rrd_simple_file->fd, 0, newfile_size) == -1)
        is always FALSE so this check passes all the time.
        See man posix_fallocate()

9 years agoMerge pull request #716 from Marek77/master_coverity
Tobias Oetiker [Thu, 14 Jul 2016 11:26:58 +0000 (13:26 +0200)] 
Merge pull request #716 from Marek77/master_coverity

Master coverity

9 years agoMerge pull request #723 from N3WWN/master
Tobias Oetiker [Thu, 14 Jul 2016 11:26:42 +0000 (13:26 +0200)] 
Merge pull request #723 from N3WWN/master

FIX for Issue 695 - master branch

9 years agoFIX for Issue 695 - master branch 723/head
Rich Alloway [Wed, 13 Jul 2016 12:50:00 +0000 (08:50 -0400)] 
FIX for Issue 695 - master branch

9 years agoMerge pull request #715 from itensionanders/coords
Tobias Oetiker [Tue, 5 Jul 2016 15:00:38 +0000 (17:00 +0200)] 
Merge pull request #715 from itensionanders/coords

Output legend coords, for making img map

9 years agoShow legend coords in graphv, for making img map 715/head
Anders Björklund [Sun, 26 Jun 2016 11:53:02 +0000 (13:53 +0200)] 
Show legend coords in graphv, for making img map

9 years agoAdd gfx_get_text_height function, to match width
Anders Björklund [Sun, 26 Jun 2016 11:53:02 +0000 (13:53 +0200)] 
Add gfx_get_text_height function, to match width

9 years agofix style 716/head
Marek Schimara [Mon, 27 Jun 2016 09:04:37 +0000 (11:04 +0200)] 
fix style

   src/rrd_cgi.c
   src/rrd_create.c
   src/rrd_daemon.c
   src/rrd_dump.c
   src/rrd_fetch.c
   src/rrd_first.c
   src/rrd_flushcached.c
   src/rrd_graph_helper.c
   src/rrd_info.c
   src/rrd_last.c
   src/rrd_lastupdate.c
   src/rrd_update.c

9 years agosrc/rrd_cgi.c: fix Coverity CID#13625 Truncated stdio return value
Marek Schimara [Fri, 17 Jun 2016 11:40:08 +0000 (13:40 +0200)] 
src/rrd_cgi.c: fix Coverity CID#13625 Truncated stdio return value

9 years agosrc/rrd_daemon.c: fix Coverity CID#13627 Unchecked return value from library
Marek Schimara [Fri, 17 Jun 2016 11:33:55 +0000 (13:33 +0200)] 
src/rrd_daemon.c: fix Coverity CID#13627 Unchecked return value from library

        CWE-252 / https://cwe.mitre.org/data/definitions/252.html

9 years agosrc/rrd_fetch_libdbi.c: fix Coverity CID#13630 Unchecked return value
Marek Schimara [Fri, 17 Jun 2016 11:27:07 +0000 (13:27 +0200)] 
src/rrd_fetch_libdbi.c: fix Coverity CID#13630 Unchecked return value

        CWE-252 / https://cwe.mitre.org/data/definitions/252.html

9 years agosrc/rrd_fetch_libdbi.c: fix Coverity CID#13634 Logically dead code
Marek Schimara [Fri, 17 Jun 2016 11:19:43 +0000 (13:19 +0200)] 
src/rrd_fetch_libdbi.c: fix Coverity CID#13634 Logically dead code

        CWE-561 / https://cwe.mitre.org/data/definitions/561.html

        NOTE: this seems like a copy & paste error; either we compare
        'h1' to (char)-1 in which case the code cannot be reached (the
        same test is already done & it returns from the function), or
        (more likely) it should be 'h2' instead.

9 years agosrc/rrd_daemon.c: fix Coverity CID#13637 Missing unlock
Marek Schimara [Fri, 17 Jun 2016 11:16:50 +0000 (13:16 +0200)] 
src/rrd_daemon.c: fix Coverity CID#13637 Missing unlock

        CWE-667 / https://cwe.mitre.org/data/definitions/667.html

9 years agosrc/rrd_xport.c: fix Coverity CID#13640 Array compared against 0
Marek Schimara [Fri, 17 Jun 2016 11:08:27 +0000 (13:08 +0200)] 
src/rrd_xport.c: fix Coverity CID#13640 Array compared against 0

        CWE-398 / https://cwe.mitre.org/data/definitions/398.html

        (im->gdes[i].legend == 0) doesn't make sense;
        im->gdes[i].legend declared as
          char      legend[FMT_LEG_LEN + 5];  /* legend */

        NOTE: fix to be checked to ensure it conserves the intended functionality.

9 years agosrc/rrd_graph_helper.c: fix Coverity CIDs#13641,#13642 Dereference null return value
Marek Schimara [Fri, 17 Jun 2016 11:01:40 +0000 (13:01 +0200)] 
src/rrd_graph_helper.c: fix Coverity CIDs#13641,#13642 Dereference null return value

        CWE-476 / https://cwe.mitre.org/data/definitions/476.html

9 years agobindings/perl-shared/RRDs.xs: fix Coverity CID#13647 Resource leak
Marek Schimara [Fri, 17 Jun 2016 09:28:17 +0000 (11:28 +0200)] 
bindings/perl-shared/RRDs.xs: fix Coverity CID#13647 Resource leak

        CWE-404 / https://cwe.mitre.org/data/definitions/404.html

9 years agosrc/rrd_cgi.c: fix Coverity CID#13652 Resource leak
Marek Schimara [Fri, 17 Jun 2016 09:17:51 +0000 (11:17 +0200)] 
src/rrd_cgi.c: fix Coverity CID#13652 Resource leak

        CWE-404 / https://cwe.mitre.org/data/definitions/404.html

9 years agosrc/rrd_cgi.c: fix Coverity CID#13654 Resource leak
Marek Schimara [Fri, 17 Jun 2016 09:09:28 +0000 (11:09 +0200)] 
src/rrd_cgi.c: fix Coverity CID#13654 Resource leak

        CWE-404 / https://cwe.mitre.org/data/definitions/404.html