Benoît Monin [Sun, 26 Apr 2015 12:18:45 +0000 (14:18 +0200)]
define _DEFAULT_SOURCE alongside _BSD_SOURCE
_BSD_SOURCE deprecated since glibc 2.20 and _DEFAULT_SOURCE should be used
instead. Define both to fix deprecation warning.
Quoting the man page feature_test_macros(7):
Since glibc 2.20, this macro is deprecated. It now has the same effect as
defining _DEFAULT_SOURCE, but generates a compile-time warning (unless
_DEFAULT_SOURCE is also defined). Use _DEFAULT_SOURCE instead. To allow
code that requires _BSD_SOURCE in glibc 2.19 and earlier and _DEFAULT_SOURCE
in glibc 2.20 and later to compile without warnings, define both _BSD_SOURCE
and _DEFAULT_SOURCE.
Benoît Monin [Sat, 25 Apr 2015 10:02:44 +0000 (12:02 +0200)]
rrdtune: fix options documentation and parsing
* Document all the short options.
* Document step option (although detailled documentation is missing)
* Add short options '-s', '-S', '-t' and '-D' to getopt.
* Add missing options to rrdtool help.
Benoît Monin [Sat, 25 Apr 2015 10:02:44 +0000 (12:02 +0200)]
rrdinfo: fix options documentation
* Document short option '-d' for daemon.
* Document short option '-F' for noflush.
* Add short-options '-d' and '-F' to error message.
* Add daemon and noflush to rrdtool help.
Benoît Monin [Sat, 25 Apr 2015 10:02:44 +0000 (12:02 +0200)]
rrddump: fix options documentation
* Document short options '-n' for no-header and '-d' for daemon.
* Add command line options to error message.
* Add command line options to rrdtool help.
Benoît Monin [Sat, 25 Apr 2015 10:02:44 +0000 (12:02 +0200)]
rrdcreate: fix options documentation and parsing
* Document short options '-O' for no_overwrite and '-d' for daemon.
* Add short options '-t' (template) and '-r' (source) to getopt.
* Add template, source and daemon to rrdtool help.
Since pango v1.32.6 `pango_cairo_font_map_get_default` returns a per thread `fontmap`. But since we're allocating this statically on the first call to `rrd_init`,
if we then try to access it again via another thread glib will get stuck in an infinte assertion loop.
Instead use `pango_cairo_font_map_new()` when creating the `fontmap`. This will not create a per thread version and glib will be happy.
Also added some extra locking whenever using the `im->layout` pango structure that uses the `fontmap` internally as a precaution.
Max Khon [Thu, 26 Feb 2015 06:54:44 +0000 (12:54 +0600)]
- check fwrite(3) return value
- do fflush(3) to flush stdio buffers (with error check) so that
I/O errors are detected more properly
- do not leave incompletely written output file in case of I/O errors
- set error condition on I/O errors so that rrdtool exits with non-zero
exit code
Max Khon [Thu, 26 Feb 2015 06:53:04 +0000 (12:53 +0600)]
write_fh:
- Check fwrite return value to vail out early on I/O errors
- Do fflush(3) to flush stdio buffers as callers do not check fclose(3)
return value
Max Khon [Wed, 25 Feb 2015 09:35:39 +0000 (15:35 +0600)]
Don't zero-out rrd->__mmap_start and rrd->__mmap_size.
Otherwise free_rrd_ptr_if_not_mmapped() will try to free non-malloc'ed memory.
The error from OS X malloc debugger is:
rrdtool(34216,0x7fff7bebd300) malloc: *** error for object 0x104a09d80:
pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6
Simon Boulet [Thu, 29 Jan 2015 21:30:01 +0000 (16:30 -0500)]
Add support for storing RRD in Ceph through librados
This patch adds support for creating, updating and retrieving RRD files
on a Ceph cluster. It adds a ceph// prefix to RRD file name (similar to
sql// used by libdbi). It uses librados to talk natively to Ceph.
Maksym Sobolyev [Thu, 29 Jan 2015 22:29:57 +0000 (14:29 -0800)]
Improve auto-scaling of gridlines and placement of x-labels when
plotted_time/pixel ratio gets smaller than 2. This significantly
improves readability of small graphs (i.e. around 400-pixels wide)
when time range plotted becomes less than 600 seconds. Before
this change you would only get few gridlines and from 1-2 to 0
labels depending on how lucky are you. Some examples of such
graphs can be found here. "o" vs. "n" prefix denotes behaviour
before and after the change respectively, and number after that
denotes full scale of x axis in seconds:
My build was failing with
make rrdtool.pot-update
make[2]: Entering directory '/scratch/src/rrdtool-1.x/po'
make[2]: *** No rule to make target 'remove-potcdate.sin', needed by 'remove-potcdate.sed'. Stop.
Fixed by adding this missing gettext-helper script.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>