rrdtool.git
11 years agosrc/rrd_daemon.c: Add Kevin to the list of copyright holders. ff/rrdd
Florian Forster [Sun, 14 Sep 2008 08:30:57 +0000 (10:30 +0200)]
src/rrd_daemon.c: Add Kevin to the list of copyright holders.

11 years agoMerge branch 'master' into ff/rrdd
Florian Forster [Sun, 14 Sep 2008 08:23:10 +0000 (10:23 +0200)]
Merge branch 'master' into ff/rrdd

11 years agoCONTRIBUTORS: Added Kevin Brintnall.
Florian Forster [Sun, 14 Sep 2008 08:21:24 +0000 (10:21 +0200)]
CONTRIBUTORS: Added Kevin Brintnall.

11 years agosrc/rrd_daemon.c: Re-introduce the strict C99/POSIX defines.
Florian Forster [Sun, 14 Sep 2008 08:15:37 +0000 (10:15 +0200)]
src/rrd_daemon.c: Re-introduce the strict C99/POSIX defines.

They're commented out using `#if 0' because Kevin reported problems with
it. This way they can easily be activated for development and debugging.

11 years agosrc/rrd_{client,tool}.h: Move `rrdc_flush_if_daemon' to the `client' header.
Florian Forster [Sun, 14 Sep 2008 08:13:57 +0000 (10:13 +0200)]
src/rrd_{client,tool}.h: Move `rrdc_flush_if_daemon' to the `client' header.

