16 years agoreverting non build makefile patch ... we need to lua makefile for building the ditri...
reverting non build makefile patch ... we need to lua makefile for building the ditribution
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1642 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1642 a5681a0c-68f1-0310-ab6d-d61299d08faa
do not create the lua makefile if lua is not to be compiled.
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1641 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1641 a5681a0c-68f1-0310-ab6d-d61299d08faa
fix from alex
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1638 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1638 a5681a0c-68f1-0310-ab6d-d61299d08faa
- remove the spaccing between the elements
- add xsd support to dump output
- change the argument "[--no-header|-n]" to [--header|-h {xsd,dtd}]
-- tobias.lindenmann 1und1.de
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1637 a5681a0c-68f1-0310-ab6d-d61299d08faa
- add xsd support to dump output
- change the argument "[--no-header|-n]" to [--header|-h {xsd,dtd}]
-- tobias.lindenmann 1und1.de
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1637 a5681a0c-68f1-0310-ab6d-d61299d08faa
xsd for rrdtool
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1635 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1635 a5681a0c-68f1-0310-ab6d-d61299d08faa
make compilation on older OSX versios work by removing the # from the librrd.sym file
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1632 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1632 a5681a0c-68f1-0310-ab6d-d61299d08faa
fixed typo ... GAUGE not GUAGE
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1628 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1628 a5681a0c-68f1-0310-ab6d-d61299d08faa
The previous code relied on the assumption that pthread_cond_init(&cond)
was equivalent to memset(&cond,0). This may not be true on all platforms.
-- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1627 a5681a0c-68f1-0310-ab6d-d61299d08faa
was equivalent to memset(&cond,0). This may not be true on all platforms.
-- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1627 a5681a0c-68f1-0310-ab6d-d61299d08faa
remove_cache_item() did not check whether a file was in queue before
modifying the cache head/tail pointers. Therefore, the process of
flushing old files may perturb the cache_queue_head pointer. This caused
some nodes with CI_FLAGS_IN_QUEUE to be un-linked from the queue list.
Thereafter, they would not be flushed by any periodic process (although
they could be revived with FLUSH or UPDATE). This caused a slow memory
leak for files that are no longer updated. Pending updates for these
"abandoned" files would remain in memory ad infinitum.
With this patch, remove_from_queue() will check that the item is queued
before modifying the head/tail pointers. This restores the intended
behavior.
--kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1626 a5681a0c-68f1-0310-ab6d-d61299d08faa
modifying the cache head/tail pointers. Therefore, the process of
flushing old files may perturb the cache_queue_head pointer. This caused
some nodes with CI_FLAGS_IN_QUEUE to be un-linked from the queue list.
Thereafter, they would not be flushed by any periodic process (although
they could be revived with FLUSH or UPDATE). This caused a slow memory
leak for files that are no longer updated. Pending updates for these
"abandoned" files would remain in memory ad infinitum.
With this patch, remove_from_queue() will check that the item is queued
before modifying the head/tail pointers. This restores the intended
behavior.
--kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1626 a5681a0c-68f1-0310-ab6d-d61299d08faa
this was replaced by Makefile.am
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1625 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1625 a5681a0c-68f1-0310-ab6d-d61299d08faa
guess one needs that in svn too for luabindings to work
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1624 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1624 a5681a0c-68f1-0310-ab6d-d61299d08faa
* Open all listen sockets in daemonize(), while we still have stderr.
Changed open_listen_socket_* routines to complain to stderr. Now, any
errors in binding to the listen sockets are much more obvious.
* Simplified exit of parent after fork()
* PID file will be correctly cleaned up if there is a failure in daemonize().
* unlink the unix socket before trying to bind()
(after we're sure we have the PID file)
-- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1623 a5681a0c-68f1-0310-ab6d-d61299d08faa
Changed open_listen_socket_* routines to complain to stderr. Now, any
errors in binding to the listen sockets are much more obvious.
* Simplified exit of parent after fork()
* PID file will be correctly cleaned up if there is a failure in daemonize().
* unlink the unix socket before trying to bind()
(after we're sure we have the PID file)
-- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1623 a5681a0c-68f1-0310-ab6d-d61299d08faa
rrd_notify_row patch:
- Delegate choice of starting row for newly created RRD files to the rrd_open.c API.
- Introduce the rrd_notify_row() function so that an implementation can choose to align the rows of new RRDs with existing RRDs, if desirable.
- Maintain the existing behaviour (random starting row) by default.
-- Daniel.Pocock
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1622 a5681a0c-68f1-0310-ab6d-d61299d08faa
- Delegate choice of starting row for newly created RRD files to the rrd_open.c API.
- Introduce the rrd_notify_row() function so that an implementation can choose to align the rows of new RRDs with existing RRDs, if desirable.
- Maintain the existing behaviour (random starting row) by default.
-- Daniel.Pocock
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1622 a5681a0c-68f1-0310-ab6d-d61299d08faa
- Lua module build and install process rewritten using automake+libtool
- improved check for compat-5.1 availability
-- Fidelis Assis
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1621 a5681a0c-68f1-0310-ab6d-d61299d08faa
- improved check for compat-5.1 availability
-- Fidelis Assis
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1621 a5681a0c-68f1-0310-ab6d-d61299d08faa
rrd_open should not create files with restrictive masks
Removed unnecessary "mode" varaible. The mode is only used when O_CREAT is
specified, where we want to use 0666 (as rrd_create_fn did r<=1612).
--kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1620 a5681a0c-68f1-0310-ab6d-d61299d08faa
Removed unnecessary "mode" varaible. The mode is only used when O_CREAT is
specified, where we want to use 0666 (as rrd_create_fn did r<=1612).
--kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1620 a5681a0c-68f1-0310-ab6d-d61299d08faa
- encapsulate fd and mmap related variables within a private data
structure
- rrd_file_t keeps a pointer to the private data structure of type
void*, so that other block storage implementations can store their
internal data with rrd_file_t
-- Daniel.Pocock
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1619 a5681a0c-68f1-0310-ab6d-d61299d08faa
structure
- rrd_file_t keeps a pointer to the private data structure of type
void*, so that other block storage implementations can store their
internal data with rrd_file_t
-- Daniel.Pocock
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1619 a5681a0c-68f1-0310-ab6d-d61299d08faa
16 years agorrdc_flush_if_daemon should not clobber error message -- kevin (as suggested by Sebas...
rrdc_flush_if_daemon should not clobber error message -- kevin (as suggested by Sebastian)
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1618 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1618 a5681a0c-68f1-0310-ab6d-d61299d08faa
use double for legend positioning to fight wiggle
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1617 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1617 a5681a0c-68f1-0310-ab6d-d61299d08faa
fix version numbers in compile instructions
tobi
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1616 a5681a0c-68f1-0310-ab6d-d61299d08faa
tobi
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1616 a5681a0c-68f1-0310-ab6d-d61299d08faa
In almost all cases where rrdc_flush can fail, it will leave a more
descriptive error message anyway.. better not overwrite it.
-- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1614 a5681a0c-68f1-0310-ab6d-d61299d08faa
descriptive error message anyway.. better not overwrite it.
-- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1614 a5681a0c-68f1-0310-ab6d-d61299d08faa
- rrd_open() calculates file size for new files and calls mmap once for
the whole file
- rrd_resize() cleaned up, no longer passing a size through the cookie
argument
- rrd_init(&my_rrd) must be called before rrd_open() - if people are
calling rrd_open directly from application code, this might be
troublesome. Alternative solutions: creating an additional function,
rrd_open_create(), or adding an extra argument to rrd_open() for setting
the file size
-- Daniel Pocock
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1613 a5681a0c-68f1-0310-ab6d-d61299d08faa
the whole file
- rrd_resize() cleaned up, no longer passing a size through the cookie
argument
- rrd_init(&my_rrd) must be called before rrd_open() - if people are
calling rrd_open directly from application code, this might be
troublesome. Alternative solutions: creating an additional function,
rrd_open_create(), or adding an extra argument to rrd_open() for setting
the file size
-- Daniel Pocock
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1613 a5681a0c-68f1-0310-ab6d-d61299d08faa
move rrd_lock into rrd_open where the general rrd_file ops are located. -- Daniel Pocock
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1612 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1612 a5681a0c-68f1-0310-ab6d-d61299d08faa
error reporting caused crash in journal replay
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1610 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1610 a5681a0c-68f1-0310-ab6d-d61299d08faa
better build docs
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1609 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1609 a5681a0c-68f1-0310-ab6d-d61299d08faa
reverted r1601 and r1606 since r1601 introduced a non portable mremap and r1606 has a dependency on r1601.
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1607 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1607 a5681a0c-68f1-0310-ab6d-d61299d08faa
This moves selection of the initial RRA row into the rrd_open.c API
The current implementation (random row) is used by default. However, it
now provides an opportunity for alternative implementations to integrate
with rrdtool in a single place.
Maybe there are other places in rrdtool where I should insert calls to
the function rrd_notify_row()?
This has been tested with rrdtool create and rrdtool info to verify that
random rows are selected by default (existing behaviour preserved).
-- Daniel Pocock
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1606 a5681a0c-68f1-0310-ab6d-d61299d08faa
The current implementation (random row) is used by default. However, it
now provides an opportunity for alternative implementations to integrate
with rrdtool in a single place.
Maybe there are other places in rrdtool where I should insert calls to
the function rrd_notify_row()?
This has been tested with rrdtool create and rrdtool info to verify that
random rows are selected by default (existing behaviour preserved).
-- Daniel Pocock
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1606 a5681a0c-68f1-0310-ab6d-d61299d08faa
Under most circumstances, rrdcached can detect a stale pid file.
If the process in the pid file does not exist, or cannot be signalled by
the rrdcached owner, then rrdcached will replace the pid file and start
normally. Otherwise, it will complain verbosely to STDERR.
--kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1605 a5681a0c-68f1-0310-ab6d-d61299d08faa
If the process in the pid file does not exist, or cannot be signalled by
the rrdcached owner, then rrdcached will replace the pid file and start
normally. Otherwise, it will complain verbosely to STDERR.
--kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1605 a5681a0c-68f1-0310-ab6d-d61299d08faa
* this preserves principle of least surprise when dealing with files that
are reachable via many path strings. i.e. when $PWD=/base/dir the
following files are the same:
/base/dir/x.rrd
x.rrd
../dir/x.rrd
* for performance, absolute paths (starting with '/') are not resolved.
this reduces the number of stat(2) system calls.
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1604 a5681a0c-68f1-0310-ab6d-d61299d08faa
are reachable via many path strings. i.e. when $PWD=/base/dir the
following files are the same:
/base/dir/x.rrd
x.rrd
../dir/x.rrd
* for performance, absolute paths (starting with '/') are not resolved.
this reduces the number of stat(2) system calls.
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1604 a5681a0c-68f1-0310-ab6d-d61299d08faa
Now, the daemon will check that a base directory is NOT reached via
symbolic link. Documentation added to illustrate the restriction.
This allows several simplifying (and performance-enhancing) assumptions to
be made elsewhere in the code:
* it ensures that paths resolved in the client via realpath() will match
our data structure keys
* it's possible to generate the correct absolute path when given a
relative path by simply prepending the base directory
* it's not necessary to resolve paths that begin with '/'
-- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1603 a5681a0c-68f1-0310-ab6d-d61299d08faa
symbolic link. Documentation added to illustrate the restriction.
This allows several simplifying (and performance-enhancing) assumptions to
be made elsewhere in the code:
* it ensures that paths resolved in the client via realpath() will match
our data structure keys
* it's possible to generate the correct absolute path when given a
relative path by simply prepending the base directory
* it's not necessary to resolve paths that begin with '/'
-- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1603 a5681a0c-68f1-0310-ab6d-d61299d08faa
rrdcached treats relative and absolute paths the same -- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1602 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1602 a5681a0c-68f1-0310-ab6d-d61299d08faa
Some observations I made while implementing this:
- In rrd_open(), the call to rrd_init() clobbers values already populated in
rrd_create.c
- The logic for newfile_size in rrd_open() wasn't really able to cope with the
logic for a file starting with size 0
I've tried to deal with these issues, but maybe there is a more elegant solution.
-- Daniel Pocock
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1601 a5681a0c-68f1-0310-ab6d-d61299d08faa
- In rrd_open(), the call to rrd_init() clobbers values already populated in
rrd_create.c
- The logic for newfile_size in rrd_open() wasn't really able to cope with the
logic for a file starting with size 0
I've tried to deal with these issues, but maybe there is a more elegant solution.
-- Daniel Pocock
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1601 a5681a0c-68f1-0310-ab6d-d61299d08faa
clearer way of advancing the flush time
-- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1600 a5681a0c-68f1-0310-ab6d-d61299d08faa
-- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1600 a5681a0c-68f1-0310-ab6d-d61299d08faa
This patch reduces the number of time()/gettimeofday() system calls when
doing high volume processing. This enables about 25% speed increase
during journal replay and "BATCH" processing. (this is a function of
syscall overhead).
* note when "BATCH" processing or journal replay starts, use that
timestamp for all commands
* use the batch start time to detect when we're in batch mode. no longer
need a separate boolean.
* pass the time_t into handle_request
* pass the time_t through to the commands that need it
-- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1599 a5681a0c-68f1-0310-ab6d-d61299d08faa
doing high volume processing. This enables about 25% speed increase
during journal replay and "BATCH" processing. (this is a function of
syscall overhead).
* note when "BATCH" processing or journal replay starts, use that
timestamp for all commands
* use the batch start time to detect when we're in batch mode. no longer
need a separate boolean.
* pass the time_t into handle_request
* pass the time_t through to the commands that need it
-- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1599 a5681a0c-68f1-0310-ab6d-d61299d08faa
fixed bad folding marker (on handle_request_flush)
-- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1598 a5681a0c-68f1-0310-ab6d-d61299d08faa
-- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1598 a5681a0c-68f1-0310-ab6d-d61299d08faa
this ensures that the response is protocol-compliant even if additional
info has been added to the write buffer during processing.
-- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1597 a5681a0c-68f1-0310-ab6d-d61299d08faa
info has been added to the write buffer during processing.
-- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1597 a5681a0c-68f1-0310-ab6d-d61299d08faa
This patch introduces a feature whereby rrdcached will disallow updates
that do not advance the update time. This prevents the updates from being
discarded later by rrd_update_r.
This patch attempts to make the most of the protocol's limited ability to
return error text when using a -1 return code.
-- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1596 a5681a0c-68f1-0310-ab6d-d61299d08faa
that do not advance the update time. This prevents the updates from being
discarded later by rrd_update_r.
This patch attempts to make the most of the protocol's limited ability to
return error text when using a -1 return code.
-- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1596 a5681a0c-68f1-0310-ab6d-d61299d08faa
This patch ensures that when rrdcached is stopped, it cleans up the
pid file. Apparently this is necessary if RRDCACHED_USER is not the
default "rrdcached".
-- Bernard Li
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1595 a5681a0c-68f1-0310-ab6d-d61299d08faa
pid file. Apparently this is necessary if RRDCACHED_USER is not the
default "rrdcached".
-- Bernard Li
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1595 a5681a0c-68f1-0310-ab6d-d61299d08faa
The patch I submitted for rrdtool.spec introduced a bug where there
are two ldconfig calls in the %postun section. This patch fixes that.
-- Bernard Li
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1594 a5681a0c-68f1-0310-ab6d-d61299d08faa
are two ldconfig calls in the %postun section. This patch fixes that.
-- Bernard Li
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1594 a5681a0c-68f1-0310-ab6d-d61299d08faa
This patch does two things:
- remove the --pidfile check, for compatibility with older RHEL/Centos
systems
- update the username used by the init script, to remain consistent with
Bernard's changes to the spec file
-- Daniel.Pocock
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1593 a5681a0c-68f1-0310-ab6d-d61299d08faa
- remove the --pidfile check, for compatibility with older RHEL/Centos
systems
- update the username used by the init script, to remain consistent with
Bernard's changes to the spec file
-- Daniel.Pocock
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1593 a5681a0c-68f1-0310-ab6d-d61299d08faa
Split-out rrd-cached subpackage -- Bernard Li
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1592 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1592 a5681a0c-68f1-0310-ab6d-d61299d08faa
This patch updates the spec file and includes the librrd.pc file in
the -devel subpackage so that you can build the RPM again.
-- Bernard
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1591 a5681a0c-68f1-0310-ab6d-d61299d08faa
the -devel subpackage so that you can build the RPM again.
-- Bernard
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1591 a5681a0c-68f1-0310-ab6d-d61299d08faa
fix crash reported by Bernard Li - connection_thread_main: avoid double calls to close_connection -- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1590 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1590 a5681a0c-68f1-0310-ab6d-d61299d08faa
This patch introduces two new commands for cache management:
PENDING: shows any un-written updates for a file
FORGET : remove a file completely from cache
-- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1588 a5681a0c-68f1-0310-ab6d-d61299d08faa
PENDING: shows any un-written updates for a file
FORGET : remove a file completely from cache
-- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1588 a5681a0c-68f1-0310-ab6d-d61299d08faa
This patch moves the permission handling code around a bit.
* moved privilege checks into the command handler functions
(possible now that we pass the sock data structures around)
* on UPDATE, delay journal_write until after check_file_access().
previously, it was possible for a high-priv socket to introduce
commands into the journal that could be replayed if they were
still in the journal at next startup.
* moved has_privilege() further up in the file to avoid need
for prototype.
-- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1587 a5681a0c-68f1-0310-ab6d-d61299d08faa
* moved privilege checks into the command handler functions
(possible now that we pass the sock data structures around)
* on UPDATE, delay journal_write until after check_file_access().
previously, it was possible for a high-priv socket to introduce
commands into the journal that could be replayed if they were
still in the journal at next startup.
* moved has_privilege() further up in the file to avoid need
for prototype.
-- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1587 a5681a0c-68f1-0310-ab6d-d61299d08faa
This patch introduces some extra safety checks in journal processing,
and cleans up the code a little bit.
* moved journal initialization to its own function; main() is cleaner
* any time we process a file, log the results
(previous code only loggded if there was a valid entry)
* After reading journals at startup, only trigger full flush out to disk
if the user specified -F. Avoids unnecessary IO on startup unless the
user also wants unnecessary IO on shutdown.
* journal_replay is much more careful about files it will open
* must be a regular file
* must be owned by daemon user
* must not be group/other writable
* Ensure that the journal gets created with the right permissions.
... even when the daemon is invoked with a permissive umask.
equivalent to "chmod a-x,go-w"
-- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1586 a5681a0c-68f1-0310-ab6d-d61299d08faa
and cleans up the code a little bit.
* moved journal initialization to its own function; main() is cleaner
* any time we process a file, log the results
(previous code only loggded if there was a valid entry)
* After reading journals at startup, only trigger full flush out to disk
if the user specified -F. Avoids unnecessary IO on startup unless the
user also wants unnecessary IO on shutdown.
* journal_replay is much more careful about files it will open
* must be a regular file
* must be owned by daemon user
* must not be group/other writable
* Ensure that the journal gets created with the right permissions.
... even when the daemon is invoked with a permissive umask.
equivalent to "chmod a-x,go-w"
-- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1586 a5681a0c-68f1-0310-ab6d-d61299d08faa
aniel Pocock reported that the argument may be NULL in low-diskspace
situations, so check for that here to prevent a segmentation fault.
-- Florian Forster
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1584 a5681a0c-68f1-0310-ab6d-d61299d08faa
situations, so check for that here to prevent a segmentation fault.
-- Florian Forster
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1584 a5681a0c-68f1-0310-ab6d-d61299d08faa
Makefile.lua is now generated
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1583 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1583 a5681a0c-68f1-0310-ab6d-d61299d08faa
added missing file from lua 5.0 integration patch
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1582 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1582 a5681a0c-68f1-0310-ab6d-d61299d08faa
This patch introduces "BATCH" mode.
In this mode, a client can feed multiple commands to rrdcached without
waiting for acknowledgement. This permits multiple commands to be sent
for each read()/write(). This can dramatically increase the command
throughput by increasing the amount of work done per system call.
It enables over 100k updates/second with no CPU
utilization due to the reduced system calls.
-- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1581 a5681a0c-68f1-0310-ab6d-d61299d08faa
In this mode, a client can feed multiple commands to rrdcached without
waiting for acknowledgement. This permits multiple commands to be sent
for each read()/write(). This can dramatically increase the command
throughput by increasing the amount of work done per system call.
It enables over 100k updates/second with no CPU
utilization due to the reduced system calls.
-- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1581 a5681a0c-68f1-0310-ab6d-d61299d08faa
This patch introduces buffered I/O to rrdcached. Now, rrdcached can
interpret as many commands as arrive in a single read(), and it will use
fewer write()s when there are multiple output lines.
All routines now pass around listen_socket_t objects instead of file
descriptors.
All I/O is now contained in two routines. It's no longer necessary to
specify the line count in multi-line outputs, since that is calculated
automatically.
This is the foundation for accepting batched commands.
-- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1580 a5681a0c-68f1-0310-ab6d-d61299d08faa
interpret as many commands as arrive in a single read(), and it will use
fewer write()s when there are multiple output lines.
All routines now pass around listen_socket_t objects instead of file
descriptors.
All I/O is now contained in two routines. It's no longer necessary to
specify the line count in multi-line outputs, since that is calculated
automatically.
This is the foundation for accepting batched commands.
-- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1580 a5681a0c-68f1-0310-ab6d-d61299d08faa
Support to Lua 5.0 -- Fidelis Assis
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1579 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1579 a5681a0c-68f1-0310-ab6d-d61299d08faa
added v-interface example
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1577 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1577 a5681a0c-68f1-0310-ab6d-d61299d08faa
initial librrd file added ... this will need more love since it does
not pick up any -rpath settings
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1575 a5681a0c-68f1-0310-ab6d-d61299d08faa
not pick up any -rpath settings
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1575 a5681a0c-68f1-0310-ab6d-d61299d08faa
added graditents
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1572 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1572 a5681a0c-68f1-0310-ab6d-d61299d08faa
* rrd_resize fixed so that it does NOT alter the original file (mmap side effect)
* rrd_resize can can deal with version 4 files, so let it
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1571 a5681a0c-68f1-0310-ab6d-d61299d08faa
* rrd_resize can can deal with version 4 files, so let it
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1571 a5681a0c-68f1-0310-ab6d-d61299d08faa
The patch fixs rrdtools behaviour when presented with trunkated rrd files.
* Make sure that we do not extend past the end of the
file when reading the header.
* Makes sure that the data portion of the file is large enough, based on
the ds_cnt and the total number of RRA rows
-- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1570 a5681a0c-68f1-0310-ab6d-d61299d08faa
* Make sure that we do not extend past the end of the
file when reading the header.
* Makes sure that the data portion of the file is large enough, based on
the ds_cnt and the total number of RRA rows
-- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1570 a5681a0c-68f1-0310-ab6d-d61299d08faa
updates for lisa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1569 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1569 a5681a0c-68f1-0310-ab6d-d61299d08faa
folding fix
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1567 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1567 a5681a0c-68f1-0310-ab6d-d61299d08faa
missing spaces in extconf.rb caused compile failure -- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1566 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1566 a5681a0c-68f1-0310-ab6d-d61299d08faa
permission fix for rrdcached socket -- Daniel.Pocock
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1565 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1565 a5681a0c-68f1-0310-ab6d-d61299d08faa
minor layout adjustments
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1562 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1562 a5681a0c-68f1-0310-ab6d-d61299d08faa
read for lisa2008
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1561 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1561 a5681a0c-68f1-0310-ab6d-d61299d08faa
export is not required
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1560 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1560 a5681a0c-68f1-0310-ab6d-d61299d08faa
since rrdcached uses pthread functions, use the threadsafe version of librrd as well. This will
also reasolve build problems on boxes there the ptherad functions must be linked explicitly.
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1559 a5681a0c-68f1-0310-ab6d-d61299d08faa
also reasolve build problems on boxes there the ptherad functions must be linked explicitly.
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1559 a5681a0c-68f1-0310-ab6d-d61299d08faa
Clearer explanation on which paths are permitted when -B is supplied -- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1558 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1558 a5681a0c-68f1-0310-ab6d-d61299d08faa
Fixes for the following compiler warnings:
- unused variable
- unused parameter
- assignment / argument discards qualifiers from pointer target type
- comparison between signed and unsigned
- too many arguments to function
- assignment makes pointer from integer without a cast
- incompatible pointer type
- differ in signedness
- implicit declaration of function
- enumeration value not handled in switch
- value computed is not used
Most notably, a possible segfault in the Rrd_Lastupdate() code of the TCL
bindings has been fixed.
Also, -Wundef (warn if an undefined identifier is evaluated in an #if
directive) has been removed from CFLAGS. I don't see any problem with letting
undefined identifiers evaluate to "false" in rrdtool. Keeping that option
would produce a lot of (imho unnecessary) errors which would need to be fixed
using ugly preprocessor statements like '#if defined(FOO) && FOO'.
-- Sebastian Harl
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1557 a5681a0c-68f1-0310-ab6d-d61299d08faa
- unused variable
- unused parameter
- assignment / argument discards qualifiers from pointer target type
- comparison between signed and unsigned
- too many arguments to function
- assignment makes pointer from integer without a cast
- incompatible pointer type
- differ in signedness
- implicit declaration of function
- enumeration value not handled in switch
- value computed is not used
Most notably, a possible segfault in the Rrd_Lastupdate() code of the TCL
bindings has been fixed.
Also, -Wundef (warn if an undefined identifier is evaluated in an #if
directive) has been removed from CFLAGS. I don't see any problem with letting
undefined identifiers evaluate to "false" in rrdtool. Keeping that option
would produce a lot of (imho unnecessary) errors which would need to be fixed
using ugly preprocessor statements like '#if defined(FOO) && FOO'.
-- Sebastian Harl
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1557 a5681a0c-68f1-0310-ab6d-d61299d08faa
I've adapted an init script for rrdcached, and also incorporated it into
the spec file so that it is deployed with the RPM.
There are also some other changes to the spec file so that I could build
an RPM successfully from trunk. I'm happy to tidy up the spec file some
more if no one else wants to mandate the best way to do it.
By default, rrdcached runs as nobody. I've tested this on a server
running Ganglia gmetad.
Regards,
Daniel
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1556 a5681a0c-68f1-0310-ab6d-d61299d08faa
the spec file so that it is deployed with the RPM.
There are also some other changes to the spec file so that I could build
an RPM successfully from trunk. I'm happy to tidy up the spec file some
more if no one else wants to mandate the best way to do it.
By default, rrdcached runs as nobody. I've tested this on a server
running Ganglia gmetad.
Regards,
Daniel
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1556 a5681a0c-68f1-0310-ab6d-d61299d08faa
Now, moving a value to the head of the queue is O(1). Before it was
O(queue size). This improves performance of individual flushes when
there is a large number of files in the queue. As a result, we don't
hold the cache_lock as much.
Revamped enqueue_cache_item to take advantage of the new structure.
Renamed _wipe_ci_values to look nicer with other code.
--kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1555 a5681a0c-68f1-0310-ab6d-d61299d08faa
O(queue size). This improves performance of individual flushes when
there is a large number of files in the queue. As a result, we don't
hold the cache_lock as much.
Revamped enqueue_cache_item to take advantage of the new structure.
Renamed _wipe_ci_values to look nicer with other code.
--kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1555 a5681a0c-68f1-0310-ab6d-d61299d08faa
added example code and working presentation
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1554 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1554 a5681a0c-68f1-0310-ab6d-d61299d08faa
more examples
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1553 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1553 a5681a0c-68f1-0310-ab6d-d61299d08faa
lcd is actually gcd!
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1552 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1552 a5681a0c-68f1-0310-ab6d-d61299d08faa
When -B is specified, the daemon will only operate on files within the
base directory. Symlink detection is omitted for performance reasons (if
a user can create a symlink, they can probably overwrite the RRDs anyway). -- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1551 a5681a0c-68f1-0310-ab6d-d61299d08faa
base directory. Symlink detection is omitted for performance reasons (if
a user can create a symlink, they can probably overwrite the RRDs anyway). -- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1551 a5681a0c-68f1-0310-ab6d-d61299d08faa
check permissions before writing to journal -- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1550 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1550 a5681a0c-68f1-0310-ab6d-d61299d08faa
The daemon should behave the same way w/r/t files whether we "-g" or not.
-- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1549 a5681a0c-68f1-0310-ab6d-d61299d08faa
-- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1549 a5681a0c-68f1-0310-ab6d-d61299d08faa
This bug caused the last line in each journal file to be processed a
second time. Since it had been modified due to tokenizing, it failed
syntax check. The daemon would always record one failed line at
end-of-journal as a result. No data loss incurred by this bug. -- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1548 a5681a0c-68f1-0310-ab6d-d61299d08faa
second time. Since it had been modified due to tokenizing, it failed
syntax check. The daemon would always record one failed line at
end-of-journal as a result. No data loss incurred by this bug. -- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1548 a5681a0c-68f1-0310-ab6d-d61299d08faa
This patch introduces the concept of socket privilege levels. "UPDATE"
and "FLUSHALL" commands are restricted to high-privilege sockets. "FLUSH"
commands can be executed on any socket. This is ideal for multi-user
installations where only certain users need write access to the RRD files.
Now, nearly all socket information is passed around the daemon in
listen_socket_t data structures. In case there is other per-socket state
(i.e. if we add authentication) we can put it there.
Also, I created a new "open_listen_socket_network" and removed the network
setup from "open_listen_socket". -- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1547 a5681a0c-68f1-0310-ab6d-d61299d08faa
and "FLUSHALL" commands are restricted to high-privilege sockets. "FLUSH"
commands can be executed on any socket. This is ideal for multi-user
installations where only certain users need write access to the RRD files.
Now, nearly all socket information is passed around the daemon in
listen_socket_t data structures. In case there is other per-socket state
(i.e. if we add authentication) we can put it there.
Also, I created a new "open_listen_socket_network" and removed the network
setup from "open_listen_socket". -- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1547 a5681a0c-68f1-0310-ab6d-d61299d08faa
This patch provides better error messages to the client when something
goes wrong with the daemon. When possible, the daemon error message is
passed through to rrd_set_error() on the client. Prior to this patch,
most error conditions would result in "Internal error", which is not very
helpful. -- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1546 a5681a0c-68f1-0310-ab6d-d61299d08faa
goes wrong with the daemon. When possible, the daemon error message is
passed through to rrd_set_error() on the client. Prior to this patch,
most error conditions would result in "Internal error", which is not very
helpful. -- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1546 a5681a0c-68f1-0310-ab6d-d61299d08faa
added examples
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1544 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1544 a5681a0c-68f1-0310-ab6d-d61299d08faa
spelling fix -- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1543 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1543 a5681a0c-68f1-0310-ab6d-d61299d08faa
This patch removes an extra "SIGNALS" section in the rrdcached.pod and
merges "[BUG] fixed hang in flush_file() introduced by per-file flush
condition". -- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1542 a5681a0c-68f1-0310-ab6d-d61299d08faa
merges "[BUG] fixed hang in flush_file() introduced by per-file flush
condition". -- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1542 a5681a0c-68f1-0310-ab6d-d61299d08faa
a few missing {{{ folding }}} markers added
-- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1541 a5681a0c-68f1-0310-ab6d-d61299d08faa
-- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1541 a5681a0c-68f1-0310-ab6d-d61299d08faa
This patch introduces "fast shutdown" mode and two new signals.
-- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1540 a5681a0c-68f1-0310-ab6d-d61299d08faa
-- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1540 a5681a0c-68f1-0310-ab6d-d61299d08faa
Moved signal handler setup out of daemonize(). Coalesced common code
in preparation for new signals. Documented behavior of existing signals.
-- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1539 a5681a0c-68f1-0310-ab6d-d61299d08faa
in preparation for new signals. Documented behavior of existing signals.
-- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1539 a5681a0c-68f1-0310-ab6d-d61299d08faa
Attached is a patch to lower the version requirements of libtool and
automake. I have tested this on CentOS 4.x with the specified
versions of libtool and automake and was able to build RRDTool fine.
I did *not* test building with PHP, tcl, ruby or Python though.
I also abstracted the version numbers of all the dependencies such
that editing them in the future will be easier.
-- Bernard Li
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1537 a5681a0c-68f1-0310-ab6d-d61299d08faa
automake. I have tested this on CentOS 4.x with the specified
versions of libtool and automake and was able to build RRDTool fine.
I did *not* test building with PHP, tcl, ruby or Python though.
I also abstracted the version numbers of all the dependencies such
that editing them in the future will be easier.
-- Bernard Li
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1537 a5681a0c-68f1-0310-ab6d-d61299d08faa
added support for FLUSHALL command -- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1535 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1535 a5681a0c-68f1-0310-ab6d-d61299d08faa
move cache broadcast into enqueue_cache_item -- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1534 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1534 a5681a0c-68f1-0310-ab6d-d61299d08faa
When -z <jitter> is specified, some updates may be timestamped up to
<jitter> seconcds in the future. Therefore, a timeout of now+1 may not be
sufficient. Set abs_timeout past the point where any updates are
currently specified. -- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1533 a5681a0c-68f1-0310-ab6d-d61299d08faa
<jitter> seconcds in the future. Therefore, a timeout of now+1 may not be
sufficient. Set abs_timeout past the point where any updates are
currently specified. -- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1533 a5681a0c-68f1-0310-ab6d-d61299d08faa
The PID file is created with open() in the parent process, while we still
have STDERR open. If it cannot be created, it complains verbosely to
stderr.
The PID file is written in the child process. The only way the fdopen()
will fail on a fd that is already open is if you're completely out of
memory. As in other places in the code, I didn't consider this a case
that required a very verbose message. (Search for "strdup failed"). If
you still think a more verbose message is called for, please suggest one.
The attached patch corrects the error message to complain about fdopen()
vs fopen(). I hadn't noticed that until you brought it up.
-- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1532 a5681a0c-68f1-0310-ab6d-d61299d08faa
have STDERR open. If it cannot be created, it complains verbosely to
stderr.
The PID file is written in the child process. The only way the fdopen()
will fail on a fd that is already open is if you're completely out of
memory. As in other places in the code, I didn't consider this a case
that required a very verbose message. (Search for "strdup failed"). If
you still think a more verbose message is called for, please suggest one.
The attached patch corrects the error message to complain about fdopen()
vs fopen(). I hadn't noticed that until you brought it up.
-- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1532 a5681a0c-68f1-0310-ab6d-d61299d08faa
rrd.h, librrd.sym: Define and export rrd_info_r() -- Sebastian Harl
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1531 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1531 a5681a0c-68f1-0310-ab6d-d61299d08faa
vdef calc was using end_orig to determine for which range it should do its
calculations which is odd, since orig is only the requested range as
invocation time and not the data range deliverd by fetch. It does fall
completely flat when shifting since shifting does not affect the original
data. Bug #177 reported by hokiel
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1530 a5681a0c-68f1-0310-ab6d-d61299d08faa
calculations which is odd, since orig is only the requested range as
invocation time and not the data range deliverd by fetch. It does fall
completely flat when shifting since shifting does not affect the original
data. Bug #177 reported by hokiel
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1530 a5681a0c-68f1-0310-ab6d-d61299d08faa
rrdxport was completely broken for exporting datasources that did not have a uniform step size. Thanks to Peter Valdemar Mørch for finding this.
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1529 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1529 a5681a0c-68f1-0310-ab6d-d61299d08faa
create the pid file before forking, so we can complain to stderr -- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1528 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1528 a5681a0c-68f1-0310-ab6d-d61299d08faa
This patch ensures that the "FLUSH" command will write the updates out to
RRD before returning to the user. Before, it returned when the update was
"dequeued"; updates were not necessarily on disk.
Also, for new nodes, the cache_lock is not held while we are setting up
the new node. We don't want to be holding the lock if the stat() blocks.
-- kevin brintnal
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1527 a5681a0c-68f1-0310-ab6d-d61299d08faa
RRD before returning to the user. Before, it returned when the update was
"dequeued"; updates were not necessarily on disk.
Also, for new nodes, the cache_lock is not held while we are setting up
the new node. We don't want to be holding the lock if the stat() blocks.
-- kevin brintnal
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1527 a5681a0c-68f1-0310-ab6d-d61299d08faa
Use the same IPv6/IPv4 as for the client as Florian did for the server -- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1526 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1526 a5681a0c-68f1-0310-ab6d-d61299d08faa