oetiker [Thu, 16 Oct 2008 21:30:17 +0000 (21:30 +0000)]
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/program@1614
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Thu, 16 Oct 2008 21:12:27 +0000 (21:12 +0000)]
- 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/program@1613
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Thu, 16 Oct 2008 21:05:51 +0000 (21:05 +0000)]
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/program@1612
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Thu, 16 Oct 2008 06:11:54 +0000 (06:11 +0000)]
error reporting caused crash in journal replay
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1610
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Thu, 16 Oct 2008 06:11:44 +0000 (06:11 +0000)]
better build docs
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1609
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Wed, 15 Oct 2008 05:29:41 +0000 (05:29 +0000)]
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/program@1607
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Tue, 14 Oct 2008 20:14:35 +0000 (20:14 +0000)]
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/program@1606
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Tue, 14 Oct 2008 19:23:24 +0000 (19:23 +0000)]
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/program@1605
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Tue, 14 Oct 2008 19:08:56 +0000 (19:08 +0000)]
* 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/program@1604
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Tue, 14 Oct 2008 19:08:36 +0000 (19:08 +0000)]
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/program@1603
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Tue, 14 Oct 2008 19:08:00 +0000 (19:08 +0000)]
rrdcached treats relative and absolute paths the same -- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1602
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Tue, 14 Oct 2008 11:33:37 +0000 (11:33 +0000)]
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/program@1601
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Tue, 14 Oct 2008 06:37:19 +0000 (06:37 +0000)]
clearer way of advancing the flush time
-- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1600
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Mon, 13 Oct 2008 22:07:14 +0000 (22:07 +0000)]
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/program@1599
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Mon, 13 Oct 2008 18:41:12 +0000 (18:41 +0000)]
fixed bad folding marker (on handle_request_flush)
-- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1598
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Sat, 11 Oct 2008 09:53:40 +0000 (09:53 +0000)]
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/program@1597
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Sat, 11 Oct 2008 09:37:53 +0000 (09:37 +0000)]
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/program@1596
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Fri, 10 Oct 2008 05:21:19 +0000 (05:21 +0000)]
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/program@1595
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Fri, 10 Oct 2008 05:21:01 +0000 (05:21 +0000)]
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/program@1594
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Fri, 10 Oct 2008 05:19:06 +0000 (05:19 +0000)]
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/program@1593
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Wed, 8 Oct 2008 20:47:04 +0000 (20:47 +0000)]
Split-out rrd-cached subpackage -- Bernard Li
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1592
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Wed, 8 Oct 2008 05:49:24 +0000 (05:49 +0000)]
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/program@1591
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Wed, 8 Oct 2008 05:47:39 +0000 (05:47 +0000)]
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/program@1590
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Wed, 8 Oct 2008 05:46:21 +0000 (05:46 +0000)]
fixed typo
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1589
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Tue, 7 Oct 2008 21:10:54 +0000 (21:10 +0000)]
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/program@1588
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Tue, 7 Oct 2008 21:08:30 +0000 (21:08 +0000)]
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/program@1587
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Tue, 7 Oct 2008 16:28:24 +0000 (16:28 +0000)]
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/program@1586
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Tue, 7 Oct 2008 15:37:34 +0000 (15:37 +0000)]
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/program@1584
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Mon, 6 Oct 2008 19:14:17 +0000 (19:14 +0000)]
Makefile.lua is now generated
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1583
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Mon, 6 Oct 2008 19:13:30 +0000 (19:13 +0000)]
added missing file from lua 5.0 integration patch
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1582
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Mon, 6 Oct 2008 19:05:47 +0000 (19:05 +0000)]
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/program@1581
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Mon, 6 Oct 2008 19:04:48 +0000 (19:04 +0000)]
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/program@1580
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Mon, 6 Oct 2008 05:05:19 +0000 (05:05 +0000)]
Support to Lua 5.0 -- Fidelis Assis
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1579
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Sat, 4 Oct 2008 16:05:11 +0000 (16:05 +0000)]
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/program@1575
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Sat, 4 Oct 2008 13:34:54 +0000 (13:34 +0000)]
* 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/program@1571
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Fri, 3 Oct 2008 22:53:28 +0000 (22:53 +0000)]
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/program@1570
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Thu, 2 Oct 2008 19:17:18 +0000 (19:17 +0000)]
folding fix
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1567
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Thu, 2 Oct 2008 19:08:30 +0000 (19:08 +0000)]
missing spaces in extconf.rb caused compile failure -- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1566
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Thu, 2 Oct 2008 17:17:58 +0000 (17:17 +0000)]
permission fix for rrdcached socket -- Daniel.Pocock
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1565
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Wed, 1 Oct 2008 20:22:57 +0000 (20:22 +0000)]
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/program@1559
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Wed, 1 Oct 2008 20:04:47 +0000 (20:04 +0000)]
Clearer explanation on which paths are permitted when -B is supplied -- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1558
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Wed, 1 Oct 2008 20:01:43 +0000 (20:01 +0000)]
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/program@1557
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Wed, 1 Oct 2008 19:48:15 +0000 (19:48 +0000)]
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/program@1556
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Wed, 1 Oct 2008 19:44:36 +0000 (19:44 +0000)]
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/program@1555
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Wed, 1 Oct 2008 16:53:56 +0000 (16:53 +0000)]
lcd is actually gcd!
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1552
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Tue, 30 Sep 2008 18:44:03 +0000 (18:44 +0000)]
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/program@1551
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Tue, 30 Sep 2008 18:43:15 +0000 (18:43 +0000)]
check permissions before writing to journal -- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1550
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Tue, 30 Sep 2008 18:42:34 +0000 (18:42 +0000)]
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/program@1549
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Mon, 29 Sep 2008 20:00:34 +0000 (20:00 +0000)]
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/program@1548
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Mon, 29 Sep 2008 19:58:34 +0000 (19:58 +0000)]
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/program@1547
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Mon, 29 Sep 2008 19:56:10 +0000 (19:56 +0000)]
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/program@1546
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Sun, 28 Sep 2008 21:37:46 +0000 (21:37 +0000)]
spelling fix -- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1543
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Sun, 28 Sep 2008 21:36:46 +0000 (21:36 +0000)]
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/program@1542
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Sun, 28 Sep 2008 19:27:45 +0000 (19:27 +0000)]
a few missing {{{ folding }}} markers added
-- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1541
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Sun, 28 Sep 2008 19:26:39 +0000 (19:26 +0000)]
This patch introduces "fast shutdown" mode and two new signals.
-- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1540
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Sun, 28 Sep 2008 19:25:40 +0000 (19:25 +0000)]
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/program@1539
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Sun, 28 Sep 2008 19:23:23 +0000 (19:23 +0000)]
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/program@1537
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Sun, 28 Sep 2008 19:12:22 +0000 (19:12 +0000)]
added support for FLUSHALL command -- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1535
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Sun, 28 Sep 2008 19:10:57 +0000 (19:10 +0000)]
move cache broadcast into enqueue_cache_item -- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1534
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Sun, 28 Sep 2008 19:10:15 +0000 (19:10 +0000)]
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/program@1533
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Sun, 28 Sep 2008 19:09:34 +0000 (19:09 +0000)]
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/program@1532
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Sun, 28 Sep 2008 19:08:41 +0000 (19:08 +0000)]
rrd.h, librrd.sym: Define and export rrd_info_r() -- Sebastian Harl
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1531
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Sun, 28 Sep 2008 15:01:43 +0000 (15:01 +0000)]
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/program@1530
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Sat, 27 Sep 2008 11:44:58 +0000 (11:44 +0000)]
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/program@1529
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Fri, 26 Sep 2008 05:11:32 +0000 (05:11 +0000)]
create the pid file before forking, so we can complain to stderr -- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1528
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Fri, 26 Sep 2008 05:10:25 +0000 (05:10 +0000)]
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/program@1527
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Thu, 25 Sep 2008 21:07:35 +0000 (21:07 +0000)]
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/program@1526
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Thu, 25 Sep 2008 20:31:29 +0000 (20:31 +0000)]
This fixes a couple problems when exiting due to signal:
* connection threads exit without closing client socket
(so client blocks waiting for response that never comes)
* listen_queue_thread blocks on poll() until a new connection comes in
(because no poll timeout specified)
-- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1525
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Thu, 25 Sep 2008 20:11:43 +0000 (20:11 +0000)]
set SO_REUSEADDR on the listen socket -- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1524
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Thu, 25 Sep 2008 20:10:17 +0000 (20:10 +0000)]
Support for IPv6 has been broken with revision 1522: Because IPv6-addresses
contain colons, simply checking for a colon and using everything after it does
destroy correctly formatted IPv6-addresses.
This patch checks for dots '.' in the address. If the address contains at least
one dot, it is considered to be a hostname or an IPv4-address and a simple
search for a colon is done.
If no dot is found, the code will check for an opening square bracket '[' at
the beginning of the address. If one if found, the format
[address]:port
is assumed.
If neither applies, the default port will be used.
-- Florian Forster
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1523
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Thu, 25 Sep 2008 15:25:51 +0000 (15:25 +0000)]
This adds support for <address>:<port> in the rrd client library.
Obviously this is required to take advantage of the server's ability to
bind to a non-standard port -- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1522
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Wed, 24 Sep 2008 22:21:21 +0000 (22:21 +0000)]
Allow ports to be specified with -l addr:port also. -- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1521
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Wed, 24 Sep 2008 22:07:33 +0000 (22:07 +0000)]
the rrdlua.pod is in the doc directory
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1520
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Wed, 24 Sep 2008 06:04:26 +0000 (06:04 +0000)]
added section on error reporting -- Florian Forster
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1519
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Mon, 22 Sep 2008 06:35:26 +0000 (06:35 +0000)]
I finally finished the first version of the patch (attached) -- Fidelis Assis fidelis pobox.com
(this does not seem to quite work yet at least not in my hardy setup)
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1517
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Mon, 22 Sep 2008 05:38:28 +0000 (05:38 +0000)]
use default prefix for ruby install if no user defined prefix is available
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1515
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Fri, 19 Sep 2008 20:34:42 +0000 (20:34 +0000)]
Bsd lirary path switch added to perl bindings makefile -- as suggested by Kevin Brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1513
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Thu, 18 Sep 2008 13:30:48 +0000 (13:30 +0000)]
Fix for debian bug 498183 ... never *advise after the end of the
file. On sparc this causes a segfault. Thanks to Sebastian Harl and Jurij Smakov for finding this.
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1512
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Sun, 14 Sep 2008 15:30:43 +0000 (15:30 +0000)]
fix RRDCacheD documentation -- Florian Forster
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1507
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Sun, 14 Sep 2008 15:28:34 +0000 (15:28 +0000)]
The previous code was broken: The response was read using `read(2)'. If
the server wasn't sending fast enough, the client would stop reading
before the entire message had been read.
This patch changes the communication code to use the (line based)
`fgets' function rather than the lower level `read' function. After
reading the first line (which contains the total number of line to be
expected), this precise number of lines is read - blocking if necessary.
Also, the missing four new statistic values have been added to
`rrdc_stats_get'.
--Folorian Forester
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1506
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Sun, 14 Sep 2008 10:35:51 +0000 (10:35 +0000)]
did not pick up all the changes for rrdcached in the first round ... so here is the second batch.
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1505
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Sun, 14 Sep 2008 09:49:03 +0000 (09:49 +0000)]
RRDcached patch. This implements an infrastructure, where rrd updates can be
sent to a daemon which caches them prior to bulk-updateing rrd files. See the rrdcached manual page.
-- Created by Florian Forster with some help from Kevin Brintnall.
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1504
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Sat, 13 Sep 2008 11:42:08 +0000 (11:42 +0000)]
regarding #183:
* move part of rrd_config.h out to a separate file, so that
autoconf is not confused by the more complex expressions.
* fix configure variable name to allow caching
* another attemt at fixing solaris 2.8 compile so that it
works out of the box.
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1502
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Sat, 13 Sep 2008 10:56:40 +0000 (10:56 +0000)]
fix graph docs
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1501
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Thu, 11 Sep 2008 20:27:47 +0000 (20:27 +0000)]
fixed processing of custom fonts René GARCIA <rene@margar.fr>
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1500
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Thu, 11 Sep 2008 07:01:30 +0000 (07:01 +0000)]
no , on the last member in C
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1499
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Sun, 7 Sep 2008 07:19:03 +0000 (07:19 +0000)]
The attached patch eliminates the many places where the rra_current pointer was maintained; the existing write/seek mechanisms update rrd_file->pos correctly.
Also, the seek at the front of process_arg is not necessary; write_to_rras will now take care to correct the file position at every update cycle.
This eliminates unnecessary rrd_seek() calls when MMAP is not enabled. -- kevin brintnall kbrint rufus.net
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1488
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Sat, 6 Sep 2008 14:24:43 +0000 (14:24 +0000)]
prepare for the release of rrdtool-1.3.2
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1484
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Sat, 6 Sep 2008 11:46:41 +0000 (11:46 +0000)]
we need rrd_format.h here for things to compile properly
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1483
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Sat, 6 Sep 2008 11:43:10 +0000 (11:43 +0000)]
updated opensolaris build instructions
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1482
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Sat, 6 Sep 2008 10:43:07 +0000 (10:43 +0000)]
only link build and use rrd_getopt if there is no getopt_long provided by
by the os ... this should also fix problems for solaris 2.8 and other
non getopt_long oses who were not taken care of anymore after the intriduction of librrd.sym
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1481
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Sat, 6 Sep 2008 10:39:29 +0000 (10:39 +0000)]
fix for multi update - data corruption bug as reported (and patched) in #178 by kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1480
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Sat, 6 Sep 2008 10:32:57 +0000 (10:32 +0000)]
make pod checker happy
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1479
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Sat, 6 Sep 2008 08:58:18 +0000 (08:58 +0000)]
inline functions are not supported in c99 ... lets remove this.
the compiler will foture it out if they are important.
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1478
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Thu, 4 Sep 2008 21:45:44 +0000 (21:45 +0000)]
introduced a persistant fontmap ... this makes our pango rendering 6 times faster starting from the second graph we draw.
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1477
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Sun, 31 Aug 2008 23:42:02 +0000 (23:42 +0000)]
now the results actually look as they did with the old code only things are FASTER
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1476
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Sun, 31 Aug 2008 22:53:49 +0000 (22:53 +0000)]
Improve performance by keeping multiple pango font descriptions. For the first invocation we are about 20% times as fast
for the second one about 4-5 times faster ...
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1475
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Sun, 31 Aug 2008 10:55:24 +0000 (10:55 +0000)]
trying to improve the pango performance I added facilities to cache layout,context and more in between invocations of
the text function, unfortunately it does not seem to help all that much.
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1474
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Sun, 31 Aug 2008 10:52:49 +0000 (10:52 +0000)]
use the standart info free function
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1473
a5681a0c-68f1-0310-ab6d-
d61299d08faa
oetiker [Thu, 28 Aug 2008 05:49:02 +0000 (05:49 +0000)]
fix handling of error conditions in rrd_tool.c ... errno is not for detection, only for information AFTER detection.
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1471
a5681a0c-68f1-0310-ab6d-
d61299d08faa