It's defined in `rrd_client.c', so it should be declared in `rrd_client.h'.

11 years agosrc/rrd_daemon.c: Remove another `goto'.
Florian Forster [Sun, 14 Sep 2008 07:56:33 +0000 (09:56 +0200)]
src/rrd_daemon.c: Remove another `goto'.

It only looks much because some indentation has been changed.

11 years agosrc/rrd_daemon.c: Fix vim `folding'.
Florian Forster [Sun, 14 Sep 2008 07:55:54 +0000 (09:55 +0200)]
src/rrd_daemon.c: Fix vim `folding'.

11 years agosrc/rrd_daemon.c: Remove a goto.
Florian Forster [Sun, 14 Sep 2008 07:52:16 +0000 (09:52 +0200)]
src/rrd_daemon.c: Remove a goto.

It takes two more lines, both of which are parenthesis. It's worth it ;)

11 years agoBig bunch of improvements for the caching daemon. kb/rrdd
Kevin Brintnall [Sun, 14 Sep 2008 07:26:58 +0000 (09:26 +0200)]
Big bunch of improvements for the caching daemon.

Tobi et al.,

I have made some enhancements to Florian's rrdcached patch.  This patch
(against /trunk) can be found at the following URL.  Testing has shown it
to be production ready.

http://dist.rufus.net/~kbrint/rrdcached/rrdcache.patch
http://dist.rufus.net/~kbrint/rrdcached/rrdcache.patch.asc

It applies cleanly to 1.3.2 as well (with obligatory automake;autoconf).

The enhancements over Florian's version are in the postscript.

--
 kevin brintnall =~ /kbrint@rufus.net/

=================================================================

fixed: removed extra compiler pragmas that caused portability problems

added: more server logging (startup, shutdown, ...)

added: client maintains a cached connection across multiple commands.
  correctly handles a long-running process where some commands are specified
  with --daemon and others are specified without

fixed: consolidated duplicate code for finding daemon addr (from --daemon
  or environment).

fixed: update with --template and daemon specified by environment was not
  treated properly in rrd_update.c:rrd_update(line ~442)

fixed: memory leak with ci->values not being freed

added: added -z to spread write load

fixed: check that file is writable before accepting UPDATE

fixed: queue_thread_main: avoid tight-spin when we're scheduling the next
  flush.  old code called flush_old_values(-1) once per update for up to a
  full second. ("<" vs "<=" comparison)

added: journal support with recovery

fixed: signal handlers wake up queue_thread for timely shutdown

fixed: refuse to start if pid file present at startup

added: more stats

fixed: "flush file" should not error if file exists on the file system,
  but not in update cache.  the file may have been flushed due to
  inactivity, or the daemon may have just started up.  if the file exists,
  return success.  still fails if files does not exist at all on disk.

fixed: ENODATA is not portable

11 years agoregarding #183:
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

11 years agofix graph docs
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

11 years agofixed processing of custom fonts René GARCIA <rene@margar.fr>
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

11 years agono , on the last member in C
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

11 years agoMerge branch 'master' into ff/rrdd
Florian Forster [Mon, 8 Sep 2008 07:52:30 +0000 (09:52 +0200)]
Merge branch 'master' into ff/rrdd

Conflicts:

doc/rrdgraph.pod
src/librrd.sym.in
src/rrd_lastupdate.c
src/rrd_update.c

11 years agoThe attached patch eliminates the many places where the rra_current pointer was maint...
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

11 years agoprepare for the release of rrdtool-1.3.2
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

11 years agowe need rrd_format.h here for things to compile properly
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

11 years agoupdated opensolaris build instructions
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

11 years agoonly link build and use rrd_getopt if there is no getopt_long provided by
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

11 years agofix for multi update - data corruption bug as reported (and patched) in #178 by kevin...
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

11 years agomake pod checker happy
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

11 years agoinline functions are not supported in c99 ... lets remove this.
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

11 years agointroduced a persistant fontmap ... this makes our pango rendering 6 times faster...
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

11 years agoMerge branch 'master' into ff/rrdd
Florian Forster [Tue, 2 Sep 2008 09:36:35 +0000 (11:36 +0200)]
Merge branch 'master' into ff/rrdd

Conflicts:

src/rrd_lastupdate.c
src/rrd_update.c

11 years agonow the results actually look as they did with the old code only things are FASTER
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

11 years agoImprove performance by keeping multiple pango font descriptions. For the first invoca...
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

11 years agotrying to improve the pango performance I added facilities to cache layout,context...
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

11 years agouse the standart info free function
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

11 years agofix handling of error conditions in rrd_tool.c ... errno is not for detection, only...
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

11 years agofree the linebuffer if you don't return it!
oetiker [Thu, 28 Aug 2008 04:13:39 +0000 (04:13 +0000)]
free the linebuffer if you don't return it!

git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1470 a5681a0c-68f1-0310-ab6d-d61299d08faa

11 years agosome more leak plugging
oetiker [Wed, 27 Aug 2008 22:06:43 +0000 (22:06 +0000)]
some more leak plugging

git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1469 a5681a0c-68f1-0310-ab6d-d61299d08faa

11 years agodrop the dummy surface prior to creating the real one
oetiker [Wed, 27 Aug 2008 21:48:50 +0000 (21:48 +0000)]
drop the dummy surface prior to creating the real one

git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1468 a5681a0c-68f1-0310-ab6d-d61299d08faa

11 years agoadded some freeing for error conditions
oetiker [Wed, 27 Aug 2008 21:46:01 +0000 (21:46 +0000)]
added some freeing for error conditions

git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1467 a5681a0c-68f1-0310-ab6d-d61299d08faa

11 years agofixed indentation ... gnu indent results are not realy beautifl. I might switch...
oetiker [Wed, 27 Aug 2008 21:25:43 +0000 (21:25 +0000)]
fixed indentation  ... gnu indent results are not realy beautifl. I might switch to uncrustify.

git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1466 a5681a0c-68f1-0310-ab6d-d61299d08faa

11 years agoMany rrd_create memory leaks patched ... based on valgrind analysis by Sven Engelhard...
oetiker [Wed, 27 Aug 2008 21:25:04 +0000 (21:25 +0000)]
Many rrd_create memory leaks patched ... based on valgrind analysis by Sven Engelhardt. Thanks!

git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1465 a5681a0c-68f1-0310-ab6d-d61299d08faa

11 years agofix indentation
oetiker [Wed, 27 Aug 2008 21:18:46 +0000 (21:18 +0000)]
fix indentation

git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1464 a5681a0c-68f1-0310-ab6d-d61299d08faa

11 years agoadded sparc-sun-solaris2.8 to list of broken isfinite implementations
oetiker [Wed, 27 Aug 2008 06:52:33 +0000 (06:52 +0000)]
added  sparc-sun-solaris2.8 to list of broken isfinite implementations

git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1463 a5681a0c-68f1-0310-ab6d-d61299d08faa

11 years agoit is rb_rrd_infocall not rrd_infocall ...
oetiker [Fri, 22 Aug 2008 22:04:37 +0000 (22:04 +0000)]
it is rb_rrd_infocall not rrd_infocall ...

git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1462 a5681a0c-68f1-0310-ab6d-d61299d08faa

11 years agoWhen in lazy mode, and the graph does not get regenerated, then there are no
oetiker [Sat, 16 Aug 2008 07:13:01 +0000 (07:13 +0000)]
When in lazy mode, and the graph does not get regenerated, then there are no
results from PRINT either. Fix for #163.

git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1461 a5681a0c-68f1-0310-ab6d-d61299d08faa

11 years agodocumentation updates
oetiker [Sat, 16 Aug 2008 07:11:46 +0000 (07:11 +0000)]
documentation updates

git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1460 a5681a0c-68f1-0310-ab6d-d61299d08faa

11 years agomake sure imageinfo only reports the filename and not the whole path. This is a regre...
oetiker [Tue, 12 Aug 2008 06:48:37 +0000 (06:48 +0000)]
make sure imageinfo only reports the filename and not the whole path. This is a regression from 1.2.x where this was implemented properly.

git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1459 a5681a0c-68f1-0310-ab6d-d61299d08faa

11 years agoThe attached patch converts the given string to UTF-8 using glib's
oetiker [Mon, 4 Aug 2008 20:35:45 +0000 (20:35 +0000)]
The attached patch converts the given string to UTF-8 using glib's
g_locale_to_utf8() function. This function expects the string to be
encoded as specified by the locale settings, so this will fail if e.g.
you're using some script which is encoded in some way incompatible to
the locale settings. In this case, the patch falls back to use the
original string as provided by the user as there is no way to tell how
to interpret that string. So, in this case, you will still get the old
behavior (that pango warning and messed up strings in the graph).
However, imho this is perfectly fine since it should be up to the user
to take care of a sane environment. -- Sebastian Harl

git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1457 a5681a0c-68f1-0310-ab6d-d61299d08faa

11 years agonewer perlapi docu suggests to use SV * instead of void for managed returns
oetiker [Tue, 29 Jul 2008 14:42:08 +0000 (14:42 +0000)]
newer perlapi docu suggests to  use SV * instead of void for managed returns

git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1456 a5681a0c-68f1-0310-ab6d-d61299d08faa

11 years agofixed some c++ style lines -- David Masterson
oetiker [Tue, 29 Jul 2008 05:08:46 +0000 (05:08 +0000)]
fixed some c++ style lines -- David Masterson

git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1455 a5681a0c-68f1-0310-ab6d-d61299d08faa

11 years agospelling fix
oetiker [Mon, 28 Jul 2008 07:23:15 +0000 (07:23 +0000)]
spelling fix

git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1454 a5681a0c-68f1-0310-ab6d-d61299d08faa

11 years agoforward ported patch for rra cur_row randomization in rrd_restore from 1.2.28 to...
oetiker [Wed, 23 Jul 2008 15:03:43 +0000 (15:03 +0000)]
forward ported patch for rra cur_row randomization in rrd_restore from 1.2.28 to 1.3.1

git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1453 a5681a0c-68f1-0310-ab6d-d61299d08faa

11 years agoprepare for the release of rrdtool-1.3.1
oetiker [Wed, 23 Jul 2008 13:02:26 +0000 (13:02 +0000)]
prepare for the release of rrdtool-1.3.1

git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1447 a5681a0c-68f1-0310-ab6d-d61299d08faa

11 years agoadded support for restoring rrdtool 1.0.x files ... removed support for old HW patche...
oetiker [Wed, 23 Jul 2008 12:45:52 +0000 (12:45 +0000)]
added support for restoring rrdtool 1.0.x files ... removed support for old HW patched rrd format created by an early patched version of 1.0.x

git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1446 a5681a0c-68f1-0310-ab6d-d61299d08faa

11 years agoFix for #167 - rrdcreate is arguably missing a check for 'step>=1' for RRAs with...
oetiker [Tue, 22 Jul 2008 15:15:44 +0000 (15:15 +0000)]
Fix for #167 - rrdcreate is arguably missing a check for 'step>=1' for RRAs with AVERAGE as a CF. I ran into this when specifying 0.6 as a step value, assuming floats were also accepted. Patch attached here. -- Bogdan

git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1445 a5681a0c-68f1-0310-ab6d-d61299d08faa

11 years agosrc/rrd_daemon.c: Flush ALL values when/before shutting down.
Florian Forster [Fri, 4 Jul 2008 10:19:14 +0000 (12:19 +0200)]
src/rrd_daemon.c: Flush ALL values when/before shutting down.

11 years agorrdcached(1): Document which commands are aware of the daemon.
Florian Forster [Tue, 15 Jul 2008 18:20:17 +0000 (20:20 +0200)]
rrdcached(1): Document which commands are aware of the daemon.

11 years agorrdtool(1): Add a pointer to the rrdcached(1) manpage.
Florian Forster [Tue, 15 Jul 2008 18:11:57 +0000 (20:11 +0200)]
rrdtool(1): Add a pointer to the rrdcached(1) manpage.

11 years agorrdxport(1): Add `--daemon' to the synopsis.
Florian Forster [Tue, 15 Jul 2008 18:07:07 +0000 (20:07 +0200)]
rrdxport(1): Add `--daemon' to the synopsis.

11 years agorrdfetch(1): Add `--daemon' to the synopsis.
Florian Forster [Tue, 15 Jul 2008 18:06:41 +0000 (20:06 +0200)]
rrdfetch(1): Add `--daemon' to the synopsis.

11 years agorrdlastupdate(1): Document the new `--daemon' option.
Florian Forster [Tue, 15 Jul 2008 18:06:13 +0000 (20:06 +0200)]
rrdlastupdate(1): Document the new `--daemon' option.

11 years agorrdlast(1): Document the new `--daemon' option.
Florian Forster [Tue, 15 Jul 2008 18:05:49 +0000 (20:05 +0200)]
rrdlast(1): Document the new `--daemon' option.

11 years agorrdinfo(1): Document the new `--daemon' option.
Florian Forster [Tue, 15 Jul 2008 18:05:34 +0000 (20:05 +0200)]
rrdinfo(1): Document the new `--daemon' option.

11 years agorrddump(1): Document the new `--daemon' option.
Florian Forster [Tue, 15 Jul 2008 18:05:11 +0000 (20:05 +0200)]
rrddump(1): Document the new `--daemon' option.

11 years agorrdtool(1): Add a pointer to the rrdflush(1) manual page.
Florian Forster [Tue, 15 Jul 2008 18:04:16 +0000 (20:04 +0200)]
rrdtool(1): Add a pointer to the rrdflush(1) manual page.

11 years agorrdflush(1): Added a manual page for the `flush' command.
Florian Forster [Tue, 15 Jul 2008 18:02:43 +0000 (20:02 +0200)]
rrdflush(1): Added a manual page for the `flush' command.

11 years agosrc/rrd_{fetch,update}.c: Rename the variable `daemon' to `opt_daemon'.
Florian Forster [Tue, 15 Jul 2008 17:30:18 +0000 (19:30 +0200)]
src/rrd_{fetch,update}.c: Rename the variable `daemon' to `opt_daemon'.

