From: Florian Forster Date: Tue, 2 Sep 2008 09:36:35 +0000 (+0200) Subject: Merge branch 'master' into ff/rrdd X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=210e991460e82d01d086f853e65485040eb2fffb;p=rrdtool.git Merge branch 'master' into ff/rrdd Conflicts: src/rrd_lastupdate.c src/rrd_update.c --- 210e991460e82d01d086f853e65485040eb2fffb diff --cc doc/rrdgraph.pod index 99b2e6b,89ea6f7..a96ecff --- a/doc/rrdgraph.pod +++ b/doc/rrdgraph.pod @@@ -264,20 -264,9 +264,20 @@@ Note that for linear graphs, SI notatio Only generate the graph if the current graph is out of date or not existent. Note, that only the image size will be returned, if you run with lazy even - when using graphv. + when using graphv and even when using PRINT. +[B<--daemon> I
] + +Address of the L daemon. If specified, a C command is sent +to the server before reading the RRD files. This allows the graph to contain +fresh data even if the daemon is configured to cache values for a long time. To +specify a UNIX domain socket use the prefix C, see example below. Other +addresses are interpreted as normal network addresses, i.Ee. IPv4 or IPv6 +addresses in most cases. + + rrdtool graph [...] --daemon unix:/var/run/rrdcached.sock [...] + [B<-f>|B<--imginfo> I] After the image has been created, the graph function uses printf diff --cc src/rrd_graph.c index f688d4c,cb93192..e445cad --- a/src/rrd_graph.c +++ b/src/rrd_graph.c @@@ -4262,27 -4229,12 +4288,32 @@@ void rrd_graph_options rrd_set_error("unknown option '%s'", argv[optind - 1]); return; } + } /* while (1) */ + + if (im->use_rrdcached == 0) + { + char *temp; + + temp = getenv (ENV_RRDCACHED_ADDRESS); + if (temp != NULL) + { + int status; + + status = rrdc_connect (temp); + if (status != 0) + { + rrd_set_error ("rrdc_connect(%s) failed with status %i.", + temp, status); + return; + } + im->use_rrdcached = 1; + } } + + pango_cairo_context_set_font_options(pango_layout_get_context(im->layout), im->font_options); + pango_layout_context_changed(im->layout); + + if (im->logarithmic && im->minval <= 0) { rrd_set_error diff --cc src/rrd_lastupdate.c index 3ca78e1,8beb49e..37bdf74 --- a/src/rrd_lastupdate.c +++ b/src/rrd_lastupdate.c @@@ -1,6 -1,5 +1,6 @@@ /***************************************************************************** - * RRDtool 1.3.0 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3.1 Copyright by Tobi Oetiker, 1997-2008 + * Copyright by Florian Forster, 2008 ***************************************************************************** * rrd_lastupdate Get the last datum entered for each DS *****************************************************************************/ diff --cc src/rrd_update.c index ed4b48e,dc2a675..b4466e1 --- a/src/rrd_update.c +++ b/src/rrd_update.c @@@ -1,7 -1,6 +1,7 @@@ /***************************************************************************** - * RRDtool 1.3.0 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3.1 Copyright by Tobi Oetiker, 1997-2008 + * Copyright by Florian Forster, 2008 ***************************************************************************** * rrd_update.c RRD Update Function *****************************************************************************