[rrd-developers] Accelerator Daemon
Florian Forster
rrdtool at nospam.verplant.org
Tue Jun 24 22:13:29 CEST 2008
Hi Scott, hi Ian, hi Tobi, hi list,
On Tue, Jun 24, 2008 at 08:11:59AM -0700, Scott Brumbaugh wrote:
> On Sat, Jun 21, 2008 at 06:54:33PM +0200, Florian Forster wrote:
> > Hi Scott,
>
> To be clear, this quote was from Ian Holsman in a previous mail.
you're right, sorry. This mail goes to Ian, too..
This is Ian:
> > > > my thinking was that we could have a RRD Daemon running that
> > > > would the CLI would talk to instead of accessing the files
> > > > directly.
This is me:
> > I've had the same idea, but never really had the _need_ to actually
> > sit down and write such a daemon. Your mail motivated me enough to
> > finally do it, though ;)
I've invested some more time in the daemon, now called `rrdcached'. You
can get a patch against the latest SVN trunk here:
<http://verplant.org/temp/rrdtool-trunk-rrd_update_with_cache.patch>
The current status is:
- `rrdcached' understands the `update' and `flush' commands. The daemon
is nowhere near production ready, though: There is no PID file, the
base directory `/tmp' is hard coded and I've generally done only
little testing.
- `rrdtool update' understands the `--daemon' option. If given, updates
are NOT stored to disk but sent to the daemon instead.[1]
- `rrdtool fetch' understands the `--daemon' option, too. I've changed
`rrd_fetch_fn' to take an additional `use_rrdcached' argument. If
given, the daemon is told to flush the file before it is read.[2]
- `rrdtool graph' takes the `--daemon' option, too. If given, it tells
`rrd_fetch_fn' to flush the values.
I'd be grateful if some people (the more the better) could review the
patch and give me some feedback.
Tobi, what are your criteria for inclusion into the RRDTool SVN
repository? Having this in the official repository will make it easier
for people to test the daemon and submit patches.. Also, how would you
like the final patch? All in one big patch (as it is right now), one
patch per file, some logical junks or something completely different?
Regards,
-octo
[1] I've proposed (and implemented) the `--[no]cache' options with the
default being to use the daemon if available and don't use the
daemon otherwise, i. e. to fail silently. I've come to the
conclusion that I don't like this: With the daemon potentially on a
remote machine and/or relative paths to the RRD files, failing
silently is a dumb idea. All commands, `rrdtool {fetch,graph,
update}' now behave the same way: If `--daemon' is given, the daemon
is used and the program will fail (noisily) if the daemon cannot be
reached. Otherwise the file is accessed directly.
[2] To get the information from `rrd_fetch' to `rrd_fetch_fn' I've
changed the signature of `rrd_fetch_r'. An alternative
implementation, one that doesn't need this (interface) change, just
came to my mind and I will probably change that soon..
--
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.oetiker.ch/pipermail/rrd-developers/attachments/20080624/c24d87d3/attachment.bin
More information about the rrd-developers
mailing list