This resolves a stupid warning GCC throws..

11 years agosrc/rrd_info.c: Implement the `--daemon' option for `rrdtool last'.
Florian Forster [Tue, 15 Jul 2008 17:28:28 +0000 (19:28 +0200)]
src/rrd_info.c: Implement the `--daemon' option for `rrdtool last'.

11 years agosrc/rrd_flush.c: Add the `flush' command to the `rrdtool' application.
Florian Forster [Tue, 15 Jul 2008 17:20:42 +0000 (19:20 +0200)]
src/rrd_flush.c: Add the `flush' command to the `rrdtool' application.

11 years agosrc/rrd_dump.c: Rename the `rrdcached' variable to `opt_daemon'.
Florian Forster [Sun, 13 Jul 2008 14:08:50 +0000 (16:08 +0200)]
src/rrd_dump.c: Rename the `rrdcached' variable to `opt_daemon'.

11 years agosrc/rrd_lastupdate.c: Implement the `--daemon' option for `rrdtool lastupdate'.
Florian Forster [Sun, 13 Jul 2008 14:08:21 +0000 (16:08 +0200)]
src/rrd_lastupdate.c: Implement the `--daemon' option for `rrdtool lastupdate'.

The new library function `rrd_lastupdate' takes the usual (argc, argv)
arguments. The `rrd_lastupdate_r' function has been changed to receive
a file name directly instead of using only argv[1].

11 years agosrc/rrd_last.c: Implement the `--daemon' option for `rrdtool last'.
Florian Forster [Sun, 13 Jul 2008 14:03:10 +0000 (16:03 +0200)]
src/rrd_last.c: Implement the `--daemon' option for `rrdtool last'.

11 years agosrc/rrd_dump.c: Implement the `--daemon' option for `rrdtool dump'.
Florian Forster [Sun, 13 Jul 2008 12:49:58 +0000 (14:49 +0200)]
src/rrd_dump.c: Implement the `--daemon' option for `rrdtool dump'.

11 years agosrc/rrd_daemon.c: Stat files before creating a tree-node for them.
Florian Forster [Sun, 13 Jul 2008 12:34:33 +0000 (14:34 +0200)]
src/rrd_daemon.c: Stat files before creating a tree-node for them.

This way `rrdtool update' does complain about nonexistent files.

11 years agosrc/rrd_daemon.c: Only increate number of updates and datasets if no failure.
Florian Forster [Thu, 3 Jul 2008 21:23:05 +0000 (23:23 +0200)]
src/rrd_daemon.c: Only increate number of updates and datasets if no failure.

11 years agosrc/librrd.sym: Export the `rrdc_{connect,disconnect,update,flush} symbols.
Florian Forster [Thu, 3 Jul 2008 20:50:21 +0000 (22:50 +0200)]
src/librrd.sym: Export the `rrdc_{connect,disconnect,update,flush} symbols.

11 years agosrc/rrd_daemon.c: Create listen threads in the detached state.
Florian Forster [Thu, 3 Jul 2008 20:49:51 +0000 (22:49 +0200)]
src/rrd_daemon.c: Create listen threads in the detached state.

11 years agosrc/rrd_daemon.c: Remove remaining debug messages.
Florian Forster [Thu, 3 Jul 2008 15:50:53 +0000 (17:50 +0200)]
src/rrd_daemon.c: Remove remaining debug messages.

11 years agosrc/rrd_update.c: Set `rc' correctly when succeeding.
Florian Forster [Thu, 3 Jul 2008 15:47:25 +0000 (17:47 +0200)]
src/rrd_update.c: Set `rc' correctly when succeeding.

11 years agosrc/rrd_daemon.c: Instann the SIGTERM handler correctly.
Florian Forster [Thu, 3 Jul 2008 15:47:03 +0000 (17:47 +0200)]
src/rrd_daemon.c: Instann the SIGTERM handler correctly.

11 years agorrdcached(1): Some typo and minor formulation fixes.
Florian Forster [Thu, 3 Jul 2008 15:16:37 +0000 (17:16 +0200)]
rrdcached(1): Some typo and minor formulation fixes.

11 years agorrdcached(1): Documented the protocol used by the daemon.
Florian Forster [Thu, 3 Jul 2008 15:14:04 +0000 (17:14 +0200)]
rrdcached(1): Documented the protocol used by the daemon.

Some statistic values have been renamed. This has been changed in
src/rrd_daemon.c, too.

11 years agosrc/rrd_daemon.c: Don't close the socket if UPDATE fails.
Florian Forster [Thu, 3 Jul 2008 12:32:12 +0000 (14:32 +0200)]
src/rrd_daemon.c: Don't close the socket if UPDATE fails.

11 years agosrc/rrd_daemon.c: Use `sread' and `swrite' instead of read(2) and write(2).
Florian Forster [Thu, 3 Jul 2008 09:39:13 +0000 (11:39 +0200)]
src/rrd_daemon.c: Use `sread' and `swrite' instead of read(2) and write(2).

The ``secure'' sread assures that the received string ends with a newline,
strips it off the buffer and assures that the returned buffer is null
terminated. swrite returns success only if all bytes could be written.

11 years agosrc/rrd_client.c: Close the socket if writing to it fails.
Florian Forster [Thu, 3 Jul 2008 09:17:59 +0000 (11:17 +0200)]
src/rrd_client.c: Close the socket if writing to it fails.

11 years agosrc/rrd_daemon.c: Implemented the `HELP' command.
Florian Forster [Thu, 3 Jul 2008 09:09:53 +0000 (11:09 +0200)]
src/rrd_daemon.c: Implemented the `HELP' command.

11 years agosrc/rrd_daemon.c: Tell the connected party about invalid commands.
Florian Forster [Thu, 3 Jul 2008 08:48:17 +0000 (10:48 +0200)]
src/rrd_daemon.c: Tell the connected party about invalid commands.

11 years agosrc/rrd_daemon.c: Catch invalid uses of `flush'.
Florian Forster [Thu, 3 Jul 2008 08:42:45 +0000 (10:42 +0200)]
src/rrd_daemon.c: Catch invalid uses of `flush'.

And don't run into an assertion in that case.

11 years agosrc/rrd_daemon.c: Impemented the `stats' command.
Florian Forster [Thu, 3 Jul 2008 08:30:33 +0000 (10:30 +0200)]
src/rrd_daemon.c: Impemented the `stats' command.

It currently returns five statistics:
- Number of nodes and depth of the tree.
- Number of nodes in the update queue.
- Total number of updates and values written to disk since startup.

11 years agosrc/rrd_daemon.c: Count some statistics.
Florian Forster [Thu, 3 Jul 2008 08:08:33 +0000 (10:08 +0200)]
src/rrd_daemon.c: Count some statistics.

11 years agosrc/rrd_xport.c: Allow the short option `-d', too.
Florian Forster [Wed, 2 Jul 2008 21:13:12 +0000 (23:13 +0200)]
src/rrd_xport.c: Allow the short option `-d', too.

11 years agorrdcached(1): Removed the note stating that tree nodes are never removed.
Florian Forster [Wed, 2 Jul 2008 21:07:37 +0000 (23:07 +0200)]
rrdcached(1): Removed the note stating that tree nodes are never removed.

11 years agosrc/rrd_daemon.c: Implemented removal of unused tree nodes.
Florian Forster [Wed, 2 Jul 2008 21:04:54 +0000 (23:04 +0200)]
src/rrd_daemon.c: Implemented removal of unused tree nodes.

11 years agosrc/rrd_daemon.c: Don't return TRUE in `tree_callback_flush'.
Florian Forster [Wed, 2 Jul 2008 20:20:13 +0000 (22:20 +0200)]
src/rrd_daemon.c: Don't return TRUE in `tree_callback_flush'.

Returning TRUE will stop the traversal, so return FALSE instead.

11 years agorrdxport(1): Document the new `--daemon' option.
Florian Forster [Wed, 2 Jul 2008 19:52:52 +0000 (21:52 +0200)]
rrdxport(1): Document the new `--daemon' option.

11 years agosrc/rrd_xport.c: Implement the `--daemon' option for `rrdtool xport'.
Florian Forster [Wed, 2 Jul 2008 13:55:25 +0000 (15:55 +0200)]
src/rrd_xport.c: Implement the `--daemon' option for `rrdtool xport'.

11 years agosrc/rrd_fetch.c: Revert `rrd_fetch_r' to the original version again.
Florian Forster [Wed, 2 Jul 2008 13:54:52 +0000 (15:54 +0200)]
src/rrd_fetch.c: Revert `rrd_fetch_r' to the original version again.

11 years agoBuild system: Install `rrd_client.h' during `make install'.
Florian Forster [Tue, 1 Jul 2008 14:30:18 +0000 (16:30 +0200)]
Build system: Install `rrd_client.h' during `make install'.

11 years agoMerge branch 'master' into ff/rrdd
Florian Forster [Tue, 1 Jul 2008 10:01:46 +0000 (12:01 +0200)]
Merge branch 'master' into ff/rrdd

11 years agorrdcached(1): Added the `SECURITY CONSIDERATIONS' and `HOW IT WORKS' sections.
Florian Forster [Tue, 1 Jul 2008 08:02:42 +0000 (10:02 +0200)]
rrdcached(1): Added the `SECURITY CONSIDERATIONS' and `HOW IT WORKS' sections.

11 years agoheader-fix
oetiker [Tue, 1 Jul 2008 06:35:54 +0000 (06:35 +0000)]
header-fix

git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1444 a5681a0c-68f1-0310-ab6d-d61299d08faa

11 years agoimprove layout
oetiker [Tue, 1 Jul 2008 06:34:24 +0000 (06:34 +0000)]
improve layout

git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1443 a5681a0c-68f1-0310-ab6d-d61299d08faa

11 years agorrdcached(1): Documented the `-p' and `-b' options.
Florian Forster [Tue, 1 Jul 2008 05:52:18 +0000 (07:52 +0200)]
rrdcached(1): Documented the `-p' and `-b' options.

11 years agoMerge branch 'master' into ff/rrdd
Florian Forster [Sun, 29 Jun 2008 21:38:36 +0000 (23:38 +0200)]
Merge branch 'master' into ff/rrdd

11 years agoadded rrd filename to illegal update message -- he at uninett.no
oetiker [Sun, 29 Jun 2008 16:23:50 +0000 (16:23 +0000)]
added rrd filename to illegal update message -- he at uninett.no

git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1441 a5681a0c-68f1-0310-ab6d-d61299d08faa

11 years agosrc/rrd_daemon.c: Use static structs for the signal handler configuration.
Florian Forster [Sun, 29 Jun 2008 14:16:50 +0000 (16:16 +0200)]
src/rrd_daemon.c: Use static structs for the signal handler configuration.