From 8a476cd8ef54ee7daad1b2a95fa5f1ed38e11b2e Mon Sep 17 00:00:00 2001 From: oetiker Date: Mon, 22 Mar 2010 18:58:49 +0000 Subject: [PATCH] branched from trunk git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.4@2047 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/.indent.pro | 88 + program/00README | 6 + program/CHANGES | 7454 +++++++++++++++++ program/CONTRIBUTORS | 93 + program/COPYING | 280 + program/COPYRIGHT | 91 + program/MakeMakefile | 57 + program/Makefile.am | 49 + program/NEWS | 240 + program/README | 76 + program/THREADS | 60 + program/TODO | 18 + program/WIN32-BUILD-TIPS.txt | 391 + program/autogen.sh | 3 + program/bindings/Makefile.am | 59 + program/bindings/lua/Makefile.am | 66 + program/bindings/lua/README | 68 + .../bindings/lua/compat-5.1r5/compat-5.1.c | 118 + .../bindings/lua/compat-5.1r5/compat-5.1.h | 34 + .../bindings/lua/compat-5.1r5/compat-5.1.lua | 287 + program/bindings/lua/rrdlua.c | 380 + program/bindings/lua/test.lua.bottom | 90 + program/bindings/perl-piped/MANIFEST | 5 + program/bindings/perl-piped/Makefile.PL | 10 + program/bindings/perl-piped/README | 5 + program/bindings/perl-piped/RRDp.pm | 213 + program/bindings/perl-piped/leaktest.pl | 16 + program/bindings/perl-piped/rrdpl.dsp | 115 + program/bindings/perl-piped/rrdpl.dsw | 29 + program/bindings/perl-piped/t/base.t | 42 + program/bindings/perl-shared/MANIFEST | 7 + program/bindings/perl-shared/Makefile.PL | 47 + program/bindings/perl-shared/README | 12 + program/bindings/perl-shared/RRDs.pm | 152 + program/bindings/perl-shared/RRDs.ppd | 10 + program/bindings/perl-shared/RRDs.xs | 456 + program/bindings/perl-shared/ntmake-build | 27 + program/bindings/perl-shared/t/base.t | 171 + program/bindings/python/ACKNOWLEDGEMENT | 7 + program/bindings/python/AUTHORS | 1 + program/bindings/python/COPYING | 504 ++ program/bindings/python/README | 34 + program/bindings/python/rrdtoolmodule.c | 642 ++ program/bindings/python/setup.py | 55 + program/bindings/ruby/CHANGES | 7 + program/bindings/ruby/README | 22 + program/bindings/ruby/extconf.rb | 18 + program/bindings/ruby/main.c | 390 + program/bindings/ruby/test.rb | 72 + program/bindings/tcl/Makefile.am | 58 + program/bindings/tcl/README | 31 + program/bindings/tcl/ifOctets.tcl.in | 45 + program/bindings/tcl/tclrrd.c | 762 ++ program/configure.ac | 975 +++ program/debian/README | 3 + program/doc/Makefile.am | 87 + program/doc/RRDp.pod | 1 + program/doc/RRDs.pod | 1 + program/doc/bin_dec_hex.pod | 370 + program/doc/cdeftutorial.pod | 889 ++ program/doc/librrd.pod | 136 + program/doc/name.inc | 11 + program/doc/rpntutorial.pod | 197 + program/doc/rrd-beginners.pod | 326 + program/doc/rrdbuild.pod | 364 + program/doc/rrdcached.pod | 699 ++ program/doc/rrdcgi.pod | 225 + program/doc/rrdcreate.pod | 598 ++ program/doc/rrddump.pod | 97 + program/doc/rrdfetch.pod | 288 + program/doc/rrdfirst.pod | 32 + program/doc/rrdflushcached.pod | 53 + program/doc/rrdgraph-old.pod | 664 ++ program/doc/rrdgraph.pod | 558 ++ program/doc/rrdgraph_data.pod | 135 + program/doc/rrdgraph_examples.pod | 210 + program/doc/rrdgraph_graph.pod | 529 ++ program/doc/rrdgraph_libdbi.pod | 158 + program/doc/rrdgraph_rpn.pod | 405 + program/doc/rrdinfo.pod | 88 + program/doc/rrdlast.pod | 52 + program/doc/rrdlastupdate.pod | 52 + program/doc/rrdlua.pod | 204 + program/doc/rrdpython.pod | 78 + program/doc/rrdresize.pod | 54 + program/doc/rrdrestore.pod | 38 + program/doc/rrdruby.pod | 86 + program/doc/rrdthreads.pod | 144 + program/doc/rrdtool-dump.dtd | 39 + program/doc/rrdtool-dump.xsd | 288 + program/doc/rrdtool-xport.dtd | 32 + program/doc/rrdtool.pod | 324 + program/doc/rrdtune.pod | 183 + program/doc/rrdtutorial.es.pod | 1183 +++ program/doc/rrdtutorial.pod | 1206 +++ program/doc/rrdupdate.pod | 174 + program/doc/rrdxport.pod | 168 + program/etc/rrdcached-default | 14 + program/etc/rrdcached-init | 57 + program/examples/4charts.pl.in | 124 + program/examples/Makefile.am | 18 + program/examples/bigtops.pl.in | 50 + program/examples/cgi-demo.cgi.in | 40 + program/examples/minmax.pl.in | 52 + program/examples/perftest.pl.in | 214 + program/examples/piped-demo.pl.in | 148 + program/examples/rrdcached/Makefile.am | 10 + program/examples/rrdcached/RRDCached.pm | 90 + program/examples/rrdcached/rrdcached-size.pl | 153 + program/examples/shared-demo.pl.in | 215 + program/examples/stripes.pl.in | 46 + program/favicon.ico | Bin 0 -> 1406 bytes program/m4/acinclude.m4 | 601 ++ program/netware/Makefile | 555 ++ program/po/ChangeLog | 12 + program/po/LINGUAS | 0 program/po/Makevars | 41 + program/po/POTFILES.in | 2 + program/rrdtool-1.2-release | 37 + program/rrdtool-1.4-release | 40 + program/rrdtool.spec | 647 ++ program/src/Makefile.am | 128 + program/src/compile_afm.pl | 479 ++ program/src/fnv.h | 114 + program/src/get_ver.awk | 40 + program/src/gettext.h | 271 + program/src/hash_32.c | 156 + program/src/librrd.pc.in | 10 + program/src/librrd.sym.in.in | 67 + program/src/plbasename.c | 211 + program/src/plbasename.h | 45 + program/src/pngsize.c | 56 + program/src/rrd.h | 429 + program/src/rrd_cgi.c | 1636 ++++ program/src/rrd_client.c | 848 ++ program/src/rrd_client.h | 99 + program/src/rrd_config_bottom.h | 237 + program/src/rrd_create.c | 839 ++ program/src/rrd_daemon.c | 3198 +++++++ program/src/rrd_datalang.c | 34 + program/src/rrd_diff.c | 123 + program/src/rrd_dump.c | 589 ++ program/src/rrd_error.c | 151 + program/src/rrd_fetch.c | 485 ++ program/src/rrd_fetch_libdbi.c | 655 ++ program/src/rrd_first.c | 98 + program/src/rrd_flushcached.c | 118 + program/src/rrd_format.c | 113 + program/src/rrd_format.h | 428 + program/src/rrd_getopt.c | 950 +++ program/src/rrd_getopt.h | 151 + program/src/rrd_getopt1.c | 183 + program/src/rrd_gfx.c | 318 + program/src/rrd_graph.c | 5151 ++++++++++++ program/src/rrd_graph.h | 487 ++ program/src/rrd_graph_helper.c | 1161 +++ program/src/rrd_hw.c | 560 ++ program/src/rrd_hw.h | 65 + program/src/rrd_hw_math.c | 143 + program/src/rrd_hw_math.h | 132 + program/src/rrd_hw_update.c | 475 ++ program/src/rrd_hw_update.h | 44 + program/src/rrd_i18n.h | 31 + program/src/rrd_info.c | 452 + program/src/rrd_is_thread_safe.h | 28 + program/src/rrd_last.c | 84 + program/src/rrd_lastupdate.c | 167 + program/src/rrd_nan_inf.c | 40 + program/src/rrd_not_thread_safe.c | 42 + program/src/rrd_open.c | 772 ++ program/src/rrd_parsetime.c | 1046 +++ program/src/rrd_parsetime.h | 8 + program/src/rrd_resize.c | 288 + program/src/rrd_restore.c | 1271 +++ program/src/rrd_rpncalc.c | 978 +++ program/src/rrd_rpncalc.h | 87 + program/src/rrd_thread_safe.c | 110 + program/src/rrd_thread_safe_nt.c | 181 + program/src/rrd_tool.c | 923 ++ program/src/rrd_tool.h | 129 + program/src/rrd_tune.c | 510 ++ program/src/rrd_update.c | 2102 +++++ program/src/rrd_utils.c | 159 + program/src/rrd_version.c | 21 + program/src/rrd_xport.c | 323 + program/src/rrd_xport.h | 34 + program/src/rrdupdate.c | 38 + program/src/strftime.c | 359 + program/src/strftime.h | 24 + program/src/unused.h | 14 + program/src/win32comp.c | 82 + program/svn2cl.xsl | 215 + program/win32/Makefile | 460 + program/win32/config.h | 57 + program/win32/rrd.dsp | 247 + program/win32/rrd.sln | 29 + program/win32/rrd.vcproj | 648 ++ program/win32/rrd_config.h.msvc | 66 + program/win32/rrdlib.vcproj | 375 + program/win32/rrdtool.dsp | 92 + program/win32/rrdtool.dsw | 44 + program/win32/rrdtool.vcproj | 204 + 202 files changed, 63760 insertions(+) create mode 100644 program/.indent.pro create mode 100644 program/00README create mode 100644 program/CHANGES create mode 100644 program/CONTRIBUTORS create mode 100644 program/COPYING create mode 100644 program/COPYRIGHT create mode 100755 program/MakeMakefile create mode 100644 program/Makefile.am create mode 100644 program/NEWS create mode 100644 program/README create mode 100644 program/THREADS create mode 100644 program/TODO create mode 100644 program/WIN32-BUILD-TIPS.txt create mode 100755 program/autogen.sh create mode 100644 program/bindings/Makefile.am create mode 100644 program/bindings/lua/Makefile.am create mode 100644 program/bindings/lua/README create mode 100644 program/bindings/lua/compat-5.1r5/compat-5.1.c create mode 100644 program/bindings/lua/compat-5.1r5/compat-5.1.h create mode 100644 program/bindings/lua/compat-5.1r5/compat-5.1.lua create mode 100644 program/bindings/lua/rrdlua.c create mode 100644 program/bindings/lua/test.lua.bottom create mode 100644 program/bindings/perl-piped/MANIFEST create mode 100644 program/bindings/perl-piped/Makefile.PL create mode 100644 program/bindings/perl-piped/README create mode 100644 program/bindings/perl-piped/RRDp.pm create mode 100644 program/bindings/perl-piped/leaktest.pl create mode 100644 program/bindings/perl-piped/rrdpl.dsp create mode 100644 program/bindings/perl-piped/rrdpl.dsw create mode 100755 program/bindings/perl-piped/t/base.t create mode 100644 program/bindings/perl-shared/MANIFEST create mode 100644 program/bindings/perl-shared/Makefile.PL create mode 100644 program/bindings/perl-shared/README create mode 100644 program/bindings/perl-shared/RRDs.pm create mode 100755 program/bindings/perl-shared/RRDs.ppd create mode 100644 program/bindings/perl-shared/RRDs.xs create mode 100644 program/bindings/perl-shared/ntmake-build create mode 100755 program/bindings/perl-shared/t/base.t create mode 100644 program/bindings/python/ACKNOWLEDGEMENT create mode 100644 program/bindings/python/AUTHORS create mode 100644 program/bindings/python/COPYING create mode 100644 program/bindings/python/README create mode 100644 program/bindings/python/rrdtoolmodule.c create mode 100644 program/bindings/python/setup.py create mode 100644 program/bindings/ruby/CHANGES create mode 100644 program/bindings/ruby/README create mode 100644 program/bindings/ruby/extconf.rb create mode 100644 program/bindings/ruby/main.c create mode 100755 program/bindings/ruby/test.rb create mode 100644 program/bindings/tcl/Makefile.am create mode 100644 program/bindings/tcl/README create mode 100644 program/bindings/tcl/ifOctets.tcl.in create mode 100644 program/bindings/tcl/tclrrd.c create mode 100644 program/configure.ac create mode 100644 program/debian/README create mode 100644 program/doc/Makefile.am create mode 120000 program/doc/RRDp.pod create mode 120000 program/doc/RRDs.pod create mode 100644 program/doc/bin_dec_hex.pod create mode 100644 program/doc/cdeftutorial.pod create mode 100644 program/doc/librrd.pod create mode 100644 program/doc/name.inc create mode 100644 program/doc/rpntutorial.pod create mode 100644 program/doc/rrd-beginners.pod create mode 100644 program/doc/rrdbuild.pod create mode 100644 program/doc/rrdcached.pod create mode 100644 program/doc/rrdcgi.pod create mode 100644 program/doc/rrdcreate.pod create mode 100644 program/doc/rrddump.pod create mode 100644 program/doc/rrdfetch.pod create mode 100644 program/doc/rrdfirst.pod create mode 100644 program/doc/rrdflushcached.pod create mode 100644 program/doc/rrdgraph-old.pod create mode 100644 program/doc/rrdgraph.pod create mode 100644 program/doc/rrdgraph_data.pod create mode 100644 program/doc/rrdgraph_examples.pod create mode 100644 program/doc/rrdgraph_graph.pod create mode 100644 program/doc/rrdgraph_libdbi.pod create mode 100644 program/doc/rrdgraph_rpn.pod create mode 100644 program/doc/rrdinfo.pod create mode 100644 program/doc/rrdlast.pod create mode 100644 program/doc/rrdlastupdate.pod create mode 100644 program/doc/rrdlua.pod create mode 100644 program/doc/rrdpython.pod create mode 100644 program/doc/rrdresize.pod create mode 100644 program/doc/rrdrestore.pod create mode 100644 program/doc/rrdruby.pod create mode 100644 program/doc/rrdthreads.pod create mode 100644 program/doc/rrdtool-dump.dtd create mode 100644 program/doc/rrdtool-dump.xsd create mode 100644 program/doc/rrdtool-xport.dtd create mode 100644 program/doc/rrdtool.pod create mode 100644 program/doc/rrdtune.pod create mode 100644 program/doc/rrdtutorial.es.pod create mode 100644 program/doc/rrdtutorial.pod create mode 100644 program/doc/rrdupdate.pod create mode 100644 program/doc/rrdxport.pod create mode 100644 program/etc/rrdcached-default create mode 100644 program/etc/rrdcached-init create mode 100755 program/examples/4charts.pl.in create mode 100644 program/examples/Makefile.am create mode 100755 program/examples/bigtops.pl.in create mode 100755 program/examples/cgi-demo.cgi.in create mode 100755 program/examples/minmax.pl.in create mode 100755 program/examples/perftest.pl.in create mode 100755 program/examples/piped-demo.pl.in create mode 100644 program/examples/rrdcached/Makefile.am create mode 100644 program/examples/rrdcached/RRDCached.pm create mode 100644 program/examples/rrdcached/rrdcached-size.pl create mode 100755 program/examples/shared-demo.pl.in create mode 100755 program/examples/stripes.pl.in create mode 100644 program/favicon.ico create mode 100644 program/m4/acinclude.m4 create mode 100644 program/netware/Makefile create mode 100644 program/po/ChangeLog create mode 100644 program/po/LINGUAS create mode 100644 program/po/Makevars create mode 100644 program/po/POTFILES.in create mode 100755 program/rrdtool-1.2-release create mode 100755 program/rrdtool-1.4-release create mode 100644 program/rrdtool.spec create mode 100644 program/src/Makefile.am create mode 100644 program/src/compile_afm.pl create mode 100644 program/src/fnv.h create mode 100644 program/src/get_ver.awk create mode 100644 program/src/gettext.h create mode 100644 program/src/hash_32.c create mode 100644 program/src/librrd.pc.in create mode 100644 program/src/librrd.sym.in.in create mode 100644 program/src/plbasename.c create mode 100644 program/src/plbasename.h create mode 100644 program/src/pngsize.c create mode 100644 program/src/rrd.h create mode 100644 program/src/rrd_cgi.c create mode 100644 program/src/rrd_client.c create mode 100644 program/src/rrd_client.h create mode 100644 program/src/rrd_config_bottom.h create mode 100644 program/src/rrd_create.c create mode 100644 program/src/rrd_daemon.c create mode 100644 program/src/rrd_datalang.c create mode 100644 program/src/rrd_diff.c create mode 100644 program/src/rrd_dump.c create mode 100644 program/src/rrd_error.c create mode 100644 program/src/rrd_fetch.c create mode 100644 program/src/rrd_fetch_libdbi.c create mode 100644 program/src/rrd_first.c create mode 100644 program/src/rrd_flushcached.c create mode 100644 program/src/rrd_format.c create mode 100644 program/src/rrd_format.h create mode 100644 program/src/rrd_getopt.c create mode 100644 program/src/rrd_getopt.h create mode 100644 program/src/rrd_getopt1.c create mode 100644 program/src/rrd_gfx.c create mode 100644 program/src/rrd_graph.c create mode 100644 program/src/rrd_graph.h create mode 100644 program/src/rrd_graph_helper.c create mode 100644 program/src/rrd_hw.c create mode 100644 program/src/rrd_hw.h create mode 100644 program/src/rrd_hw_math.c create mode 100644 program/src/rrd_hw_math.h create mode 100644 program/src/rrd_hw_update.c create mode 100644 program/src/rrd_hw_update.h create mode 100644 program/src/rrd_i18n.h create mode 100644 program/src/rrd_info.c create mode 100644 program/src/rrd_is_thread_safe.h create mode 100644 program/src/rrd_last.c create mode 100644 program/src/rrd_lastupdate.c create mode 100644 program/src/rrd_nan_inf.c create mode 100644 program/src/rrd_not_thread_safe.c create mode 100644 program/src/rrd_open.c create mode 100644 program/src/rrd_parsetime.c create mode 100644 program/src/rrd_parsetime.h create mode 100644 program/src/rrd_resize.c create mode 100644 program/src/rrd_restore.c create mode 100644 program/src/rrd_rpncalc.c create mode 100644 program/src/rrd_rpncalc.h create mode 100644 program/src/rrd_thread_safe.c create mode 100644 program/src/rrd_thread_safe_nt.c create mode 100644 program/src/rrd_tool.c create mode 100644 program/src/rrd_tool.h create mode 100644 program/src/rrd_tune.c create mode 100644 program/src/rrd_update.c create mode 100644 program/src/rrd_utils.c create mode 100644 program/src/rrd_version.c create mode 100644 program/src/rrd_xport.c create mode 100644 program/src/rrd_xport.h create mode 100644 program/src/rrdupdate.c create mode 100644 program/src/strftime.c create mode 100644 program/src/strftime.h create mode 100644 program/src/unused.h create mode 100644 program/src/win32comp.c create mode 100644 program/svn2cl.xsl create mode 100644 program/win32/Makefile create mode 100644 program/win32/config.h create mode 100644 program/win32/rrd.dsp create mode 100644 program/win32/rrd.sln create mode 100644 program/win32/rrd.vcproj create mode 100644 program/win32/rrd_config.h.msvc create mode 100644 program/win32/rrdlib.vcproj create mode 100644 program/win32/rrdtool.dsp create mode 100644 program/win32/rrdtool.dsw create mode 100644 program/win32/rrdtool.vcproj diff --git a/program/.indent.pro b/program/.indent.pro new file mode 100644 index 00000000..73401ef8 --- /dev/null +++ b/program/.indent.pro @@ -0,0 +1,88 @@ +--blank-lines-after-declarations +--blank-lines-after-procedures +--break-before-boolean-operator +--break-function-decl-args +--no-blank-lines-after-commas +--braces-on-if-line +--braces-on-struct-decl-line +--comment-indentation25 +--declaration-comment-column25 +--no-comment-delimiters-on-blank-lines +--cuddle-else +--continuation-indentation4 +--case-indentation0 +--else-endif-column33 +--space-after-cast +--line-comments-indentation0 +--declaration-indentation10 +--dont-format-first-column-comments +--dont-format-comments +--honour-newlines +--indent-level4 +/* changed from 0 to 4 */ +--parameter-indentation4 +--line-length78 /* changed from 75 */ +--continue-at-parentheses +--no-space-after-function-call-names +--dont-break-procedure-type +--dont-star-comments +--leave-optional-blank-lines +--dont-space-special-semicolon +--tab-size4 +/* additions by Mark */ +--case-brace-indentation0 +--leave-preprocessor-space +--no-tabs +-TFIFOqueue +-TFnv32_t +-TTcl_Interp +-T_ArtRgbaSVPAlphaData +-Tafm_fontinfo +-Tafm_sint16 +-Tafm_sint8 +-Tafm_uint16 +-Tafm_uint8 +-Tafm_unicode +-Tcdp_prep_t +-Tcgi_s +-Tds_def_t +-Teps_font +-Teps_state +-Tgfx_canvas_t +-Tgfx_char_s +-Tgfx_color_t +-Tgfx_node_t +-Tgfx_string_s +-Tgraph_desc_t +-Timage_desc_t +-Tinfo_t +-Tinfoval +-Tlive_head_t +-Toff_t +-Told_afm_fontinfo +-Tpdf_buffer +-Tpdf_font +-Tpdf_point +-Tpdf_state +-Tpdp_prep_t +-Trpn_cdefds_t +-Trpnp_t +-Trpnstack_t +-Trra_def_t +-Trra_ptr_t +-Trrd_file_t +-Trrd_t +-Trrd_value_t +-Tstat_head_t +-Tstring_arr_t +-Tsvg_dash +-Ttext_prop_t +-Ttime_t +-Ttm +-Tunival +-Tva_list +-Tvar_s +-Tvdef_t +-Txlab_t +-Tygrid_scale_t +-Tylab_t diff --git a/program/00README b/program/00README new file mode 100644 index 00000000..8a0389f0 --- /dev/null +++ b/program/00README @@ -0,0 +1,6 @@ +Title: RRDtool +Date: 2010-03-22 +Owner: Tobias Oetiker +Group: Software + +Round Robin Database Tool diff --git a/program/CHANGES b/program/CHANGES new file mode 100644 index 00000000..e2a8674b --- /dev/null +++ b/program/CHANGES @@ -0,0 +1,7454 @@ +RRDtool 1.4.3 - 2010-03-22 +========================== +New Features + +* rrdcached: Log to stderr (in addition to syslog) when running in foreground. + -- Sebastian Harl + +* rrdcached: Added -m command line option. This option may be used to specify + the file permissions of a UNIX socket. The option affects the following + sockets only, i.e., it's possible to specify different modes for different + sockets. -- Sebastian Harl + +* rrdcached: Added -s option so set group permissions of the UNIX domain + socket. Obviously this will only work if rrdcached is running as root which in + my case it has to be (as upstart can't currently monitor non-root + daemons). As you may have RRD data sources (data loggers) and RRD + consumers (e.g. CGI scripts) that both need to talk to the cache + daemon one solution is to set the group permissions of the socket. + + This offer some flexibility over trying to get every RRD user/daemon + running under the same user context. -- Alex Bennee ajb pitcairn.cambridgebroadband.com + +* rrdcached: Let -s affect the following sockets only. This way, it's possible + to specify different groups for different sockets. -- Sebastian Harl + +* rrd_create: added --no-overwrite option. It prevents rrdtool from + clobbering existing rrd files. -- Chris - LINX + +* ruby bindings: rb_rrd_xport function -- Pavel Pachkovskij pavel.pachkovskij azati.com + +* use locale settings and _NL_TIME_WEEK_1STDAY to determine the first + day of the week. Works on Linux at least -- Tobi Oetiker + +* rrd_graph: \u to backup one line for special legend placement tricks + -- tobi oetiker + +* rrd_update: new (better) checker for incoming COUNTER or DERIVED data. -- Florian + +Bug Fixes + +* rrdcached: Do not put any code in assert(). -- Sebastian Harl + +* add 'm' as a shortcut for 'zoom' in rrd_graph as it was in 1.3 + -- Sebastian Harl + +* rrd_update: fix for max calculation ... the MAX value of the current + consolidation interval was pre-initialized with the MAX value from the + previous interval (an over optimization). -- Tobi Oetiker + +* build: additional dependencies on Makefile to make sure bindings makefiles + get rebuild after reconfig -- Tobi Oetiker + +* ruby bindings: reset rrd_state for grapv in ruby bindings -- Sven Engelhardt + +* rrd_cgi: make sure that (argv-1)[0] points to something sensible ... + hack to undo the damage caused by a senseless optimization. see bug #251 + -- tobi oetiker + +* rrd_graph: fix right aligned text -- tobi oetiker + +* python bindings: pass DESTDIR to setup.py as --root= iff a DESTDIR + was given. --- Bernhard Reutner-Fischer + +* rrd_graph: backward compatibility fix - only draw the new type of marker + in the graph legend when called with --dynamic-labels -- tobi oetiker + +* rrd_restore: portability fix - sizeof(time_t) is 4 byte not 32 bit -- tobi oetiker + +* rrd_xport: The end of the export range should not be adjusted DOWN but UP to hit the + next matching step interval or the response will be one row short. -- tobi oetiker + +* rrd_graph: the end time itself is not part of a time range ... this fixes the segfault + reported in #248 -- tobi oetiker + +* rrd_restore: teach rrd_restore to be able to read the #text value of ... this + fixes problems with blank last_ds entries ... as reported in #247. -- tobi oetiker + +* rrd_update: be more diligent in checking the input arguments for rrdtool update and + complain if they are wrong. fix for #243 (and more) -- tobi oetiker + +----- Older Changelog -------------------- + +2009-11-15 11:54 oetiker + + * bindings/perl-piped/RRDp.pm, bindings/perl-shared/RRDs.pm, + configure.ac, doc/rrdbuild.pod, rrdtool.spec, src/pngsize.c, + src/rrd.h, src/rrd_cgi.c, src/rrd_create.c, src/rrd_datalang.c, + src/rrd_diff.c, src/rrd_dump.c, src/rrd_error.c, src/rrd_fetch.c, + src/rrd_first.c, src/rrd_format.c, src/rrd_format.h, + src/rrd_gfx.c, src/rrd_graph.c, src/rrd_graph_helper.c, + src/rrd_hw.c, src/rrd_hw.h, src/rrd_i18n.h, src/rrd_info.c, + src/rrd_is_thread_safe.h, src/rrd_last.c, src/rrd_lastupdate.c, + src/rrd_not_thread_safe.c, src/rrd_open.c, src/rrd_resize.c, + src/rrd_restore.c, src/rrd_rpncalc.c, src/rrd_rpncalc.h, + src/rrd_thread_safe.c, src/rrd_thread_safe_nt.c, src/rrd_tool.c, + src/rrd_tool.h, src/rrd_tune.c, src/rrd_update.c, + src/rrd_version.c, src/rrd_xport.c, src/rrd_xport.h, + src/rrdupdate.c: prepare for the release of rrdtool-1.4.2 + +2009-11-15 11:53 oetiker + + * doc/librrd.pod, doc/rrdcached.pod: fix pod syntax + +2009-11-15 10:51 oetiker + + * branches/1.3/program/src/rrd_tool.c, src/rrd_tool.c: Switch + LC_NUMERIC to C prior to creating rrd_xport output. This makes + sure that numbers are always output with a . and not with a , + +2009-10-30 22:49 oetiker + + * src/rrd_daemon.c: clarify rrd_daemon code with JOURNAL_REPLAY + macro -- kevin + +2009-10-28 05:15 oetiker + + * bindings/perl-piped/RRDp.pm, bindings/perl-shared/RRDs.pm, + doc/rrdbuild.pod, rrdtool.spec, src/pngsize.c, src/rrd.h, + src/rrd_cgi.c, src/rrd_create.c, src/rrd_datalang.c, + src/rrd_diff.c, src/rrd_dump.c, src/rrd_error.c, src/rrd_fetch.c, + src/rrd_first.c, src/rrd_format.c, src/rrd_format.h, + src/rrd_gfx.c, src/rrd_graph.c, src/rrd_graph_helper.c, + src/rrd_hw.c, src/rrd_hw.h, src/rrd_i18n.h, src/rrd_info.c, + src/rrd_is_thread_safe.h, src/rrd_last.c, src/rrd_lastupdate.c, + src/rrd_not_thread_safe.c, src/rrd_open.c, src/rrd_resize.c, + src/rrd_restore.c, src/rrd_rpncalc.c, src/rrd_rpncalc.h, + src/rrd_thread_safe.c, src/rrd_thread_safe_nt.c, src/rrd_tool.c, + src/rrd_tool.h, src/rrd_tune.c, src/rrd_update.c, + src/rrd_version.c, src/rrd_xport.c, src/rrd_xport.h, + src/rrdupdate.c: prepare for the release of rrdtool-1.4.1 + +2009-10-28 05:15 oetiker + + * configure.ac: updated versions to account for rrd cached fix + +2009-10-28 05:14 oetiker + + * src/rrd_daemon.c: Avoid unnecessary string handling for UPDATE + commands in rrd_deaemon for 20x speed increasse. Only copy as many + bytes as necessary. During journal replay, avoid unnecessary copy + (string is discarded). Bug reported by Thorsten von Eicken Patched + by kevin brintnall + +2009-10-27 21:44 oetiker + + * src/rrd_tool.c: we have 2009 now + +2009-10-27 21:40 oetiker + + * NEWS: added links to documentation + +2009-10-27 17:55 oetiker + + * bindings/perl-piped/RRDp.pm, bindings/perl-shared/RRDs.pm, + configure.ac, doc/rrdbuild.pod, rrdtool.spec, src/pngsize.c, + src/rrd.h, src/rrd_cgi.c, src/rrd_create.c, src/rrd_datalang.c, + src/rrd_diff.c, src/rrd_dump.c, src/rrd_error.c, src/rrd_fetch.c, + src/rrd_first.c, src/rrd_format.c, src/rrd_format.h, + src/rrd_gfx.c, src/rrd_graph.c, src/rrd_graph_helper.c, + src/rrd_hw.c, src/rrd_hw.h, src/rrd_i18n.h, src/rrd_info.c, + src/rrd_is_thread_safe.h, src/rrd_last.c, src/rrd_lastupdate.c, + src/rrd_not_thread_safe.c, src/rrd_open.c, src/rrd_resize.c, + src/rrd_restore.c, src/rrd_rpncalc.c, src/rrd_rpncalc.h, + src/rrd_thread_safe.c, src/rrd_thread_safe_nt.c, src/rrd_tool.c, + src/rrd_tool.h, src/rrd_tune.c, src/rrd_update.c, + src/rrd_version.c, src/rrd_xport.c, src/rrd_xport.h, + src/rrdupdate.c: set version to 1.4.0 for all files + +2009-10-27 17:51 oetiker + + * rrdtool-1.3-release, rrdtool-1.4-release: create build script for + 1.4 release + +2009-10-27 17:49 oetiker + + * Makefile.am, configure.ac, src/rrd_client.c, src/rrd_graph.h, + src/rrd_restore.c: * remove intl from build process ... someone + who does actually need it should fix this ... * make the code work + on solaris 10 (tested on opencsw server farm. thanks!) + +2009-10-27 17:04 oetiker + + * src/rrd_client.c, src/rrd_graph.h, src/rrd_restore.c: more solaris + 10 portability changes .... + +2009-10-27 16:18 oetiker + + * configure.ac, src/rrd_dump.c, src/rrd_graph.c, src/rrd_restore.c, + src/rrd_tool.c: remove HAVE_LOCALE_H and HAVE_TIME_H and + HAVE_SETLOCALE since they have not been used consistantly anyway + +2009-10-27 16:12 oetiker + + * configure.ac: if we use HAVE_TIME_H we should have a check for + this in configure ... + +2009-10-27 13:57 oetiker + + * NEWS: updated for 1.4 release + +2009-10-27 13:54 oetiker + + * src/rrd_graph.c: simplify rrd_graph LC_NUMERIC fix so that all + call paramters are affected by it. + +2009-10-27 13:13 oetiker + + * doc/rrdgraph.pod, src/rrd_graph.c: allow the grid on:off pattern + to be configured + +2009-10-27 13:07 oetiker + + * src/rrd_restore.c: needs locale.h to compile + +2009-10-23 15:58 oetiker + + * configure.ac, src: optional software is expected to live in /opt, + so lets follow this custom ... /usr/local is really old school. + +2009-10-22 23:22 oetiker + + * src/rrd_tool.c: fix memory handling when argument separation in + pipe mode fails. fix for #230 + +2009-10-20 19:23 oetiker + + * src/rrd_restore.c: set locale to C while restoring + +2009-10-15 08:42 oetiker + + * doc/rrdtutorial.pod: another typo fixed by Justin T Pryzby + +2009-10-15 04:47 oetiker + + * src/Makefile.am: Removed left-over occurrence of LIB_LIBINTL -- + sebastian + +2009-10-14 08:04 oetiker + + * bindings/perl-piped/RRDp.pm, doc/rpntutorial.pod, + doc/rrd-beginners.pod, doc/rrdbuild.pod, doc/rrdcached.pod, + doc/rrdcreate.pod, doc/rrddump.pod, doc/rrdflushcached.pod, + doc/rrdgraph-old.pod, doc/rrdgraph.pod, doc/rrdgraph_data.pod, + doc/rrdgraph_graph.pod, doc/rrdgraph_libdbi.pod, + doc/rrdgraph_rpn.pod, doc/rrdpython.pod, doc/rrdruby.pod, + doc/rrdtool.pod, doc/rrdtutorial.pod: Fixed various typos in the + manpages. Debian bug #550919. -- Justin T. Pryzby + +2009-10-11 16:00 oetiker + + * src/rrd_client.c, src/rrd_client.h: load rrd_config.h before + rrd_client.h since its content is expected to be present -- + Florian Forster + +2009-10-04 21:16 oetiker + + * src/rrd_flushcached.c: Fix potential memory leak in + rrd_flushcached during failure. -- kevin + +2009-10-04 12:18 oetiker + + * CONTRIBUTORS: sebastian was missing from the contributors list + +2009-10-04 12:00 oetiker + + * src/rrd_graph.c: Do not mess with the locale settings. The main + program takes care of that (rrd_tool.c calls setlocale(LC_ALL,"") + already. We do call setlocale on LC_NUMERIC a few times to get + predictable number formats when parsing strings into floats, but + apart from that the code is written in a portable manner and can + take whatever the local system supports. + +2009-10-04 11:48 oetiker + + * src/rrd_tool.c: * comment on the reson for calling setlocale * to + not force the message encoding ... messages should be encoded in + the current locale + +2009-10-04 11:37 oetiker + + * src/rrd_client.c, src/rrd_daemon.c: rrd_client, rrd_daemon: Do not + require hostnames to contain a dot. Non-FQDN (e.g. "localhost") + are now supported as well. Anything that does not start with '[' + should be (and is now) treated as [:]. -- Sebastian + Harl + +2009-10-04 11:36 oetiker + + * src/rrd_client.c: rrd_client: Improved error handling / reporting. + * Report getaddrinfo() errors using gai_strerror(). * Replaced + "Internal error" with a more verbose error message, if available. + -- Sebastian Harl + +2009-10-04 11:35 oetiker + + * src/rrd_client.c: rrd_client: Do not rewrite path names when + accessing remote daemons. When talking to a local daemon (thru a + UNIX socket), relative path names are resolved to absolute path + names to allow for transparent integration into existing solutions + (as requested by Tobi). However, when talking to a remote daemon, + absolute path names are not allowed, since path name translation + is done by the server (relative to the base directory). -- + Sebastian Harl + +2009-10-04 11:34 oetiker + + * src/rrd_flushcached.c: rrdflushcached: Do not free 'opt_daemon' + before checking the connection. -- Sebastian Harl + +2009-10-04 11:33 oetiker + + * src/rrd_fetch.c: rrdfetch: Print a usage summary if not enough + parameters have been given. -- Sebastian Harl + +2009-10-04 11:32 oetiker + + * src/rrd_daemon.c: rrdcached: Handle journal replay in + socket_permission_check(). -- Sebastian Harl + +2009-10-04 11:30 oetiker + + * src/rrd_daemon.c: rrdcached: Create the base directory on startup. + -- Sebastian Harl + +2009-10-04 11:29 oetiker + + * src/rrd_daemon.c: rrdcached: Improved the "base-dir symlink + check". The daemon checks if the specified base directory contains + symlinks by comparing the canonicalized path name (by realpath()) + with the path name specified on the command line. The GNU libc's + implementation of realpath() removed trailing slashes ('/') from + the pathname. Thus, specifying a base directory with a trailing + slash results in rrdcached aborting, complaining about an invalid + base directory, which is quite annoying imho. Now, trailing + slashes are removed before comparing the two path names. -- + Sebastian Harl + +2009-10-04 11:28 oetiker + + * src/rrd_daemon.c: rrdcached: Improved an error message. -- + Sebastian Harl + +2009-10-04 11:27 oetiker + + * src/rrd_daemon.c: rrdcached: Create the pidfile and (UNIX) socket + directories as well. Those files may be located in a subdirectory + of, e.g., /var/run/. To avoid the need to manually create (and + recreate, e.g. in case /var/run/ is on a tmpfs) that subdirectory, + let the daemon handle the creation of those directories. -- + Sebastian Harl + +2009-10-01 18:54 oetiker + + * src/rrd_fetch_libdbi.c, src/rrd_tool.h: rrd_fetch_libdbi: Fixed + some compiler warnings. While at it, declared some private helper + functions as static. -- Sebastian Harl + +2009-09-28 16:21 oetiker + + * doc/librrd.pod: Moved rrd_dump_cb_r() to section "CORE FUNCTIONS" + since this is not a utility function but rather part of RRDtool's + core. -- Sebastian Harl + +2009-09-28 16:16 oetiker + + * doc/Makefile.am: Moved the 'librrd' manpage to section 3 -- + Sebastian Harl + +2009-09-28 16:16 oetiker + + * doc/librrd.pod: documentation for rrd_mkdir_p added -- Sebastian + Harl + +2009-09-28 16:16 oetiker + + * src/rrd_daemon.c: free config_pid_file after using it for the last + time ... Else, the daemon might either segfault or leave the PID + file around. -- Sebastian Harl + +2009-09-28 16:15 oetiker + + * src/rrd_daemon.c: try to create missing journal directories rather + than abort with an error. -- Sebastian Harl + +2009-09-28 16:13 oetiker + + * src/librrd.sym.in.in, src/rrd.h, src/rrd_utils.c: added + rrd_mkdir_p - This function may be used to recursively create some + directory, similar to "mkdir -p" on the command-line. -- Sebastian + Harl + +2009-09-24 19:21 oetiker + + * src/rrd_restore.c: adjusted copyright wording according to + sebastians suggestions + +2009-09-15 12:21 oetiker + + * trunk/tutorial/lisa2009/rrd-by-example/body.tex: adapted for 2009 + +2009-09-15 12:20 oetiker + + * trunk/tutorial/lisa2009/abstract-rrdexample.txt, + trunk/tutorial/lisa2009/abstract-rrdtut.txt: initial + +2009-09-15 12:17 oetiker + + * trunk/tutorial/lisa2009, trunk/tutorial/lisa2009/rrd-intro.odp: + initial + +2009-09-01 08:49 oetiker + + * NEWS, src/rrd_graph.c: show element type in legend + +2009-08-25 09:01 oetiker + + * configure.ac, src/rrd_client.h, src/rrd_daemon.c: detect if + stdint.h is available. if not, use inttypes. this should fix #239 + and make compilation on solaris 9 work. + +2009-08-24 12:04 oetiker + + * debian/README, debian/README.Debian, debian/build_freetype.sh, + debian/changelog, debian/control, debian/copyright, + debian/librrd0-dev.files, debian/librrd0.files, + debian/librrd0.postinst, debian/librrd0.postrm, + debian/librrd0.shlibs, debian/librrdp-perl.files, + debian/librrds-perl.files, debian/rrdtool-tcl.files, + debian/rrdtool.files, debian/rules, debian/watch: replae with + pointer + +2009-08-24 12:02 oetiker + + * src/rrd_config_bottom.h: call fpclass only once when replacing + isnan for solaris + +2009-08-22 22:03 oetiker + + * MakeMakefile: remove misspellt keyword ... + +2009-08-21 05:03 oetiker + + * m4/acinclude.m4, src/rrd_config_bottom.h: make sure all elements + required in the definition of isinf are defined in their turn + +2009-08-20 22:02 oetiker + + * src/rrd_graph.c, src/rrd_tool.c: Trim trailing whitespace, reoder + getopt_long per shortopt char; Fix -D while at it -- Bernhard + Reutner-Fischer + +2009-08-19 15:24 oetiker + + * NEWS, doc/rrdgraph.pod, src, src/rrd_graph.c, src/rrd_graph.h, + src/rrd_tool.c: The attached patch allows to $ rrdtool graph + --border=0 to disable the 3d border around the image. -- Bernhard + Reutner-Fischer rep.dot.nop gmail.com + +2009-08-19 07:44 oetiker + + * src/rrd_graph.c: yes this should not matter, but I think it is the + right thing todo ... + +2009-08-17 21:34 oetiker + + * src/rrd_dump.c, src/rrd_tune.c: added missing prototypes + +2009-08-17 21:31 oetiker + + * CONTRIBUTORS, doc/librrd.pod, src/librrd.sym.in.in, src/rrd.h, + src/rrd_dump.c: Added a call back interface to rrd_dump to be able + to call the function from c. See librrd.pod for documentation. -- + Benny Baumann BenBE geshi.org + +2009-08-16 22:22 oetiker + + * doc/rrdcached.pod, src/rrd_daemon.c: From: Florian Forster + This patch introduces + per-socket, per-command permissions to the RRD caching daemon, + RRDCacheD. This allows administrators to limit access to the + daemon in a fine-grained manner. The patch removes the command + line option `-L' and introduces `-P' instead. The option must + appear *before* the `-l' option and the given permissions are set + for all following sockets or another `-P' option. For example: + rrdcached -P FLUSH,PENDING -l 10.2.3.4 -P UPDATE -l + unix:/some/path Allow `FLUSH' and `PENDING' commands to clients + connected via IPv4 networking and `UPDATE' to clients connected + via a UNIX domain socket only. There are a couple of exceptions: - + The commands `HELP' and `QUIT' are always allowed. - If the + command `BATCH' is allowed, the command `.' is automatically + allowed, too. By default, i. e. if no `-P' option is specified, + all commands will be allowed. As a shortcut to reset the behavior + to the default behavior, you can use the slightly hackish `-P ""' + syntax. Signed-off-by: Florian Forster + + +2009-08-16 22:05 oetiker + + * configure.ac: with my Debian Testing box I had to apply the + following small changes to the `configure.ac' file in order to + make `autoconf' happy. Don't know what the problem precisely is ? + m4 and its square parenthesis is too high for me ;) -- Florian + +2009-08-16 22:00 oetiker + + * autogen.sh: there is no config directory ... so lets not search + for it in autogen.sh + +2009-08-11 14:00 oetiker + + * branches/1.3/program/src/rrd_restore.c, src/rrd_restore.c: fix + freeing order when generating error messages. found by Dmitry V. + Krivenok + +2009-08-10 11:47 oetiker + + * m4/acinclude.m4: include math.h when testing IEEE + +2009-08-08 14:06 oetiker + + * branches/1.3/program/doc/rrd-beginners.pod, doc/rrd-beginners.pod: + remove extra \ in perl example + +2009-08-08 09:38 oetiker + + * src/rrd_daemon.c: The journal files are time-stamped and replayed + in order. This allows systems with 32-bit signed off_t to write + more than 2GB of journal entries per flush interval. --kevin + +2009-08-08 09:36 oetiker + + * doc/rrdgraph.pod: add some shell proggramming advice ... Bernhard + Reutner-Fischer + +2009-08-08 09:34 oetiker + + * src/rrd_daemon.c: Remove PID file later in the cleanup process + --kevin + +2009-08-08 09:29 oetiker + + * src/rrd_daemon.c: Increment the DataSetsWritten counter before + freeing the RRD values. --kevin + +2009-08-08 09:28 oetiker + + * src/rrd_daemon.c: The current method may have caused flushes (and + journal rotations) more often than necessary. The problem was + introduced in r1600. --kevin + +2009-08-08 09:27 oetiker + + * src/rrd_daemon.c: Two-phase shutdown for rrdcached ensures that + values are flushed. Previously, it was possible for the queue + threads to exit before the flush thread completed queueing values. + If running with -F, rrdcached may have crashed due to assertion + failure before writing all values. -- kevin + +2009-08-07 06:04 oetiker + + * branches/1.3/program/bindings/python/rrdtoolmodule.c, + bindings/python/rrdtoolmodule.c: include PACKAGE_VERSION as + version number for python module to fix #236 + +2009-08-03 18:51 oetiker + + * branches/1.3/program/src/rrd_info.c, src/rrd_info.c: in rrd > 1.3 + it's called rrd_info_push ... and not just info_push ... + +2009-08-03 18:45 oetiker + + * branches/1.2/program/src/rrd_info.c, + branches/1.3/program/src/rrd_info.c, src/rrd_info.c: Show the + index of each data source in the rrd_info output. Patch for #231 + provided by Glenn Herteg, GroundWork Open Source, Inc. + +2009-07-30 07:57 oetiker + + * NEWS: new news + +2009-07-30 07:56 oetiker + + * src/rrd_tune.c: rrd_tune HW Update Allow to set the smoothing + window (alpha, beta, gamma) to zero. I'm using rrdtool 1.3.8 with + abberant behavior detection from the Brutlag method. I need to use + a week seasonality and no smoothing for the SEASONAL and + DEVSEASONAL. So I use rrdtune in order to set the smoothing window + to 0.0. This calls the set_hwarg(). But this method is also used + to tune the alpha, beta and gamma that can't be set to 0.0 So when + I tune my smoothing window size to 0.0, it returns -1 due to the + if(window<=0.0) then do nothing. I join here a small correction + with a differnent method used to set only the smoothing window + size and allowing it to be zero. -- sylvain.luiset gmail.com + +2009-07-28 16:49 oetiker + + * configure.ac: update conditional silent-rules + +2009-07-14 12:00 oetiker + + * src/rrd_daemon.c: Handle race condition for "UPDATE" with new + files. Problem found by Sebastian Harl. Patch by Kevin. + +2009-07-12 06:28 oetiker + + * src/rrd_daemon.c: Do not trust cache tree pointers after releasing + the cache lock. It's possible that a "FORGET" was issued in the + mean time. -- kevin + +2009-07-10 05:52 oetiker + + * src/rrd_daemon.c: destroy flush condition variable + +2009-07-10 05:51 oetiker + + * src/rrd_graph.c: Move include so we know whether we + HAVE_LIBGEN_H -- kevin + +2009-07-09 20:14 oetiker + + * doc/Makefile.am, src/rrd_thread_safe.c: Silence automake + portability warnings caused by multiple inference rules. -- kevin + brintnall + +2009-07-05 08:41 oetiker + + * configure.ac, src/rrd_restore.c, win32/rrd_config.h.msvc: check + for the size of time_t and behave accordingly + +2009-07-04 14:51 oetiker + + * src/rrd_restore.c: be more careful when converting to string to + time_t ... test if time_t is long long + +2009-06-10 19:05 oetiker + + * bindings/lua/compat-5.1r5/compat-5.1.c, + bindings/lua/compat-5.1r5/compat-5.1.h, + bindings/lua/compat-5.1r5/compat-5.1.lua: add the real license ... + +2009-06-10 12:17 oetiker + + * branches/1.3/program/doc/bin_dec_hex.pod, + branches/1.3/program/doc/rrdtutorial.es.pod, doc/bin_dec_hex.pod, + doc/rrdtutorial.es.pod: fix bad pdf links + +2009-06-09 19:22 oetiker + + * bindings/lua/compat-5.1r5/compat-5.1.c, + bindings/lua/compat-5.1r5/compat-5.1.h, + bindings/lua/compat-5.1r5/compat-5.1.lua: added compat 5.1 license + copied from website + +2009-06-08 05:12 oetiker + + * branches/1.3/program/configure.ac, configure.ac: make config.h a + symlink to rrd_config.h so that intl/Makefile is happy + +2009-06-08 04:56 oetiker + + * branches/1.3/program/MakeMakefile, + branches/1.3/program/configure.ac, MakeMakefile, configure.ac: + Relax automake requirements and make 1.11 features optional -- + kevin brintnall + +2009-06-07 20:48 oetiker + + * bindings/perl-shared/RRDs.xs, bindings/python/rrdtoolmodule.c, + bindings/ruby/main.c: fix some missing rrd_flushcached instances + -- kevin + +2009-06-07 14:46 oetiker + + * bindings/tcl/tclrrd.c: switch to the rrd_flushcached interface + +2009-06-07 14:45 oetiker + + * src/rrd_cgi.c: consider fgets return value + +2009-06-07 14:33 oetiker + + * intl, po/Makefile.in.in: do not try to mess with autopoints files + +2009-06-07 14:27 oetiker + + * src/rrd_open.c: check return value from write + +2009-06-07 14:19 oetiker + + * src/rrd_daemon.c: check return values of dup and ftruncate + +2009-06-07 14:12 oetiker + + * src/rrd_fetch.c, src/rrd_flushcached.c, src/rrd_info.c: fix some + warnings + +2009-06-07 13:57 oetiker + + * intl, intl/Makefile.in: added a copy to svn since it is changed + from the original + +2009-06-07 13:53 oetiker + + * po/Makefile.in.in: changed from original version, so include it + ... + +2009-06-07 13:42 oetiker + + * Makefile.am, autogen.sh: include libtool with the distro + +2009-06-07 11:36 oetiker + + * configure.ac: another ID tag + +2009-06-07 11:35 oetiker + + * Makefile.am, README: more id tags added + +2009-06-07 11:34 oetiker + + * COPYRIGHT: updated for release + +2009-06-07 11:34 oetiker + + * COPYRIGHT, TODO: updated for release + +2009-06-07 11:20 oetiker + + * CONTRIBUTORS: added $Id:$ + +2009-06-07 11:16 oetiker + + * NEWS: initial news + +2009-06-02 13:55 oetiker + + * branches/1.3/program/doc/rrdupdate.pod, doc/rrdupdate.pod: Mention + that negative time values should be separated by '--' in + rrdupdate.pod -- Sebastian Harl + +2009-06-02 05:55 oetiker + + * trunk/talks/op5-09, trunk/talks/op5-09/3days-solar-graph.pdf, + trunk/talks/op5-09/active-acache-management.pdf, + trunk/talks/op5-09/active-acache-management.xar, + trunk/talks/op5-09/beamercolorthemetobi.sty, + trunk/talks/op5-09/body.tex, trunk/talks/op5-09/cache-flow.pdf, + trunk/talks/op5-09/cache-flow.xar, + trunk/talks/op5-09/cache-importance.pdf, + trunk/talks/op5-09/cache-importance.xar, + trunk/talks/op5-09/charles.png, + trunk/talks/op5-09/energy_graph.png, + trunk/talks/op5-09/handouts.tex, + trunk/talks/op5-09/n20e-daily.png, + trunk/talks/op5-09/nmn09_200.jpg, trunk/talks/op5-09/pings.png, + trunk/talks/op5-09/presentation.tex, + trunk/talks/op5-09/readahead-fix.pdf, + trunk/talks/op5-09/readahead-fix.xar, + trunk/talks/op5-09/systembelastung.png, + trunk/talks/op5-09/update-schematics.pdf, + trunk/talks/op5-09/update-schematics.xar: initial + +2009-06-01 14:01 oetiker + + * branches/1.3/program/m4/acinclude.m4, m4/acinclude.m4: Make + rrdtool compile on GNU/kFreeBSD. Fix for Debian bug 494874. Patch + by Petr Salinger. + +2009-06-01 13:58 oetiker + + * branches/1.3/program/src/rrd_update.c, src/rrd_update.c: make + negative update times work as diescribed in the documentation (-5 + is NOW-5seconds) this takes care of debian bug 332766 + +2009-05-28 05:25 oetiker + + * src/rrd_open.c: madvise hints may not be ORed since they are + enumerated ... #224 + +2009-05-27 16:23 oetiker + + * configure.ac: back to 0.14.4 + +2009-05-27 16:21 oetiker + + * Makefile.am, configure.ac: get the latest gettext + +2009-05-27 16:03 oetiker + + * src/Makefile.am: added gettext.h to dist + +2009-05-27 15:00 oetiker + + * src/gettext.h: added missing gettext.h + +2009-05-27 14:59 oetiker + + * po/LINGUAS, po/de.po: we don't have any translations ... so do not + pretend + +2009-05-27 14:31 oetiker + + * autogen.sh, configure.ac: reduce gettext version requirements + +2009-05-27 14:14 oetiker + + * MakeMakefile: fix path + +2009-05-27 13:39 oetiker + + * MakeMakefile, Makefile.am, acinclude.m4, autogen.sh, + bindings/Makefile.am, configure.ac, doc/Makefile.am, + m4/acinclude.m4, po/ChangeLog, po/Makevars, src/Makefile.am, + src/rrd_i18n.h: the get ready for 1.4rc patch * updated to + automake 1.11 with silet build, with this warnings stand out much + better in the build process. use make V=1 to see all as before * + switched from intltoolize to autopoint for gettext support * moved + m4 bits into their own subdirectory --tobi + +2009-05-27 13:11 oetiker + + * src/rrd_graph.c, src/rrd_graph.h: Only include libgen.h when we + have it. use pbbasename if we do not. Also fixes #223. + +2009-05-26 15:25 oetiker + + * doc/rrdtool.pod: update flush to flushcached + +2009-05-26 15:24 oetiker + + * bindings/lua/rrdlua.c, bindings/perl-shared/RRDs.pm, + bindings/perl-shared/RRDs.xs, bindings/python/rrdtoolmodule.c, + bindings/ruby/main.c, bindings/tcl/tclrrd.c: bindings should + invoke new rrd_flushcached (instead of rrd_cmd_flush) -- kevin + +2009-05-26 15:20 oetiker + + * src/rrd_restore.c: "ulong" is not portable. must be unsigned long + -- kevin + +2009-05-26 08:55 oetiker + + * doc/Makefile.am: update flush document name + +2009-05-26 07:14 oetiker + + * src/Makefile.am: rename rrd_flush.c to rrd_flushcached.c in + Makefile.am + +2009-05-26 07:13 oetiker + + * doc/rrdflush.pod, doc/rrdflushcached.pod, src/librrd.sym.in.in, + src/rrd.h, src/rrd_flush.c, src/rrd_flushcached.c, src/rrd_open.c, + src/rrd_tool.c: resolve the "flush inconsistency": * rrd_flush (a + leftover from when rrdtool was using stream based io) is turned + into a no-op but still exported to preserve library compatibility. + * rrd_cmd_flush (the implementation of "rrdtool flush") is renamed + to rrd_flushcached along with its command line invocation which is + now rrdtool flushcached --tobi + +2009-05-25 22:23 oetiker + + * src/rrd_restore.c: While restoring, rrd_restore uses between 30 + and 40 times as much memory as the size of the rrd file to be + restored. This is due to the use of libxml2 for parsing the the + whole file prior to turning it into rrd structs. This patch + switches rrd_restore to using the xmlTextReader interface for + incremental consumtion of xml files. This reduces the memory + requirements to about twice the size of the rrd file which should + be quite manageable for most cases. The parsing is about 25% less + efficient than with the original libxml2 version of rrd_restore. + This could be in part due to the more liberal use of malloced + memory. Optimizing this is for another day though. --tobi + +2009-05-25 06:05 oetiker + + * branches/1.3/program/src/rrd_open.c, src/rrd_open.c: only include + utime.h when necessary + +2009-05-24 10:31 oetiker + + * branches/1.3/program/configure.ac, + branches/1.3/program/src/rrd_info.c, + branches/1.3/program/src/rrd_open.c, + branches/1.3/program/src/rrd_update.c, configure.ac, + src/rrd_info.c, src/rrd_open.c, src/rrd_update.c: * in 1.3: + Changed types used in rrd_file_t from off_t to size_t to prevent: + warning: comparison between signed and unsigned * Misc other off_t + -> size_t changes to prevent signed warning * in 1.3: Added + rrd_dump_opt_r declaration to prevent undef warning * Explicit + cast to time_t of check in rrd_fetch to prevent signed warning * + Added vasprintf path to sprintf_alloc to prevent excessive + mallocing * in 1.3: fixed STRERROR_R_CHAR_P undef warning patch by + Steven Hartland killing multiplay.co.uk + +2009-05-22 14:54 oetiker + + * src/rrd_update.c: reset errno right befor the call I want to test + +2009-05-22 13:55 oetiker + + * src/rrd_update.c: inline is something for the compiler to figure + ... + +2009-05-22 11:32 oetiker + + * branches/1.3/program/src/rrd_update.c, src/rrd_update.c: fix error + messages on the road to fix #222 + +2009-05-21 05:20 oetiker + + * doc/rrdgraph.pod: fix text organisation + +2009-05-18 14:23 oetiker + + * branches/1.3/program/bindings/python/rrdtoolmodule.c, + bindings/python/rrdtoolmodule.c: integrated fix for debian bug + #529291 as supplied by Anders Hammarquist + +2009-05-11 21:25 oetiker + + * branches/1.3/program/configure.ac, + branches/1.3/program/src/rrd_getopt.c, configure.ac, + src/rrd_getopt.c: fix rrd_getops use of external variables (optarg + and friends) ... most prominently is kills a segfault when using + rrdtool perl bindings on solaris ... thanks to Ihsan Dogan for + helping with tracking this down and providing access to sparc + solaris boxes. + +2009-04-29 06:52 oetiker + + * branches/1.3/program/CONTRIBUTORS, + branches/1.3/program/doc/rrdgraph_data.pod, CONTRIBUTORS, + doc/rrdgraph_data.pod: added some remarks on CDEF versus VDEF to + the docs -- Pablo Sanchez + +2009-04-20 06:48 oetiker + + * doc/Makefile.am, doc/librrd.pod, src/librrd.sym.in.in, src/rrd.h, + src/rrd_daemon.c, src/rrd_utils.c: This patch includes utility + functions to support dynamically sized arrays. This simplifies the + code that manages some of the dynamic structures inside rrdcached. + A few data types have been changed to size_t. -- kevin + +2009-04-20 06:46 oetiker + + * doc/rrdinfo.pod, src/rrd_format.c, src/rrd_info.c, src/rrd_open.c, + src/rrd_tool.h: introduced header_property in info output -- + Daniel.Pocock barclayscapital.com + +2009-04-17 09:53 oetiker + + * branches/1.3/program/src/rrd_tool.c, src/rrd_tool.c: add + documentation for graph-render-mode + +2009-04-15 07:05 oetiker + + * branches/1.3/program/src/rrd_restore.c, src/rrd_restore.c: fix + comments and error messages in rrd_restore patch + +2009-04-15 07:02 oetiker + + * branches/1.3/program/src/rrd_restore.c, src/rrd_restore.c: Fix + casting issues in rrd_restore. The bug manifested when compiled on + sparc v9 as explained in #218. Patch based in input provided by + poster of #218. + +2009-04-14 13:55 oetiker + + * branches/1.2/program/bindings/ruby/main.c, + branches/1.3/program/bindings/ruby/main.c, bindings/ruby/main.c: + make ruby bindings compile with newer ruby versions ... fix for + #217 patch provided by rrd trac user. + +2009-04-14 07:51 oetiker + + * branches/1.3/program/bindings/perl-piped/RRDp.pm, + bindings/perl-piped/RRDp.pm: Generate an error message when using + RRDp with graph - this can not work reliably. (Debian Bug#251701) + -- Sebastian Harl + +2009-04-14 06:10 oetiker + + * src/Makefile.am, src/librrd.sym.in.in, src/rrd.h, + src/rrd_daemon.c, src/rrd_open.c, src/rrd_restore.c, + src/rrd_utils.c: rrd_random() is a wrapper around random() that + ensures the PRNG is seeded exactly ONCE per process. rrd_utils.c + is introduced for functions that do not have a better home. + --kevin + +2009-04-10 08:52 oetiker + + * src/rrd_daemon.c: This patch consolidates several aspects of the + command handling in rrdcached: * all commands, help, and context + information is reduced to a single data structure. * all checks + for command validity (context and permission) are handled in the + main dispatch routine This removes duplicate help/syntax text, and + long if..elseif..else chains. It facilitates the addition of new + commands. -- kevin + +2009-04-09 15:07 oetiker + + * src/rrd_daemon.c: The bookkeeping of all threads is not necessary, + since we cannot pthread_join() them anyway. We only need to know + when the last one has exited. -- kevin + +2009-04-09 15:05 oetiker + + * doc/rrdcached.pod: added missing docs -- kevin + +2009-04-09 15:04 oetiker + + * branches/1.3/program/doc/rrdtutorial.pod, doc/rrdtutorial.pod: + added missing newline -- by sebastian harl + +2009-04-07 17:33 oetiker + + * trunk/talks/swinog18/body.tex, + trunk/talks/swinog18/presentation.tex: minor adjustments + +2009-04-07 07:23 oetiker + + * m4: make sure an empty m4 is in the checkout + +2009-04-07 06:37 oetiker + + * branches/1.3/program/doc/rrdgraph.pod, + branches/1.3/program/src/rrd_graph.c, NEWS, doc/rrdgraph.pod, + src/rrd_graph.c: fix for #213 restore old behaviour of --lazy. + Even in lazy mode all the data calculation elements are run. The + main time saving comes from the fact that the graph is not being + drawn and the image does not have to be compressed. + +2009-04-07 06:03 oetiker + + * branches/1.3/program/src/rrd_dump.c, src/rrd_dump.c: make sure + rrd_dump outputs numbers with C locale so that . does not suddenly + become , this fixes #212 + +2009-04-06 14:49 oetiker + + * CONTRIBUTORS, bindings/python/rrdtoolmodule.c, doc/rrdpython.pod: + I thought that it would be nice to be able to pass parameters to + python bindings as a list (array) of strings. -- Vytautas + Zdanavicius vytaszd at yahoo.com + +2009-04-06 14:14 oetiker + + * src/rrd_dump.c: use %lld with (long long) conversion when printing + time. + +2009-04-06 14:12 oetiker + + * branches/1.3/program/src/rrd_update.c, src/rrd_update.c: printf + for time_t with %lli can easily cause a segfault since on many + platforms time_t is only 32bit ... by adding (long long) to the + time value this gets fixed. + +2009-04-06 14:08 oetiker + + * src/rrd_graph.c: lets have an error message when creating the + graph fails + +2009-04-06 12:02 oetiker + + * trunk/talks/goopen-09/active-acache-management.pdf, + trunk/talks/goopen-09/active-acache-management.xar, + trunk/talks/goopen-09/beamercolorthemetobi.sty, + trunk/talks/goopen-09/body.tex, + trunk/talks/goopen-09/cache-flow.pdf, + trunk/talks/goopen-09/cache-flow.xar, + trunk/talks/goopen-09/cache-importance.pdf, + trunk/talks/goopen-09/cache-importance.xar, + trunk/talks/goopen-09/charles.png, + trunk/talks/goopen-09/energy_graph.png, + trunk/talks/goopen-09/handouts.tex, + trunk/talks/goopen-09/n20e-daily.png, + trunk/talks/goopen-09/pings.png, + trunk/talks/goopen-09/presentation.tex, + trunk/talks/goopen-09/readahead-fix.pdf, + trunk/talks/goopen-09/readahead-fix.xar, + trunk/talks/goopen-09/systembelastung.png, + trunk/talks/goopen-09/update-schematics.pdf, + trunk/talks/goopen-09/update-schematics.xar: go open presentation + checkin + +2009-03-30 18:33 oetiker + + * trunk/talks/swinog18/active-acache-management.xar: sync xara file + +2009-03-30 18:31 oetiker + + * trunk/talks/swinog18, + trunk/talks/swinog18/active-acache-management.pdf, + trunk/talks/swinog18/active-acache-management.xar, + trunk/talks/swinog18/beamercolorthemetobi.sty, + trunk/talks/swinog18/body.tex, + trunk/talks/swinog18/cache-flow.pdf, + trunk/talks/swinog18/cache-flow.xar, + trunk/talks/swinog18/cache-importance.pdf, + trunk/talks/swinog18/cache-importance.xar, + trunk/talks/swinog18/handouts.tex, + trunk/talks/swinog18/presentation.tex, + trunk/talks/swinog18/readahead-fix.pdf, + trunk/talks/swinog18/readahead-fix.xar, + trunk/talks/swinog18/update-schematics.pdf, + trunk/talks/swinog18/update-schematics.xar: initial + +2009-03-21 10:45 oetiker + + * src/rrd_hw.c: remove excess flush calls ... + +2009-03-21 09:56 oetiker + + * src/librrd.sym.in.in, src/rrd.h: remove flush symbol + +2009-03-21 09:53 oetiker + + * src/rrd_hw.c, src/rrd_open.c: the call to rrd_flush has appeared + when rrd_open was fleshed out. It used to be an fflush call which + is something entirely different than the current rrd_flush + implementation with fdatasync was ... we can safely drop this and + gain performance for holt winters in the process ... -- tobi + +2009-03-18 17:12 oetiker + + * CONTRIBUTORS, NEWS, doc/rrdgraph.pod, src/rrd_graph.c, + src/rrd_graph.h: New rrd_graph functions for legend placement + control added -- Patch by Melchior Rabe rrdtool mrab.de + +2009-03-08 11:12 oetiker + + * src/rrd_flush.c: rrd_flush.c: Provide a more useful error message. + by Sebastian Harl + +2009-03-08 08:02 oetiker + + * branches/1.2/program/WIN32-BUILD-TIPS.txt, + branches/1.2/program/bindings/Makefile.am, + branches/1.2/program/bindings/perl-shared/MANIFEST, + branches/1.2/program/bindings/perl-shared/ntmake-build, + branches/1.2/program/bindings/perl-shared/ntmake.PL, + branches/1.3/program/WIN32-BUILD-TIPS.txt, + branches/1.3/program/bindings/Makefile.am, + branches/1.3/program/bindings/perl-shared/MANIFEST, + branches/1.3/program/bindings/perl-shared/ntmake-build, + branches/1.3/program/bindings/perl-shared/ntmake.PL, + WIN32-BUILD-TIPS.txt, bindings/Makefile.am, + bindings/perl-shared/MANIFEST, bindings/perl-shared/ntmake-build, + bindings/perl-shared/ntmake.PL: Renaming ntmake.pl to ntmake.PL + (r1742) had unforseen side effects. At least on freebsd ntmake.PL + gets called automatically during build. This is not desired. I + renamed the file to ntmake-build sinc it gets called explicilty on + windows anyway. Reported by Kevin modified by Tobi + +2009-03-07 10:31 oetiker + + * NEWS, bindings/lua/rrdlua.c, bindings/perl-shared/RRDs.pm, + bindings/perl-shared/RRDs.xs, bindings/python/rrdtoolmodule.c, + bindings/ruby/main.c, bindings/tcl/tclrrd.c, doc/rrdflush.pod, + src/rrd_flush.c: This 2-patch series exposes 'flush' methods to + the various language bindings. + +2009-03-06 17:30 oetiker + + * trunk/talks/goopen-09, trunk/talks/goopen-09/abstract.txt, + trunk/talks/goopen-09/bio.txt: initial + +2009-03-06 05:51 oetiker + + * branches/1.3/program/src/rrd_xport.c, src/rrd_xport.c: there were + two lines of debug info printed by rrd_xport, messing up the xml + code. Fix by Alejandro Galue. + +2009-03-06 05:39 oetiker + + * configure.ac, src/rrd_thread_safe.c: Even though POSIX/XSI + requires "strerror_r" to return an "int", some systems (e.g. the + GNU libc) return a "char *" _and_ ignore the second argument (user + provided buffer). The configure script now checks for that + behavior using AC_FUNC_STRERROR_R. rrd_strerror() in + rrd_thread_safe.c has been updated to (hopefully) handle all + possible cases. Previously, rrd_strerror() would have returned + "strerror_r failed. sorry!" in mostly any cases when using glibc, + since "if (strerror_r())" had been used to check for errors which + evaluates to true if a (non-NULL) pointer was returned. Now, we, + at least, return the error number in case anything else fails. + Thanks to Alessandro Iurlano for reporting this issue after + spotting it in collectd . patch by Sebastian + Harl + +2009-03-06 05:30 oetiker + + * src/rrd_daemon.c: Make sure we use correct sizes for vsnprintf + (sizeof) and strncpy (sizeof-1). -- kevin + +2009-02-21 09:43 oetiker + + * branches/1.2/program/doc/bin_dec_hex.pod, + branches/1.2/program/doc/cdeftutorial.pod, + branches/1.2/program/doc/rrdgraph.pod, + branches/1.2/program/doc/rrdgraph_data.pod, + branches/1.2/program/doc/rrdgraph_examples.pod, + branches/1.2/program/doc/rrdgraph_graph.pod, + branches/1.2/program/doc/rrdgraph_rpn.pod, + branches/1.2/program/doc/rrdresize.pod, + branches/1.2/program/doc/rrdtutorial.es.pod, + branches/1.2/program/doc/rrdtutorial.pod, + branches/1.3/program/doc/bin_dec_hex.pod, + branches/1.3/program/doc/cdeftutorial.pod, + branches/1.3/program/doc/rrdgraph.pod, + branches/1.3/program/doc/rrdgraph_data.pod, + branches/1.3/program/doc/rrdgraph_examples.pod, + branches/1.3/program/doc/rrdgraph_graph.pod, + branches/1.3/program/doc/rrdgraph_rpn.pod, + branches/1.3/program/doc/rrdresize.pod, + branches/1.3/program/doc/rrdtutorial.es.pod, + branches/1.3/program/doc/rrdtutorial.pod, doc/bin_dec_hex.pod, + doc/cdeftutorial.pod, doc/rrdgraph.pod, doc/rrdgraph_data.pod, + doc/rrdgraph_examples.pod, doc/rrdgraph_graph.pod, + doc/rrdgraph_rpn.pod, doc/rrdresize.pod, doc/rrdtutorial.es.pod, + doc/rrdtutorial.pod: Misc documentation fixes by Alex van den + Bogaerdt + +2009-02-21 09:23 oetiker + + * doc/rrdgraph.pod, doc/rrdgraph_rpn.pod: Documentation fixes by + Bernhard Reutner-Fischer + +2009-01-25 22:39 oetiker + + * branches/1.3/program/doc/rrdgraph.pod, doc/rrdgraph.pod: added doc + on new graphv graph_start und graph_end info variables + +2009-01-25 22:02 oetiker + + * branches/1.2/program/src/rrd_dump.c, + branches/1.2/program/src/rrd_first.c, + branches/1.3/program/src/rrd_dump.c, + branches/1.3/program/src/rrd_first.c, + branches/1.3/program/src/rrd_graph.c, src/rrd_dump.c, + src/rrd_first.c, src/rrd_graph.c: fix type conversion error (on + windows) unsigned/signed affecting timestamps on rrd_dump. + +2009-01-25 21:52 oetiker + + * branches/1.2/program/bindings/Makefile.am, + branches/1.2/program/bindings/perl-shared/ntmake.PL, + branches/1.2/program/bindings/perl-shared/ntmake.pl, + branches/1.3/program/bindings/Makefile.am, + branches/1.3/program/bindings/perl-shared/ntmake.PL, + branches/1.3/program/bindings/perl-shared/ntmake.pl, + bindings/Makefile.am, bindings/perl-shared/ntmake.PL, + bindings/perl-shared/ntmake.pl: rename ntmake.pl to ntmake.PL so + that it does not get installed + +2009-01-25 18:38 oetiker + + * src/rrd_tool.c: define cwd where we need it and not outside + +2009-01-14 08:14 oetiker + + * branches/1.3/program/src/rrd_graph.c, src/rrd_graph.c: In + rrd_graph: the width/height values are written into + rrd_infoval_t's u_cnt but read out of u_int (u_long vs. int). This + breaks on LP64BE. Patch by Rafal Boni rafal pobox.com + +2009-01-14 07:22 oetiker + + * NEWS, doc/rrdgraph_rpn.pod, src/rrd_graph.c, src/rrd_graph.h: + added percentnan (VDEF PERCENT variant that ignores NAN) -- patch + by Martin Sperl + +2009-01-13 07:37 oetiker + + * trunk/talks/opentuesday/rrd-intro.odp: make the talk ready + +2009-01-09 15:42 oetiker + + * trunk/status2: seems to wrok + +2009-01-09 15:41 oetiker + + * trunk/status2: test + +2009-01-09 15:40 oetiker + + * trunk/status/x: test + +2009-01-06 16:32 oetiker + + * branches/1.3/program/src/rrd_resize.c, src/rrd_resize.c: with MMAP + enabled rrd resize GROW was broken ... this fixes it ... + +2009-01-06 15:45 oetiker + + * branches/1.2/program/src/rrd_graph.c, + branches/1.3/program/src/rrd_graph.c, src/rrd_graph.c: TICK with + negative numbers should 'start from the top of the graph' looking + down ... now it does. + +2009-01-06 14:54 oetiker + + * branches/1.2/program/src/rrd_cgi.c, + branches/1.3/program/src/rrd_cgi.c, src/rrd_cgi.c: fix for + segfault in rrd_cgi: caused by freeing a invalid address when + printing an error message. + +2008-12-26 08:05 oetiker + + * branches/1.3/program/configure.ac, + branches/1.3/program/src/rrd_graph.h, configure.ac, + src/rrd_graph.h: Include libgen.h to get prototype for basename in + a POSIX conformant way. Fix for #202. + +2008-12-26 08:03 oetiker + + * branches/1.3/program/doc/rrdbuild.pod, doc/rrdbuild.pod: + improvements for build docs by Zorzoli, Pablo + +2008-12-22 21:23 oetiker + + * branches/1.3/program/src/rrd_fetch.c, src/rrd_fetch.c: should free + memory after a successful fetch too ... + +2008-12-22 21:23 oetiker + + * branches/1.3/program/bindings/perl-shared/RRDs.pm, + bindings/perl-shared/RRDs.pm: documentation fixes + +2008-12-22 07:21 oetiker + + * branches/1.3/program/doc/rrdgraph.pod, doc/rrdgraph.pod: Fix for + POD error by Sebasian Harl + +2008-12-22 07:20 oetiker + + * branches/1.3/program/doc/bin_dec_hex.pod, + branches/1.3/program/doc/rpntutorial.pod, + branches/1.3/program/doc/rrdbuild.pod, + branches/1.3/program/doc/rrdcgi.pod, + branches/1.3/program/doc/rrdgraph-old.pod, + branches/1.3/program/doc/rrdgraph.pod, + branches/1.3/program/doc/rrdgraph_data.pod, + branches/1.3/program/doc/rrdgraph_examples.pod, + branches/1.3/program/doc/rrdgraph_graph.pod, + branches/1.3/program/doc/rrdtool.pod, + branches/1.3/program/doc/rrdtutorial.pod, doc/bin_dec_hex.pod, + doc/rpntutorial.pod, doc/rrdbuild.pod, doc/rrdcgi.pod, + doc/rrdgraph-old.pod, doc/rrdgraph.pod, doc/rrdgraph_data.pod, + doc/rrdgraph_examples.pod, doc/rrdgraph_graph.pod, + doc/rrdgraph_libdbi.pod, doc/rrdtool.pod, doc/rrdtutorial.pod: + Fixes some typos by Sebastian Harl. + +2008-12-19 14:26 oetiker + + * branches/1.3/program/src/Makefile.am, + branches/1.3/program/src/plbasename.c, + branches/1.3/program/src/plbasename.h, + branches/1.3/program/src/rrd_graph.c, + branches/1.3/program/src/rrd_update.c, + branches/1.3/program/win32/rrdlib.vcproj, src/Makefile.am, + src/plbasename.c, src/plbasename.h, src/rrd_graph.c, + src/rrd_update.c, win32/rrdlib.vcproj: win32 fixes by Stefan . + Ludewig . exitgames . com * added portable plbasename since + basename is not available on stock win32 * rrd_update was using %d + to show a timestamp ... %lli is better since it also will show + 64bit time_t correctly. + +2008-12-18 23:56 oetiker + + * branches/1.3/program/Makefile.am, Makefile.am: fix extra dist to + include missing win32 files + +2008-12-11 14:31 oetiker + + * branches/1.2/program/src/rrd_fetch.c, + branches/1.3/program/src/rrd_fetch.c, src/rrd_fetch.c: fixed + another seek issue ... + +2008-12-11 10:01 oetiker + + * branches/1.2/program/rrdtool.spec, + branches/1.3/program/rrdtool.spec, rrdtool.spec: The spec file for + building the rrdtool as an RPM that comes with the release is not + "friendly" to older versions of RHEL and derivatives. -- Martin + Sperl + +2008-12-11 09:59 oetiker + + * doc/Makefile.am: include luapod into distro + +2008-12-10 13:18 oetiker + + * branches/1.3/program/src/rrd_restore.c, src/rrd_restore.c: On some + architectures, strtod does not turn "NaN" into 'Not A Number + (NAN)' se we better provide our own code here. + +2008-12-10 12:42 oetiker + + * NEWS, doc/rrddump.pod, src/rrd_dump.c: rrdtool dump is now + backward compatible with rrdtool 1.3 dump again. Default is + --header=dtd and --no-header is an alias for --header=none + +2008-12-10 08:29 oetiker + + * NEWS: minichange + +2008-12-09 18:30 oetiker + + * branches/1.3/program/doc/rrdgraph.pod, + branches/1.3/program/src/rrd_graph.c, + branches/1.3/program/src/rrd_graph.h, + branches/1.3/program/src/rrd_tool.c, doc/rrdgraph.pod, + src/rrd_graph.c, src/rrd_graph.h, src/rrd_tool.c: * forward ported + right axis patch from 1.2 branche * fixed --full-size-mode sizing + issue when used in combination with --title the work in the axis + patch has been sponsored by VoltWerk. + +2008-12-08 16:07 oetiker + + * branches/1.3/program/bindings/ruby/main.c, + branches/1.3/program/bindings/ruby/test.rb, bindings/ruby/main.c, + bindings/ruby/test.rb: Fix for last method in ruby bindings -- + Hiroyuki Ikezoe + +2008-12-05 15:39 oetiker + + * branches/1.3/program/bindings/perl-shared/Makefile.PL, + bindings/perl-shared/Makefile.PL: integrate osx build hints as + indicated in #192 + +2008-12-05 15:23 oetiker + + * src/rrd_open.c: deleted a bit much from rrd_open ... merged back + in + +2008-12-05 15:18 oetiker + + * branches/1.3/program/acinclude.m4, + branches/1.3/program/configure.ac, + branches/1.3/program/src/rrd_open.c, acinclude.m4, configure.ac, + src/rrd_open.c: check for broken implementations of msync / + MS_ASYNC where the mtime does not get updated. warn and explicitly + call utime in rrd_open when a file is opened rw. + +2008-12-05 10:23 oetiker + + * examples/rrdcached/Makefile.am: added rrdcached examples to + extra_dist to make sure they get distributed + +2008-12-04 16:01 oetiker + + * branches/1.3/program/src/rrd_graph.c, src/rrd_graph.c: Legends + should NOT be placed in reverse order when using --full-size-mode + ... this fixed #198. + +2008-12-04 15:49 oetiker + + * src/rrd_fetch.c: add de-referencing to step in fetch check + +2008-12-04 15:48 oetiker + + * src/rrd.h: fix merg error with win32 port + +2008-12-04 09:03 oetiker + + * branches/1.2/program/src/rrd_graph_helper.c, + branches/1.3/program/src/rrd_graph_helper.c, + src/rrd_graph_helper.c: Catch CDEF:tot= and raise and error to fix + #199. Thanks to Jeron Massar for reporting this. + +2008-12-04 07:02 oetiker + + * branches/1.3/program/CONTRIBUTORS, + branches/1.3/program/WIN32-BUILD-TIPS.txt, + branches/1.3/program/src/rrd_tool.c, + branches/1.3/program/win32/rrd.sln, + branches/1.3/program/win32/rrdtool.vcproj, CONTRIBUTORS, + WIN32-BUILD-TIPS.txt, src/rrd_tool.c, win32/rrd.sln, + win32/rrdtool.vcproj: Update to WIN32-BUILD-TIPS.txt and VC + project files so that the rrdtool.exe can be built too. -- Stefan + Ludewig Stefan.Ludewig exitgames.com + +2008-12-03 11:08 oetiker + + * branches/1.2/program/src/rrd_fetch.c, + branches/1.3/program/src/rrd_fetch.c, src/rrd_fetch.c: When + fetching data from 'past' an rra, rrd_fetch was seeking past the + rrd file. This did cause seek errors in some setups. Fixed. Thanks + to Daniel Pocock for finding the problem. + +2008-12-03 09:54 oetiker + + * configure.ac, examples/Makefile.am, + examples/rrdcached/Makefile.am: integrated rrdcached examples into + build process + +2008-12-03 08:47 oetiker + + * examples/rrdcached, examples/rrdcached/RRDCached.pm, + examples/rrdcached/rrdcached-size.pl: add rrdcached examples -- + kevin + +2008-12-02 12:35 oetiker + + * branches/1.2/program/doc/rrdbuild.pod, + branches/1.3/program/doc/rrdbuild.pod, doc/rrdbuild.pod: fixed + solaris build instructions + +2008-12-01 11:05 oetiker + + * doc/Makefile.am: added libdbi doc to extradist + +2008-11-24 16:08 oetiker + + * trunk/status/2008-11-24.txt: updates by fritz + +2008-11-24 14:20 oetiker + + * trunk/status/2008-11-24.txt: slightly revised + +2008-11-24 14:00 oetiker + + * trunk/status/2008-11-24.txt: initial + +2008-11-20 13:04 oetiker + + * doc/rrdgraph_libdbi.pod, src/rrd_fetch_libdbi.c: Attached a patch + for the rrd-tool LIBDBI integration with the following + improvements: a) correct error handling in case of libdbi being + unable to load the driver was producing segmentation faults. b) + better parsing of datasources * until now timestamp fields had to + be integer and had to contain a unix timestamp - now you can now + also use DateTime fields (you still need to specify it, as the + time-range needs to be defined correctly) * data fields are now no + longer limited to (var)char or DOUBLE fields - FLOAT, INTEGER,... + are now also supported. c) there is a bug with at least LIBDBI + 0.8.1 in conjunction with mysql that can result in segmentation + faults when BINARY/BLOB fields are accessed - rrdtool will now + tell you about this fact before dying ;) d) also the value of + rrdderivemaxstep only gets applied if derive has been selected + correctly. e) "GROUP BY timestamp" has been removed from SQL + statement. f) "ORDER BY timestamp" will be added only in the case + of fetching "derived" data. -- Martin Sperl + +2008-11-18 17:19 oetiker + + * CONTRIBUTORS, src/rrd.h, src/rrd_client.h, src/rrd_create.c, + src/rrd_daemon.c, src/rrd_diff.c, src/rrd_error.c, + src/rrd_fetch.c, src/rrd_first.c, src/rrd_format.c, + src/rrd_getopt.c, src/rrd_getopt.h, src/rrd_getopt1.c, + src/rrd_graph.c, src/rrd_graph.h, src/rrd_hw.c, src/rrd_hw_math.c, + src/rrd_hw_update.c, src/rrd_info.c, src/rrd_open.c, + src/rrd_parsetime.c, src/rrd_resize.c, src/rrd_restore.c, + src/rrd_rpncalc.c, src/rrd_thread_safe_nt.c, src/rrd_tool.c, + src/rrd_tune.c, src/rrd_update.c, src/rrd_xport.c, win32/config.h, + win32/rrdlib.vcproj: win32 portability patch and + win32/rrdlib.vcproj file for the source -- christof wegmann + Christof.Wegmann with exitgames.com some fixes to make the result + work on unix again ... + +2008-11-18 08:37 oetiker + + * trunk/contrib/php4/rrdtool.c: added patch suggested by Lars + Johannesen + +2008-11-18 07:14 oetiker + + * configure.ac: missing , added to help string + +2008-11-17 16:21 oetiker + + * doc/Makefile.am: added build instruction for libdbi docu + +2008-11-16 22:24 oetiker + + * doc/RRDp.pod, doc/RRDs.pod, doc/rrdgraph_libdbi.pod: missing pod + files + +2008-11-15 14:35 oetiker + + * configure.ac: switch tu using AS_HELP_STRING for formatting ... + +2008-11-15 14:15 oetiker + + * src/rrd_daemon.c: fix typo in handle_request_help --kevin + +2008-11-15 14:14 oetiker + + * doc/rrdcached.pod: doc fixups for rrdcacehd * documented the -p + option * added nbsp between option and argument * layout one + option per line --kevin + +2008-11-11 16:36 oetiker + + * src/rrd_graph.c: make basename work + +2008-11-11 16:36 oetiker + + * doc/rrdcached.pod, src/rrd_daemon.c: This patch allows for + multiple RRD writer threads to service the queue. Now, rrdcached + can have more simultaneous I/O requests into the kernel. This may + allow the kernel to re-order disk writes, resulting in better disk + throughput. In practice, throughput is increased by 2-3x. The + flush (-f) timer maintenance has been moved from queue_thread_main + into its own thread. Be more careful about when to use + pthread_cond_signal vs _broadcast, since multiple threads may be + waiting on &queue_cond. --kevin + +2008-11-10 16:41 oetiker + + * trunk/tutorial/lisa2008/rrd-intro.odp: added 1.4 notes + +2008-11-09 19:19 oetiker + + * branches/1.3/program/configure.ac, configure.ac: be even more + liberal with NOT using isfinite on solaris2.8 + +2008-11-09 00:00 oetiker + + * branches/1.2/program/src/rrd_graph.c, + branches/1.2/program/src/rrd_graph.h, + branches/1.3/program/src/rrd_graph.c, src/rrd_graph.c: use + basename to determine filename for imginfo as suggested by + sebastian + +2008-11-08 22:57 oetiker + + * src/rrd_daemon.c: rrdcached: move queue length decrement into + remove_from_queue -- kevin + +2008-11-08 22:57 oetiker + + * doc/rrdcached.pod, src/rrd_daemon.c: rrdcached: examine the + current queue with the "QUEUE" command -- kevin + +2008-11-08 22:50 oetiker + + * src/rrd_daemon.c: This helps with portability on platforms where + realloc doesn't handle NULL. -- kevin + +2008-11-08 18:01 oetiker + + * doc/rrdcached.pod, src/rrd_daemon.c: document the "QUIT" command + -- kevin + +2008-11-08 18:01 oetiker + + * src/rrd_daemon.c: rrdcached: journal_replay default failure + reason, just in case avoids a "may be used uninitialized" warning + -- kevin + +2008-11-08 18:00 oetiker + + * src/rrd_daemon.c: added "quit" command -- kevin + +2008-11-08 17:57 oetiker + + * src/rrd_daemon.c: rrdcached now frees all of its resources + correctly. This facilitates memory debugging. g_tree now knows how + to free the nodes when it removes them. Also, use g_tree_replace + instead of g_tree_insert. This fixes a bug triggered when the same + file was simultaneously inserted by two clients. --kevin + +2008-11-08 17:56 oetiker + + * configure.ac: do not quit when libdbi is missing + +2008-11-07 22:46 oetiker + + * branches/1.2/program/src/rrd_graph.c, + branches/1.3/program/src/rrd_graph.c, src/rrd_graph.c: fixed + --font TITLE:12: problem -- tobi + +2008-11-07 22:23 oetiker + + * src/rrd_fetch_libdbi.c: fix scaling issue -- Martin + +2008-11-07 14:09 oetiker + + * src/rrd_fetch_libdbi.c: extra file to make libdbi patch work + +2008-11-07 14:07 oetiker + + * CONTRIBUTORS, configure.ac, src/Makefile.am, src/rrd_fetch.c, + src/rrd_tool.h: As some of you may know that I have created a + patch for rrdtool 1.2 a few years ago, so that a database could be + queried for values for graphing. The patch has been mostly + rewritten and the following changes have been made: * high + dependency on mysql has been reduced by avoiding the temporary + tables (which was bad for mysql replication) * The number of + executed SQL-Statements for one CDEF has been reduced to 1 + compared to 11 SQLs (including CREATE TEMPORARY TABLE) - for patch + against version 1.2 * All consolidation is done in rrdtool itself + (MIN,MAX,AVERAGE) * Additional consolidation functions are COUNT + and SIGMA, which give information on statistics on a per + "time-bin" basis. * All these consolidation values are always + returned as separate columns, that are returned by RRD and the + consolidation function given as Argument is ignored. Main reason + is that this way there is only one call to rrd_fetcht and thus the + database even if we need to fetch for example min, avg and max. + Compare this to 3 calls in case of different consolidation + functions - and if you want to get SIGMA and COUNT as well it is + still only one call to the backend and the database. * Some + previous existing features have been taken out at the moment to + allow for this reduced set of SQL queries. o prediction using the + values from the last X days at the same time o the corresponding + sigma calculation * The idea is to create generic CDEF's that will + do the same thing, but that is also available when using RRD-files + (similar to TREND, but with another scope) This will get posted as + a separate patch. * Overall performance should be much better and + the patch as a whole simpler. * The patch also includes + modifications to the configuration infrastructure, to make libdbi + support optional. -- Martin Sperl + +2008-11-07 14:02 oetiker + + * CONTRIBUTORS, doc/rrdgraph_rpn.pod, src/rrd_rpncalc.c, + src/rrd_rpncalc.h: new CDEF functions for predictions PREDICT and + PREDICTSIGMA -- Martin Sperl + +2008-11-07 13:51 oetiker + + * src/rrd_daemon.c: Much simpler handling of timestamp errors. + Return an error to the user when any of the time stamp values are + invalid. This is similar to RRDTool's normal behavior. Removed the + complex logic previously used to return error codes to the user. + This solves a bug where non-advancing timestamps could have + produced incorrect error output during "BATCH" mode. The bug was + cause by using the sock->wbuf pointer for the error output. -- + kevin brintnall + +2008-11-07 13:45 oetiker + + * src/rrd_daemon.c: rrdcached: pull in rrd_config.h so we can use + its defines ... particularly HAVE_VSNPRINTF -- kevin brintnall + +2008-11-04 07:12 oetiker + + * bindings/Makefile.am, bindings/lua/Makefile.am, doc/Makefile.am: I + realize now that the problem is the line test -f lua/Makefile && + cd lua && $(MAKE) install || true in the target + "install-data-local", in bindings/Makefile.am. It forces execution + of bindings/lua/Makefile independently of lua being found or not. + I added that line in my first patch, following perl, python and + ruby build style, but it's not needed after I switched to + automake. The make recursion is controlled by SUBDIRS, which will + only contain "lua" if BUILD_LUA is true. -- Fidelis Assis + +2008-11-02 17:25 oetiker + + * bindings/lua/Makefile.am: fix build process for systems without + lua + +2008-11-02 17:09 oetiker + + * src/rrd_daemon.c: PTHREAD_COND_INITIALIZER may only be used to + initialize static cond variables. -- Sebastian Harl + +2008-11-02 15:25 oetiker + + * configure.ac: reverting non build makefile patch ... we need to + lua makefile for building the ditribution + +2008-11-01 09:09 oetiker + + * configure.ac: do not create the lua makefile if lua is not to be + compiled. + +2008-10-30 14:32 oetiker + + * doc/cdeftutorial.pod: fix from alex + +2008-10-28 08:57 oetiker + + * NEWS, doc/rrddump.pod, doc/rrdtool-dump.xsd, src/rrd_dump.c, + src/rrd_tool.c: - remove the spaccing between the elements - add + xsd support to dump output - change the argument + "[--no-header|-n]" to [--header|-h {xsd,dtd}] -- tobias.lindenmann + 1und1.de + +2008-10-28 08:47 oetiker + + * trunk/website/rrdtool-dump.xsd: xsd for rrdtool + +2008-10-26 15:18 oetiker + + * configure.ac, src/Makefile.am, src/librrd.sym.in, + src/librrd.sym.in.in: make compilation on older OSX versios work + by removing the # from the librrd.sym file + +2008-10-24 07:59 oetiker + + * trunk/talks/opentuesday/rrd-intro.odp: added talk + +2008-10-24 06:20 oetiker + + * branches/1.2/program/doc/rrdpython.pod, + branches/1.3/program/doc/rrdpython.pod, doc/rrdpython.pod: fixed + typo ... GAUGE not GUAGE + +2008-10-22 20:41 oetiker + + * src/rrd_daemon.c: The previous code relied on the assumption that + pthread_cond_init(&cond) was equivalent to memset(&cond,0). This + may not be true on all platforms. -- kevin + +2008-10-22 06:02 oetiker + + * src/rrd_daemon.c: remove_cache_item() did not check whether a file + was in queue before modifying the cache head/tail pointers. + Therefore, the process of flushing old files may perturb the + cache_queue_head pointer. This caused some nodes with + CI_FLAGS_IN_QUEUE to be un-linked from the queue list. Thereafter, + they would not be flushed by any periodic process (although they + could be revived with FLUSH or UPDATE). This caused a slow memory + leak for files that are no longer updated. Pending updates for + these "abandoned" files would remain in memory ad infinitum. With + this patch, remove_from_queue() will check that the item is queued + before modifying the head/tail pointers. This restores the + intended behavior. --kevin + +2008-10-22 05:08 oetiker + + * bindings/lua/Makefile.lua.in: this was replaced by Makefile.am + +2008-10-21 06:10 oetiker + + * bindings/lua/Makefile.am: guess one needs that in svn too for + luabindings to work + +2008-10-21 05:42 oetiker + + * src/rrd_daemon.c: * Open all listen sockets in daemonize(), while + we still have stderr. Changed open_listen_socket_* routines to + complain to stderr. Now, any errors in binding to the listen + sockets are much more obvious. * Simplified exit of parent after + fork() * PID file will be correctly cleaned up if there is a + failure in daemonize(). * unlink the unix socket before trying to + bind() (after we're sure we have the PID file) -- kevin + +2008-10-20 11:46 oetiker + + * src/rrd.h, src/rrd_create.c, src/rrd_open.c, src/rrd_update.c: + rrd_notify_row patch: - Delegate choice of starting row for newly + created RRD files to the rrd_open.c API. - Introduce the + rrd_notify_row() function so that an implementation can choose to + align the rows of new RRDs with existing RRDs, if desirable. - + Maintain the existing behaviour (random starting row) by default. + -- Daniel.Pocock + +2008-10-20 06:06 oetiker + + * bindings/Makefile.am, bindings/lua/README, + bindings/lua/compat-5.1r5, bindings/lua/compat-5.1r5/compat-5.1.c, + bindings/lua/compat-5.1r5/compat-5.1.h, + bindings/lua/compat-5.1r5/compat-5.1.lua, bindings/lua/rrdlua.c, + bindings/lua/test.lua, bindings/lua/test.lua.bottom, configure.ac: + - Lua module build and install process rewritten using + automake+libtool - improved check for compat-5.1 availability -- + Fidelis Assis + +2008-10-18 22:32 oetiker + + * src/rrd_open.c: rrd_open should not create files with restrictive + masks Removed unnecessary "mode" varaible. The mode is only used + when O_CREAT is specified, where we want to use 0666 (as + rrd_create_fn did r<=1612). --kevin + +2008-10-18 15:50 oetiker + + * src/rrd.h, src/rrd_open.c: - encapsulate fd and mmap related + variables within a private data structure - rrd_file_t keeps a + pointer to the private data structure of type void*, so that other + block storage implementations can store their internal data with + rrd_file_t -- Daniel.Pocock + +2008-10-17 05:50 oetiker + + * src/rrd_client.c: rrdc_flush_if_daemon should not clobber error + message -- kevin (as suggested by Sebastian) + +2008-10-17 05:44 oetiker + + * branches/1.3/program/src/rrd_graph.c, src/rrd_graph.c: use double + for legend positioning to fight wiggle + +2008-10-16 21:33 oetiker + + * doc/rrdbuild.pod: fix version numbers in compile instructions tobi + +2008-10-16 21:30 oetiker + + * src/rrd_client.c: In almost all cases where rrdc_flush can fail, + it will leave a more descriptive error message anyway.. better not + overwrite it. -- kevin + +2008-10-16 21:12 oetiker + + * src/rrd.h, src/rrd_create.c, src/rrd_dump.c, src/rrd_fetch.c, + src/rrd_first.c, src/rrd_info.c, src/rrd_last.c, + src/rrd_lastupdate.c, src/rrd_open.c, src/rrd_resize.c, + src/rrd_tune.c, src/rrd_update.c: - 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 + +2008-10-16 21:05 oetiker + + * src/rrd_open.c, src/rrd_update.c: move rrd_lock into rrd_open + where the general rrd_file ops are located. -- Daniel Pocock + +2008-10-16 06:11 oetiker + + * src/rrd_daemon.c: error reporting caused crash in journal replay + +2008-10-16 06:11 oetiker + + * doc/rrdbuild.pod: better build docs + +2008-10-15 05:29 oetiker + + * src/rrd.h, src/rrd_create.c, src/rrd_open.c, src/rrd_resize.c, + src/rrd_tool.h, src/rrd_update.c: reverted r1601 and r1606 since + r1601 introduced a non portable mremap and r1606 has a dependency + on r1601. + +2008-10-14 20:14 oetiker + + * src/rrd.h, src/rrd_create.c, src/rrd_open.c, src/rrd_update.c: + 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 + +2008-10-14 19:23 oetiker + + * src/rrd_daemon.c: 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 + +2008-10-14 19:08 oetiker + + * src/rrd_client.c: * 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. + +2008-10-14 19:08 oetiker + + * doc/rrdcached.pod, src/rrd_daemon.c: 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 + +2008-10-14 19:08 oetiker + + * CONTRIBUTORS, src/rrd_daemon.c: rrdcached treats relative and + absolute paths the same -- kevin + +2008-10-14 11:33 oetiker + + * src/rrd_create.c, src/rrd_open.c, src/rrd_resize.c, + src/rrd_tool.h: 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 + +2008-10-14 06:37 oetiker + + * src/rrd_daemon.c: clearer way of advancing the flush time -- kevin + +2008-10-13 22:07 oetiker + + * src/rrd_daemon.c: 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 + +2008-10-13 18:41 oetiker + + * src/rrd_daemon.c: fixed bad folding marker (on + handle_request_flush) -- kevin + +2008-10-11 09:53 oetiker + + * src/rrd_daemon.c: this ensures that the response is + protocol-compliant even if additional info has been added to the + write buffer during processing. -- kevin brintnall + +2008-10-11 09:37 oetiker + + * doc/rrdcached.pod, src/rrd_daemon.c: 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 + +2008-10-10 05:21 oetiker + + * etc/rrdcached-init: 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 + +2008-10-10 05:21 oetiker + + * rrdtool.spec: 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 + +2008-10-10 05:19 oetiker + + * etc/rrdcached-default, etc/rrdcached-init: 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 + +2008-10-08 20:47 oetiker + + * rrdtool.spec: Split-out rrd-cached subpackage -- Bernard Li + +2008-10-08 05:49 oetiker + + * rrdtool.spec: 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 + +2008-10-08 05:47 oetiker + + * src/rrd_daemon.c: fix crash reported by Bernard Li - + connection_thread_main: avoid double calls to close_connection -- + kevin + +2008-10-08 05:46 oetiker + + * doc/rrdcached.pod: fixed typo + +2008-10-07 21:10 oetiker + + * doc/rrdcached.pod, src/rrd_daemon.c: 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 + +2008-10-07 21:08 oetiker + + * src/rrd_daemon.c: 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 + +2008-10-07 16:28 oetiker + + * src/rrd_daemon.c: 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 + +2008-10-07 15:37 oetiker + + * src/rrd_open.c: 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 + +2008-10-06 19:14 oetiker + + * bindings/lua/Makefile.lua: Makefile.lua is now generated + +2008-10-06 19:13 oetiker + + * bindings/lua/Makefile.lua.in: added missing file from lua 5.0 + integration patch + +2008-10-06 19:05 oetiker + + * doc/rrdcached.pod, src/rrd_daemon.c: 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 + +2008-10-06 19:04 oetiker + + * src/rrd_daemon.c: 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 + +2008-10-06 05:05 oetiker + + * CONTRIBUTORS, bindings/Makefile.am, bindings/lua/Makefile.lua, + bindings/lua/README, bindings/lua/rrdlua.c, configure.ac, + doc/rrdlua.pod: Support to Lua 5.0 -- Fidelis Assis + +2008-10-04 22:35 oetiker + + * trunk/tutorial/lisa2008/rrd-by-example/body.tex, + trunk/tutorial/lisa2008/rrd-by-example/ex/v-interfaces.pl, + trunk/tutorial/lisa2008/rrd-by-example/ex/v-interfaces.txt: added + v-interface example + +2008-10-04 16:05 oetiker + + * configure.ac, src/Makefile.am, src/librrd.pc.in: initial librrd + file added ... this will need more love since it does not pick up + any -rpath settings + +2008-10-04 14:09 oetiker + + * trunk/tutorial/lisa2008/rrd-by-example/body.tex, + trunk/tutorial/lisa2008/rrd-by-example/ex/graph-examples.pl: added + graditents + +2008-10-04 13:34 oetiker + + * branches/1.3/program/src/rrd_resize.c, src/rrd_resize.c, + trunk/tutorial/lisa2008/rrd-by-example/ex/hw-demo.pl: * 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 + +2008-10-03 22:53 oetiker + + * branches/1.3/program/src/rrd_open.c, src/rrd_open.c: 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 + +2008-10-03 12:24 oetiker + + * trunk/tutorial/lisa2008/rrd-by-example/body.tex, + trunk/tutorial/lisa2008/rrd-intro.odp: updates for lisa + +2008-10-03 06:13 zaucker + + * trunk/talks/opentuesday/intro.txt: Ergaenzt. + +2008-10-02 19:17 oetiker + + * src/rrd_daemon.c: folding fix + +2008-10-02 19:08 oetiker + + * bindings/ruby/extconf.rb: missing spaces in extconf.rb caused + compile failure -- kevin + +2008-10-02 17:17 oetiker + + * etc/rrdcached-default: permission fix for rrdcached socket -- + Daniel.Pocock + +2008-10-02 11:03 oetiker + + * trunk/talks/opentuesday/intro.txt: initial + +2008-10-02 11:03 oetiker + + * trunk/talks/opentuesday: initial + +2008-10-02 06:21 oetiker + + * trunk/tutorial/lisa2008/rrd-by-example/body.tex, + trunk/tutorial/lisa2008/rrd-by-example/ex/graph-examples.pl, + trunk/tutorial/lisa2008/rrd-by-example/traffic/index.cgi: minor + layout adjustments + +2008-10-01 20:58 oetiker + + * trunk/tutorial/lisa2008/rrd-by-example/body.tex, + trunk/tutorial/lisa2008/rrd-intro.odp: read for lisa2008 + +2008-10-01 20:25 oetiker + + * trunk/tutorial/lisa2008/rrd-by-example/ex/catch-fetch.sh, + trunk/tutorial/lisa2008/rrd-by-example/ex/create-first.sh, + trunk/tutorial/lisa2008/rrd-by-example/ex/update-real.sh: export + is not required + +2008-10-01 20:22 oetiker + + * src/Makefile.am: 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. + +2008-10-01 20:04 oetiker + + * doc/rrdcached.pod: Clearer explanation on which paths are + permitted when -B is supplied -- kevin + +2008-10-01 20:01 oetiker + + * bindings/lua/Makefile.lua, bindings/ruby/extconf.rb, + bindings/ruby/main.c, bindings/tcl/Makefile.am, + bindings/tcl/tclrrd.c, configure.ac, src/Makefile.am, + src/rrd_client.c, src/rrd_dump.c, src/rrd_gfx.c, src/rrd_open.c, + src/rrd_xport.c: 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 + +2008-10-01 19:48 oetiker + + * Makefile.am, etc, etc/rrdcached-default, etc/rrdcached-init, + rrdtool.spec: 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 + +2008-10-01 19:44 oetiker + + * doc/rrdcached.pod, src/rrd_daemon.c: 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 + +2008-10-01 17:16 oetiker + + * trunk/tutorial/lisa2008/rrd-by-example/body.tex, + trunk/tutorial/lisa2008/rrd-by-example/ex/hw-demo.data, + trunk/tutorial/lisa2008/rrd-by-example/traffic, + trunk/tutorial/lisa2008/rrd-by-example/traffic/codewalk.png, + trunk/tutorial/lisa2008/rrd-by-example/traffic/graph.inc, + trunk/tutorial/lisa2008/rrd-by-example/traffic/ifbyteget.sh, + trunk/tutorial/lisa2008/rrd-by-example/traffic/index.cgi: added + example code and working presentation + +2008-10-01 17:15 oetiker + + * trunk/tutorial/lisa2008/rrd-by-example/ex/biggraph.pl, + trunk/tutorial/lisa2008/rrd-by-example/ex/graph-examples.pl, + trunk/tutorial/lisa2008/rrd-by-example/ex/hw-demo.pl, + trunk/tutorial/lisa2008/rrd-by-example/ex/hw-example.pl: more + examples + +2008-10-01 16:53 oetiker + + * src/rrd_graph.c: lcd is actually gcd! + +2008-09-30 18:44 oetiker + + * doc/rrdcached.pod, src/rrd_daemon.c: 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 + +2008-09-30 18:43 oetiker + + * src/rrd_daemon.c: check permissions before writing to journal -- + kevin + +2008-09-30 18:42 oetiker + + * src/rrd_daemon.c: The daemon should behave the same way w/r/t + files whether we "-g" or not. -- kevin + +2008-09-29 20:00 oetiker + + * src/rrd_daemon.c: 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 + +2008-09-29 19:58 oetiker + + * doc/rrdcached.pod, src/rrd_daemon.c: 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 + +2008-09-29 19:56 oetiker + + * src/rrd_client.c, src/rrd_update.c: 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 + +2008-09-29 14:38 oetiker + + * trunk/tutorial/lisa2008/rrd-by-example/ex/catch-fetch.sh: initial + +2008-09-29 06:45 oetiker + + * trunk/tutorial/lisa2008/rrd-by-example, + trunk/tutorial/lisa2008/rrd-by-example/beamercolorthemetobi.sty, + trunk/tutorial/lisa2008/rrd-by-example/body.tex, + trunk/tutorial/lisa2008/rrd-by-example/ex, + trunk/tutorial/lisa2008/rrd-by-example/ex/create-first.sh, + trunk/tutorial/lisa2008/rrd-by-example/ex/create-first.xml, + trunk/tutorial/lisa2008/rrd-by-example/ex/graph-examples.pl, + trunk/tutorial/lisa2008/rrd-by-example/ex/rrd-size.pl, + trunk/tutorial/lisa2008/rrd-by-example/ex/rrd-size.txt, + trunk/tutorial/lisa2008/rrd-by-example/ex/update-real.sh, + trunk/tutorial/lisa2008/rrd-by-example/ex/update-real.txt, + trunk/tutorial/lisa2008/rrd-by-example/handouts.tex, + trunk/tutorial/lisa2008/rrd-by-example/presentation.tex: added + examples + +2008-09-28 21:37 oetiker + + * doc/rrdcached.pod: spelling fix -- kevin + +2008-09-28 21:36 oetiker + + * doc/rrdcached.pod, src/rrd_daemon.c: 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 + +2008-09-28 19:27 oetiker + + * src/rrd_daemon.c: a few missing {{{ folding }}} markers added -- + kevin brintnall + +2008-09-28 19:26 oetiker + + * doc/rrdcached.pod, src/rrd_daemon.c: This patch introduces "fast + shutdown" mode and two new signals. -- kevin brintnall + +2008-09-28 19:25 oetiker + + * doc/rrdcached.pod, src/rrd_daemon.c: Moved signal handler setup + out of daemonize(). Coalesced common code in preparation for new + signals. Documented behavior of existing signals. -- kevin + brintnall + +2008-09-28 19:23 oetiker + + * MakeMakefile: 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 + +2008-09-28 19:12 oetiker + + * doc/rrdcached.pod, src/rrd_daemon.c: added support for FLUSHALL + command -- kevin brintnall + +2008-09-28 19:10 oetiker + + * src/rrd_daemon.c: move cache broadcast into enqueue_cache_item -- + kevin brintnall + +2008-09-28 19:10 oetiker + + * src/rrd_daemon.c: When -z is specified, some updates may + be timestamped up to 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 + +2008-09-28 19:09 oetiker + + * src/rrd_daemon.c: 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 + +2008-09-28 19:08 oetiker + + * src/librrd.sym.in, src/rrd.h: rrd.h, librrd.sym: Define and export + rrd_info_r() -- Sebastian Harl + +2008-09-28 15:01 oetiker + + * branches/1.2/program/src/rrd_graph.c, + branches/1.3/program/src/rrd_graph.c, + branches/1.3/program/src/rrd_tool.c, src/rrd_graph.c, + src/rrd_tool.c: 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 + +2008-09-27 11:44 oetiker + + * branches/1.2/program/src/rrd_xport.c, + branches/1.3/program/src/rrd_xport.c, src/rrd_xport.c: rrdxport + was completely broken for exporting datasources that did not have + a uniform step size. Thanks to Peter Valdemar Mørch for finding + this. + +2008-09-26 05:11 oetiker + + * src/rrd_daemon.c: create the pid file before forking, so we can + complain to stderr -- kevin brintnall + +2008-09-26 05:10 oetiker + + * doc/rrdcached.pod, doc/rrdflush.pod, src/rrd_daemon.c: 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 + +2008-09-25 21:07 oetiker + + * src/rrd_client.c: Use the same IPv6/IPv4 as for the client as + Florian did for the server -- kevin brintnall + +2008-09-25 20:31 oetiker + + * src/rrd_daemon.c: 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 + +2008-09-25 20:11 oetiker + + * src/rrd_daemon.c: set SO_REUSEADDR on the listen socket -- kevin + brintnall + +2008-09-25 20:10 oetiker + + * doc/rrdcached.pod, src/rrd_daemon.c: 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 + +2008-09-25 15:25 oetiker + + * doc/rrdcached.pod, doc/rrddump.pod, doc/rrdfetch.pod, + doc/rrdflush.pod, doc/rrdgraph.pod, doc/rrdinfo.pod, + doc/rrdlast.pod, doc/rrdlastupdate.pod, doc/rrdupdate.pod, + doc/rrdxport.pod, src/rrd_client.c: This adds support for +
: 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 + +2008-09-24 22:21 oetiker + + * doc/rrdcached.pod, src/rrd_daemon.c: Allow ports to be specified + with -l addr:port also. -- kevin brintnall + +2008-09-24 22:07 oetiker + + * bindings/Makefile.am: the rrdlua.pod is in the doc directory + +2008-09-24 06:04 oetiker + + * doc/rrdcached.pod: added section on error reporting -- Florian + Forster + +2008-09-22 06:35 oetiker + + * MakeMakefile, bindings/Makefile.am, bindings/lua, + bindings/lua/Makefile.lua, bindings/lua/README, + bindings/lua/rrdlua.c, bindings/lua/test.lua, configure.ac, + doc/Makefile.am, doc/rrdlua.pod: 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) + +2008-09-22 05:38 oetiker + + * branches/1.2/program/configure.ac, + branches/1.3/program/configure.ac, configure.ac: use default + prefix for ruby install if no user defined prefix is available + +2008-09-19 20:34 oetiker + + * branches/1.3/program/bindings/perl-shared/Makefile.PL, + bindings/perl-shared/Makefile.PL: Bsd lirary path switch added to + perl bindings makefile -- as suggested by Kevin Brintnall + +2008-09-18 13:30 oetiker + + * branches/1.3/program/src/rrd_open.c, src/rrd_open.c: 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. + +2008-09-14 15:30 oetiker + + * src/rrd_daemon.c: fix RRDCacheD documentation -- Florian Forster + +2008-09-14 15:28 oetiker + + * src/rrd_client.c: 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 + +2008-09-14 10:35 oetiker + + * CONTRIBUTORS, doc/rrdcached.pod, doc/rrdflush.pod, + src/librrd.sym.in, src/rrd_client.c, src/rrd_client.h, + src/rrd_daemon.c, src/rrd_dump.c, src/rrd_fetch.c, + src/rrd_flush.c, src/rrd_graph.c, src/rrd_graph.h, src/rrd_info.c, + src/rrd_last.c, src/rrd_lastupdate.c, src/rrd_tool.h, + src/rrd_update.c, src/rrd_xport.c: did not pick up all the changes + for rrdcached in the first round ... so here is the second batch. + +2008-09-14 09:49 oetiker + + * CONTRIBUTORS, configure.ac, doc/Makefile.am, doc/rrdcached.pod, + doc/rrddump.pod, doc/rrdfetch.pod, doc/rrdgraph.pod, + doc/rrdinfo.pod, doc/rrdlast.pod, doc/rrdlastupdate.pod, + doc/rrdtool.pod, doc/rrdupdate.pod, doc/rrdxport.pod, + src/Makefile.am, src/librrd.sym.in, src/rrd.h, src/rrd_client.c, + src/rrd_client.h, src/rrd_daemon.c, src/rrd_dump.c, + src/rrd_fetch.c, src/rrd_graph.c, src/rrd_graph.h, src/rrd_info.c, + src/rrd_last.c, src/rrd_lastupdate.c, src/rrd_tool.c, + src/rrd_tool.h, src/rrd_update.c, src/rrd_xport.c: 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. + +2008-09-13 11:42 oetiker + + * configure.ac, src/Makefile.am, src/rrd_config_bottom.h: 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. + +2008-09-13 10:56 oetiker + + * doc/rrdgraph.pod: fix graph docs + +2008-09-11 20:27 oetiker + + * src/rrd_graph.c: fixed processing of custom fonts René GARCIA + + +2008-09-11 07:01 oetiker + + * src/rrd_format.h: no , on the last member in C + +2008-09-08 22:12 oetiker + + * trunk/website/award-white.png, + trunk/website/bin/pod2wml.classic.sh, trunk/website/forum.wml, + trunk/website/inc/favicon.ico, trunk/website/inc/happy-tobi.png, + trunk/website/inc/rrdtool-gold.png, + trunk/website/oscon-120x60.gif, trunk/website/stream-pop.png: + missing bits atted + +2008-09-08 22:09 oetiker + + * trunk/website/.wmkrc, trunk/website/.wmlrc: and they too + +2008-09-07 10:22 oetiker + + * trunk/website/index.wml, trunk/website/navbar.inc, + trunk/website/support.wml: sync befor branching + +2008-09-07 07:19 oetiker + + * src/rrd_update.c: 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 + +2008-09-06 15:50 oetiker + + * trunk/website/index.wml: added note on 1.3.2 + +2008-09-06 15:48 oetiker + + * trunk/website/bin/pod2wml.sh, trunk/website/inc/template.inc, + trunk/website/index.wml, trunk/website/prog/build.sh, + trunk/website/rrdworld/gbrrdgraphix.xml, + trunk/website/rrdworld/index.wml: improve html generation + +2008-09-06 14:24 oetiker + + * bindings/perl-piped/RRDp.pm, bindings/perl-shared/RRDs.pm, + doc/rrdbuild.pod, rrdtool.spec, src/pngsize.c, src/rrd.h, + src/rrd_cgi.c, src/rrd_create.c, src/rrd_datalang.c, + src/rrd_diff.c, src/rrd_dump.c, src/rrd_error.c, src/rrd_fetch.c, + src/rrd_first.c, src/rrd_format.c, src/rrd_format.h, + src/rrd_gfx.c, src/rrd_graph.c, src/rrd_graph_helper.c, + src/rrd_hw.c, src/rrd_hw.h, src/rrd_i18n.h, src/rrd_info.c, + src/rrd_is_thread_safe.h, src/rrd_last.c, src/rrd_lastupdate.c, + src/rrd_not_thread_safe.c, src/rrd_open.c, src/rrd_resize.c, + src/rrd_restore.c, src/rrd_rpncalc.c, src/rrd_rpncalc.h, + src/rrd_thread_safe.c, src/rrd_thread_safe_nt.c, src/rrd_tool.c, + src/rrd_tool.h, src/rrd_tune.c, src/rrd_update.c, + src/rrd_version.c, src/rrd_xport.c, src/rrd_xport.h, + src/rrdupdate.c: prepare for the release of rrdtool-1.3.2 + +2008-09-06 11:46 oetiker + + * src/rrd_tool.h: we need rrd_format.h here for things to compile + properly + +2008-09-06 11:43 oetiker + + * doc/rrdbuild.pod: updated opensolaris build instructions + +2008-09-06 10:43 oetiker + + * bindings/perl-piped/RRDp.pm, configure.ac, src/Makefile.am, + src/librrd.sym, src/librrd.sym.in, src/rrd_tool.h: 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 + +2008-09-06 10:39 oetiker + + * src/rrd_update.c: fix for multi update - data corruption bug as + reported (and patched) in #178 by kevin brintnall + +2008-09-06 10:32 oetiker + + * doc/cdeftutorial.pod, doc/rrdgraph.pod, doc/rrdgraph_graph.pod, + doc/rrdtool.pod: make pod checker happy + +2008-09-06 08:58 oetiker + + * src/rrd_open.c: inline functions are not supported in c99 ... lets + remove this. the compiler will foture it out if they are + important. + +2008-09-04 21:45 oetiker + + * src/rrd_graph.c: introduced a persistant fontmap ... this makes + our pango rendering 6 times faster starting from the second graph + we draw. + +2008-08-31 23:42 oetiker + + * src/rrd_gfx.c, src/rrd_graph.c, src/rrd_graph.h: now the results + actually look as they did with the old code only things are FASTER + +2008-08-31 22:53 oetiker + + * src/rrd_gfx.c, src/rrd_graph.c, src/rrd_graph.h, + src/rrd_graph_helper.c: 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 ... + +2008-08-31 10:55 oetiker + + * src/rrd_gfx.c: 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. + +2008-08-31 10:52 oetiker + + * bindings/perl-shared/RRDs.xs, bindings/ruby/main.c: use the + standart info free function + +2008-08-28 05:49 oetiker + + * src/rrd_tool.c: fix handling of error conditions in rrd_tool.c ... + errno is not for detection, only for information AFTER detection. + +2008-08-28 04:13 oetiker + + * src/rrd_tool.c: free the linebuffer if you don't return it! + +2008-08-27 22:06 oetiker + + * src/rrd_gfx.c: some more leak plugging + +2008-08-27 21:48 oetiker + + * src/rrd_graph.c: drop the dummy surface prior to creating the real + one + +2008-08-27 21:46 oetiker + + * src/rrd_tool.c: added some freeing for error conditions + +2008-08-27 21:25 oetiker + + * src/rrd.h, src/rrd_gfx.c, src/rrd_graph.c, src/rrd_open.c, + src/rrd_update.c: fixed indentation ... gnu indent results are not + realy beautifl. I might switch to uncrustify. + +2008-08-27 21:25 oetiker + + * src/rrd_create.c: Many rrd_create memory leaks patched ... based + on valgrind analysis by Sven Engelhardt. Thanks! + +2008-08-27 21:18 oetiker + + * src/rrd_restore.c: fix indentation + +2008-08-27 06:52 oetiker + + * configure.ac: added sparc-sun-solaris2.8 to list of broken + isfinite implementations + +2008-08-22 22:04 oetiker + + * bindings/ruby/main.c: it is rb_rrd_infocall not rrd_infocall ... + +2008-08-16 07:13 oetiker + + * doc/rrdgraph.pod, src/rrd_graph.c: When in lazy mode, and the + graph does not get regenerated, then there are no results from + PRINT either. Fix for #163. + +2008-08-16 07:11 oetiker + + * bindings/perl-shared/RRDs.pm: documentation updates + +2008-08-12 06:48 oetiker + + * src/rrd_graph.c: 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. + +2008-08-09 15:22 oetiker + + * trunk/website/gallery/index.en.html, + trunk/website/gallery/index.wml, + trunk/website/gallery/systembelastung.png, + trunk/website/gallery/systembelastung.xml: added systembelastung + +2008-08-04 20:35 oetiker + + * src/rrd_gfx.c: 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 + +2008-07-29 14:42 oetiker + + * bindings/perl-shared/RRDs.xs: newer perlapi docu suggests to use + SV * instead of void for managed returns + +2008-07-29 05:08 oetiker + + * src/rrd_gfx.c, src/rrd_hw_update.c: fixed some c++ style lines -- + David Masterson + +2008-07-28 07:23 oetiker + + * doc/rrdgraph_data.pod: spelling fix + +2008-07-23 15:03 oetiker + + * src/rrd_restore.c: forward ported patch for rra cur_row + randomization in rrd_restore from 1.2.28 to 1.3.1 + +2008-07-23 13:02 oetiker + + * bindings/perl-piped/RRDp.pm, bindings/perl-shared/RRDs.pm, + configure.ac, doc/rrdbuild.pod, rrdtool.spec, src/pngsize.c, + src/rrd.h, src/rrd_cgi.c, src/rrd_create.c, src/rrd_datalang.c, + src/rrd_diff.c, src/rrd_dump.c, src/rrd_error.c, src/rrd_fetch.c, + src/rrd_first.c, src/rrd_format.c, src/rrd_format.h, + src/rrd_gfx.c, src/rrd_graph.c, src/rrd_graph_helper.c, + src/rrd_hw.c, src/rrd_hw.h, src/rrd_i18n.h, src/rrd_info.c, + src/rrd_is_thread_safe.h, src/rrd_last.c, src/rrd_lastupdate.c, + src/rrd_not_thread_safe.c, src/rrd_open.c, src/rrd_resize.c, + src/rrd_restore.c, src/rrd_rpncalc.c, src/rrd_rpncalc.h, + src/rrd_thread_safe.c, src/rrd_thread_safe_nt.c, src/rrd_tool.c, + src/rrd_tool.h, src/rrd_tune.c, src/rrd_update.c, + src/rrd_version.c, src/rrd_xport.c, src/rrd_xport.h, + src/rrdupdate.c: prepare for the release of rrdtool-1.3.1 + +2008-07-23 12:45 oetiker + + * src/rrd_restore.c: 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 + +2008-07-22 15:15 oetiker + + * branches/1.2/program/src/rrd_create.c, src/rrd_create.c: 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 + +2008-07-01 06:35 oetiker + + * doc/rrdbuild.pod: header-fix + +2008-07-01 06:34 oetiker + + * doc/rrdbuild.pod: improve layout + +2008-06-29 16:23 oetiker + + * src/rrd_update.c: added rrd filename to illegal update message -- + he at uninett.no + +2008-06-29 14:08 oetiker + + * rrdtool.spec: rrdtool.spec fix by Anton Blanchard to build without + php patch + +2008-06-29 13:57 oetiker + + * doc/rrdgraph.pod, src/rrd_graph.c: make sure image-with and + image-height get returned even when rrdtool is called with --lazy + as reported in bug #163 + +2008-06-27 06:08 zaucker + + * trunk/tutorial/lisa2008/abstract-rrdexample.txt, + trunk/tutorial/lisa2008/abstract-rrdtut.txt: Etwas ueberarbeitet + +2008-06-24 15:05 oetiker + + * trunk/tutorial/lisa2008, + trunk/tutorial/lisa2008/abstract-rrdexample.txt, + trunk/tutorial/lisa2008/abstract-rrdtut.txt: intial + +2008-06-19 13:18 oetiker + + * branches/1.2/program/bindings/python/rrdtoolmodule.c, + bindings/python/rrdtoolmodule.c: rrdtool.fetch is returning an + extra, bogus, data point. Attached is a patch to correct this. - + Gilad Raphaelli. Fix for #161 + +2008-06-12 13:54 oetiker + + * doc/rrdgraph_graph.pod: added note on %S + +2008-06-11 15:49 oetiker + + * NEWS: made news the same as the announcement + +2008-06-10 23:12 oetiker + + * bindings/perl-piped/RRDp.pm, bindings/perl-shared/RRDs.pm, + doc/rrdbuild.pod, doc/rrdcreate.pod, doc/rrdgraph.pod, + doc/rrdgraph_graph.pod, rrdtool.spec, src/pngsize.c, src/rrd.h, + src/rrd_cgi.c, src/rrd_create.c, src/rrd_datalang.c, + src/rrd_diff.c, src/rrd_dump.c, src/rrd_error.c, src/rrd_fetch.c, + src/rrd_first.c, src/rrd_format.c, src/rrd_format.h, + src/rrd_gfx.c, src/rrd_graph.c, src/rrd_graph_helper.c, + src/rrd_hw.c, src/rrd_hw.h, src/rrd_i18n.h, src/rrd_info.c, + src/rrd_is_thread_safe.h, src/rrd_last.c, src/rrd_lastupdate.c, + src/rrd_not_thread_safe.c, src/rrd_open.c, src/rrd_resize.c, + src/rrd_restore.c, src/rrd_rpncalc.c, src/rrd_rpncalc.h, + src/rrd_thread_safe.c, src/rrd_thread_safe_nt.c, src/rrd_tool.c, + src/rrd_tool.h, src/rrd_tune.c, src/rrd_update.c, + src/rrd_version.c, src/rrd_xport.c, src/rrd_xport.h, + src/rrdupdate.c: prepare for the release of rrdtool-1.3.0 + +2008-06-10 23:11 oetiker + + * trunk/website/bin/htmlfix.sh, trunk/website/gallery/index.en.html, + trunk/website/index.wml: updated website online + +2008-06-10 16:41 oetiker + + * branches/1.2/website/index.wml, trunk/website, trunk/website/bin, + trunk/website/download.wml, trunk/website/gallery, + trunk/website/inc, trunk/website/index.wml, + trunk/website/license.wml, trunk/website/logos, + trunk/website/newbanner250x60.gif, trunk/website/rrdtool.dtd, + trunk/website/rrdworld, trunk/website/sponsor.wml, + trunk/website/tut: added website to trunk + +2008-06-10 16:38 oetiker + + * trunk/website: using the 1.2 website as a basis for the new 1.3 + website + +2008-06-10 16:38 oetiker + + * configure.ac: oops it is 1.3.0 not 1.4.0 yet + +2008-06-10 16:37 oetiker + + * 00README, CONTRIBUTORS, PROJECTS, TODO, configure.ac, + rrdtool-1.3-release: preparing for 1.3 + +2008-06-10 16:32 oetiker + + * src/Makefile.am, src/rrd.h, src/rrd_format.h, src/rrd_hw_math.c, + src/rrd_hw_update.c, src/rrd_tool.h: document the 'internal' + functions in rrd.h but mark them as deprecated, so that anyone + using them will see that they should not be doing it. + +2008-06-10 11:16 oetiker + + * src/rrd_create.c: flip check for row_count with setting for better + code logic + +2008-06-10 09:35 oetiker + + * doc/rrdcreate.pod, src/rrd_create.c: check row count in RRAs to be + > 0 ... by Sebastian Harl + +2008-06-10 07:18 oetiker + + * src/rrd_create.c, src/rrd_open.c: for windows we must open files + in O_BINARY mode + +2008-06-09 16:10 oetiker + + * src/rrd.h, src/rrd_tool.h: do NOT export lowlevel functions, since + I have no intention supporting these interfaces across versions. + The symbols are in the library, so if someone WANTS to code to + them, they are free todo so, but they will have to use our + internal header files. + +2008-06-09 15:49 oetiker + + * src/librrd.sym, src/rrd.h, src/rrd_tool.h: add all lowlevel file + access functions from the rrd_open interface to the export list. + +2008-06-09 05:12 oetiker + + * bindings/python/rrdtoolmodule.c, src/pngsize.c, src/rrd.h, + src/rrd_error.c, src/rrd_graph.h, src/rrd_info.c, src/rrd_open.c, + src/rrd_parsetime.c, src/rrd_tool.c, src/rrd_update.c: fixed + indenting + +2008-06-09 05:11 oetiker + + * rrdtool.spec: update to rpm spec from Jarod Wilson + +2008-06-08 21:15 oetiker + + * src/librrd.sym: export some more symbols from librrd + +2008-06-08 21:06 oetiker + + * win32/config.h: windows should use a windows font + +2008-06-08 21:05 oetiker + + * src/rrd_graph.c: drop special case windows font code ... it makes + no sense with the new setup + +2008-06-08 17:08 oetiker + + * bindings/perl-piped/RRDp.pm, bindings/perl-shared/RRDs.pm, + configure.ac, doc/rrdbuild.pod, rrdtool.spec, src/pngsize.c, + src/rrd.h, src/rrd_cgi.c, src/rrd_create.c, src/rrd_datalang.c, + src/rrd_diff.c, src/rrd_dump.c, src/rrd_error.c, src/rrd_fetch.c, + src/rrd_first.c, src/rrd_format.c, src/rrd_format.h, + src/rrd_gfx.c, src/rrd_graph.c, src/rrd_graph_helper.c, + src/rrd_hw.c, src/rrd_hw.h, src/rrd_i18n.h, src/rrd_info.c, + src/rrd_is_thread_safe.h, src/rrd_last.c, src/rrd_lastupdate.c, + src/rrd_not_thread_safe.c, src/rrd_open.c, src/rrd_resize.c, + src/rrd_restore.c, src/rrd_rpncalc.c, src/rrd_rpncalc.h, + src/rrd_thread_safe.c, src/rrd_thread_safe_nt.c, src/rrd_tool.c, + src/rrd_tool.h, src/rrd_tune.c, src/rrd_update.c, + src/rrd_version.c, src/rrd_xport.c, src/rrd_xport.h, + src/rrdupdate.c: prepare for the release of rrdtool-1.3rc9 + +2008-06-08 17:08 oetiker + + * src/rrd_gfx.c, src/rrd_graph.c: fixed pango markup switch ... we + still want the text to show even if no markup is enabled + +2008-06-08 16:47 oetiker + + * bindings/python/rrdtoolmodule.c, bindings/ruby/main.c, + src/librrd.sym: rrd_freemem has to be exported as well ... + +2008-06-08 16:23 oetiker + + * branches/1.2/program/src/pngsize.c, src/pngsize.c: fix for ticket + #121 jmpbuf on aix is a problem it seems, maybe this makes it + better. + +2008-06-08 15:59 oetiker + + * src/Makefile.am: prepare for the release of rrdtool-1.3rc8 + +2008-06-08 15:55 oetiker + + * bindings/perl-piped/RRDp.pm, bindings/perl-shared/RRDs.pm, + configure.ac, doc/rrdbuild.pod, rrdtool.spec, src/pngsize.c, + src/rrd.h, src/rrd_cgi.c, src/rrd_create.c, src/rrd_datalang.c, + src/rrd_diff.c, src/rrd_dump.c, src/rrd_error.c, src/rrd_fetch.c, + src/rrd_first.c, src/rrd_format.c, src/rrd_format.h, + src/rrd_gfx.c, src/rrd_graph.c, src/rrd_graph_helper.c, + src/rrd_hw.c, src/rrd_hw.h, src/rrd_i18n.h, src/rrd_info.c, + src/rrd_is_thread_safe.h, src/rrd_last.c, src/rrd_lastupdate.c, + src/rrd_not_thread_safe.c, src/rrd_open.c, src/rrd_resize.c, + src/rrd_restore.c, src/rrd_rpncalc.c, src/rrd_rpncalc.h, + src/rrd_thread_safe.c, src/rrd_thread_safe_nt.c, src/rrd_tool.c, + src/rrd_tool.h, src/rrd_tune.c, src/rrd_update.c, + src/rrd_version.c, src/rrd_xport.c, src/rrd_xport.h, + src/rrdupdate.c: prepare for the release of rrdtool-1.3rc8 + +2008-06-08 15:55 oetiker + + * bindings/perl-shared/RRDs.xs, bindings/python/rrdtoolmodule.c, + bindings/ruby/main.c, bindings/tcl/tclrrd.c, doc/rrdthreads.pod, + netware/Makefile, src/Makefile.am, src/librrd.sym, + src/parsetime.c, src/parsetime.h, src/rrd.h, src/rrd_cgi.c, + src/rrd_create.c, src/rrd_error.c, src/rrd_fetch.c, + src/rrd_graph.c, src/rrd_graph.h, src/rrd_graph_helper.c, + src/rrd_info.c, src/rrd_nan_inf.c, src/rrd_not_thread_safe.c, + src/rrd_open.c, src/rrd_parsetime.c, src/rrd_parsetime.h, + src/rrd_resize.c, src/rrd_thread_safe.c, src/rrd_thread_safe_nt.c, + src/rrd_tool.c, src/rrd_tool.h, src/rrd_update.c, src/rrd_xport.c, + win32/rrd.dsp, win32/rrd.vcproj: From: Sebastian Harl sh + tokkee.org Date: Sun, 8 Jun 2008 15:01:05 +0200 Subject: [PATCH] + Cleanup the symbols exported by librrd. Up to know librrd exported + a lot of symbols, most of which are to be regarded as private + symbols. This somewhat pollutes the API as the symbols could, in + theory, be used by external software and, more importantly, makes + symbol based dependencies (as recently introduced in e.g. Debian) + somewhat harder to implement. This patch does a somewhat + large-scale cleanup of the exported symbols: * Introduced a + librrd.sym file which contains all symbols that are to be + exported. This file is then passed to libtool using the + -export-symbols option which tells the linker to export the given + symbols only (note: according to the libtool manual, this has no + effect on some architectures - however, I assume that most + architectures in use today do support it). librrd.sym contains all + symbols originally defined in rrd.h sans LockRRD() (which has been + moved to rrd_tool.h). The following functions have been added to + rrd.h and the list of exported symbols (some of them have been + renamed, see below): - rrd_info() - rrd_info_free() - + rrd_info_print() - rrd_info_push() - rrd_lastupdate() - + rrd_update_v() - rrd_strerror() * Prefixed all public functions + and types with "rrd_" to avoid name clashes with other libraries. + Also, while I was at it, I introduced typedefs for all custom + types and prefixed the time names with "_t" to improve + consistency: - enum info_type -> rrd_info_type_t - enum timetype + -> rrd_timetype_t - union infoval -> rrd_infoval_t - struct info_t + -> rrd_info_t - struct rrd_context -> rrd_context_t - struct + rrd_time_value -> rrd_time_value_t - info_free() -> + rrd_info_free() - info_free() -> rrd_info_free() - info_print() -> + rrd_info_print() - info_push() -> rrd_info_push() - LockRRD() -> + rrd_lock() (not public though) - parsetime() -> rrd_parsetime() + (and: src/parsetime.c -> src/rrd_parsetime.c) - proc_start_end() + -> rrd_proc_start_end() - set_to_DINF() -> rrd_set_to_DINF() - + set_to_DNAN() -> rrd_set_to_DNAN() * Moved readfile() from + rrd_open.c to rrd_cgi.c and declared it static. This function is + used in rrd_cgi.c only. * rrd_lock() (f.k.a. LockRRD()) now + accepts a rrd_file_t pointer instead of an integer to increase + encapsulation. + +2008-06-07 14:35 oetiker + + * src/rrd_open.c: don't bother with don't need when there is neither + madvise not fadvise calls + +2008-06-06 16:38 oetiker + + * branches/1.2/program/src/rrd_graph.c, src/rrd_graph.c: fix for + --font bug (font names wer not being picked up at all). Bug + reported by Dmitry B. Bigunayk + +2008-06-05 20:56 oetiker + + * NEWS: added pango markup name + +2008-06-05 19:59 oetiker + + * src/rrd.h, src/rrd_error.c, src/rrd_format.h, src/rrd_gfx.c, + src/rrd_info.c, src/rrd_open.c, src/rrd_update.c: fixed indenting + +2008-06-05 19:59 oetiker + + * src/rrd_graph.c: disable pango markup by default. added + --pango-markup option for explicit enablement. + +2008-06-05 19:58 oetiker + + * doc/rrdgraph.pod, src/rrd_graph.h: disable pango markup by + default. added --pango-markup option for explicit enablement. + +2008-06-05 19:57 oetiker + + * bindings/python/rrdtoolmodule.c: fixed indenting + +2008-06-04 16:18 oetiker + + * bindings/tcl/Makefile.am, configure.ac: enable new building for + newer tcl versions + +2008-06-02 06:46 oetiker + + * configure.ac: updated documentation of library versioning system + +2008-06-02 06:43 oetiker + + * configure.ac: Had to reset the interface version number due to the + change in the rrd_context implementation. + +2008-06-02 06:21 oetiker + + * src/rrd_restore.c: use DNAN instead of NAN since there seem to be + issues with gcc on solaris and the NAN experession (and we use + DNAN everywhere else anyway). + +2008-06-01 21:12 oetiker + + * doc/rrdbuild.pod: integrated gentoo bits and spell fixes by Peter + Volkov + +2008-06-01 20:44 oetiker + + * src/rrd.h, src/rrd_error.c, src/rrd_not_thread_safe.c, + src/rrd_thread_safe.c, src/rrd_thread_safe_nt.c: Patch for + rrd_context system by sebastian harl, making it simpler and less + error prone. Removing one buffer overflow in the process. + +2008-05-31 15:58 oetiker + + * doc/rrdbuild.pod: prepare for the release of rrdtool-1.3rc7 + +2008-05-31 15:57 oetiker + + * bindings/perl-piped/RRDp.pm, bindings/perl-shared/RRDs.pm, + configure.ac, doc/rrdbuild.pod, rrdtool.spec, src/pngsize.c, + src/rrd.h, src/rrd_cgi.c, src/rrd_create.c, src/rrd_datalang.c, + src/rrd_diff.c, src/rrd_dump.c, src/rrd_error.c, src/rrd_fetch.c, + src/rrd_first.c, src/rrd_format.c, src/rrd_format.h, + src/rrd_gfx.c, src/rrd_graph.c, src/rrd_graph_helper.c, + src/rrd_hw.c, src/rrd_hw.h, src/rrd_i18n.h, src/rrd_info.c, + src/rrd_is_thread_safe.h, src/rrd_last.c, src/rrd_lastupdate.c, + src/rrd_not_thread_safe.c, src/rrd_open.c, src/rrd_resize.c, + src/rrd_restore.c, src/rrd_rpncalc.c, src/rrd_rpncalc.h, + src/rrd_thread_safe.c, src/rrd_thread_safe_nt.c, src/rrd_tool.c, + src/rrd_tool.h, src/rrd_tune.c, src/rrd_update.c, + src/rrd_version.c, src/rrd_xport.c, src/rrd_xport.h, + src/rrdupdate.c: prepare for the release of rrdtool-1.3rc7 + +2008-05-31 15:56 oetiker + + * doc/rrdbuild.pod: added pkgconfig build instructions + +2008-05-31 12:28 oetiker + + * branches/1.2/program/src/rrd_graph.c, src/rrd_graph.c: make sure + vdef calcs only calc as far as originally requested. + +2008-05-27 22:24 oetiker + + * src/rrd_info.c: fixed maxlength for sprintf_alloc 50 was not + enough ... 1024+strlen(fmt) is much better. This makes imginfo + work even when there are long image paths. + +2008-05-26 16:39 oetiker + + * trunk/talks/nordic-nagios-08/talk.odp: initial talk slides + +2008-05-26 11:45 oetiker + + * TODO: updated todo list + +2008-05-26 08:56 oetiker + + * bindings/perl-piped/RRDp.pm, bindings/perl-shared/RRDs.pm, + configure.ac, doc/rrdbuild.pod, rrdtool.spec, src/pngsize.c, + src/rrd.h, src/rrd_cgi.c, src/rrd_create.c, src/rrd_datalang.c, + src/rrd_diff.c, src/rrd_dump.c, src/rrd_error.c, src/rrd_fetch.c, + src/rrd_first.c, src/rrd_format.c, src/rrd_format.h, + src/rrd_gfx.c, src/rrd_graph.c, src/rrd_graph_helper.c, + src/rrd_hw.c, src/rrd_hw.h, src/rrd_i18n.h, src/rrd_info.c, + src/rrd_is_thread_safe.h, src/rrd_last.c, src/rrd_lastupdate.c, + src/rrd_not_thread_safe.c, src/rrd_open.c, src/rrd_resize.c, + src/rrd_restore.c, src/rrd_rpncalc.c, src/rrd_rpncalc.h, + src/rrd_thread_safe.c, src/rrd_thread_safe_nt.c, src/rrd_tool.c, + src/rrd_tool.h, src/rrd_tune.c, src/rrd_update.c, + src/rrd_version.c, src/rrd_xport.c, src/rrd_xport.h, + src/rrdupdate.c: prepare for the release of rrdtool-1.3rc6 + +2008-05-26 07:46 oetiker + + * NEWS: added notes about new grid lines + +2008-05-26 07:45 oetiker + + * src/rrd_graph.c: * make y-axis labels NOT run into each other + (classic and alt) * space horizontal grid lines and lables a bit + further apart for tight layouts. * let horizontal lines and y axis + labels run a little closer for classic grid + +2008-05-25 21:17 oetiker + + * src/rrd_graph.c: fixed calculation of space at the bottom of the + graph + +2008-05-25 20:02 oetiker + + * bindings/perl-piped/RRDp.pm, bindings/perl-shared/RRDs.pm, + configure.ac, doc/rrdbuild.pod, rrdtool.spec, src/pngsize.c, + src/rrd.h, src/rrd_cgi.c, src/rrd_create.c, src/rrd_datalang.c, + src/rrd_diff.c, src/rrd_dump.c, src/rrd_error.c, src/rrd_fetch.c, + src/rrd_first.c, src/rrd_format.c, src/rrd_format.h, + src/rrd_gfx.c, src/rrd_graph.c, src/rrd_graph_helper.c, + src/rrd_hw.c, src/rrd_hw.h, src/rrd_i18n.h, src/rrd_info.c, + src/rrd_is_thread_safe.h, src/rrd_last.c, src/rrd_lastupdate.c, + src/rrd_not_thread_safe.c, src/rrd_open.c, src/rrd_resize.c, + src/rrd_restore.c, src/rrd_rpncalc.c, src/rrd_rpncalc.h, + src/rrd_thread_safe.c, src/rrd_thread_safe_nt.c, src/rrd_tool.c, + src/rrd_tool.h, src/rrd_tune.c, src/rrd_update.c, + src/rrd_version.c, src/rrd_xport.c, src/rrd_xport.h, + src/rrdupdate.c: prepare for the release of rrdtool-1.3rc5 + +2008-05-25 20:00 oetiker + + * src/rrd_format.h, src/rrd_open.c, src/rrd_update.c: fix update + compatibility with rrd-1.0.x files + +2008-05-20 22:22 oetiker + + * bindings/Makefile.am: droped rrd_extra.h from the distro with the + python update ... must remove it from the Makefile too + +2008-05-19 21:14 oetiker + + * NEWS, bindings/python/README, bindings/python/rrd_extra.h, + bindings/python/rrdtoolmodule.c, doc/rrdpython.pod: fixed python + bindings: * info call isnnow aequivalent to rrdtool info (the same + as in the perl and ruby bindings) * graphv and updatev calls added + +2008-05-18 22:11 oetiker + + * src/rrd_gfx.c, src/rrd_graph.c, src/rrd_tool.c: * document + tabwidth option * fix \t -> tab expansion + +2008-05-18 15:39 oetiker + + * src/rrd_graph.c: ytr boundery checking ... this is from the GD + days ... we don't need this anymore + +2008-05-18 15:11 oetiker + + * src/rrd_dump.c, src/rrd_tool.c: fix indenting + +2008-05-18 15:11 oetiker + + * src/rrd_graph.c: pdf, svg and ps formats were not being created + +2008-05-18 13:06 oetiker + + * bindings/perl-piped/RRDp.pm, bindings/perl-shared/RRDs.pm, + configure.ac, doc/rrdbuild.pod, rrdtool-1.3-release, rrdtool.spec, + src/pngsize.c, src/rrd.h, src/rrd_cgi.c, src/rrd_create.c, + src/rrd_datalang.c, src/rrd_diff.c, src/rrd_dump.c, + src/rrd_error.c, src/rrd_fetch.c, src/rrd_first.c, + src/rrd_format.c, src/rrd_format.h, src/rrd_gfx.c, + src/rrd_graph.c, src/rrd_graph_helper.c, src/rrd_hw.c, + src/rrd_hw.h, src/rrd_i18n.h, src/rrd_info.c, + src/rrd_is_thread_safe.h, src/rrd_last.c, src/rrd_lastupdate.c, + src/rrd_not_thread_safe.c, src/rrd_open.c, src/rrd_resize.c, + src/rrd_restore.c, src/rrd_rpncalc.c, src/rrd_rpncalc.h, + src/rrd_thread_safe.c, src/rrd_thread_safe_nt.c, src/rrd_tool.c, + src/rrd_tool.h, src/rrd_tune.c, src/rrd_update.c, + src/rrd_version.c, src/rrd_xport.c, src/rrd_xport.h, + src/rrdupdate.c: prepare for the release of rrdtool-1.3rc4 + +2008-05-18 13:04 oetiker + + * src/rrd_tool.c, src/rrdupdate.c: fix year + +2008-05-18 12:53 oetiker + + * src/rrd_graph.c: PRINT returns from rrd_graph did not work due to + an off by one error + +2008-05-18 08:42 oetiker + + * doc/rrdbuild.pod: updated build instructions to latest libraries + +2008-05-18 06:37 oetiker + + * NEWS, configure.ac, src/rrd_i18n.h, src/rrd_tool.c: improved + handling of libintl issues + +2008-05-16 12:29 oetiker + + * bindings/perl-piped/RRDp.pm, bindings/perl-shared/RRDs.pm, + configure.ac, doc/rrdbuild.pod, rrdtool.spec, src/pngsize.c, + src/rrd.h, src/rrd_cgi.c, src/rrd_create.c, src/rrd_datalang.c, + src/rrd_diff.c, src/rrd_dump.c, src/rrd_error.c, src/rrd_fetch.c, + src/rrd_first.c, src/rrd_format.c, src/rrd_format.h, + src/rrd_gfx.c, src/rrd_graph.c, src/rrd_graph_helper.c, + src/rrd_hw.c, src/rrd_hw.h, src/rrd_i18n.h, src/rrd_info.c, + src/rrd_is_thread_safe.h, src/rrd_last.c, src/rrd_lastupdate.c, + src/rrd_not_thread_safe.c, src/rrd_open.c, src/rrd_resize.c, + src/rrd_restore.c, src/rrd_rpncalc.c, src/rrd_rpncalc.h, + src/rrd_thread_safe.c, src/rrd_thread_safe_nt.c, src/rrd_tool.c, + src/rrd_tool.h, src/rrd_tune.c, src/rrd_update.c, + src/rrd_version.c, src/rrd_xport.c, src/rrd_xport.h, + src/rrdupdate.c: prepare for the release of rrdtool-1.3rc3 + +2008-05-16 12:28 oetiker + + * doc/rrddump.pod, src/rrd_dump.c: added --no-header to + documentation and fixed implementation + +2008-05-16 12:20 oetiker + + * src/rrd_dump.c: fixed dump_opt implementation + +2008-05-16 12:18 oetiker + + * NEWS, src/rrd_dump.c: added no-header option to rrd_dump + +2008-05-16 12:07 oetiker + + * src/rrd_graph.c: fix handling of values <= zero for logarithmic + display + +2008-05-15 22:39 oetiker + + * rrdtool-1.3-release: prepare for the release of rrdtool-1.3rc2 + +2008-05-15 22:39 oetiker + + * bindings/perl-piped/RRDp.pm, bindings/perl-shared/RRDs.pm, + configure.ac, doc/rrdbuild.pod, rrdtool.spec, src/pngsize.c, + src/rrd.h, src/rrd_cgi.c, src/rrd_create.c, src/rrd_datalang.c, + src/rrd_diff.c, src/rrd_dump.c, src/rrd_error.c, src/rrd_fetch.c, + src/rrd_first.c, src/rrd_format.c, src/rrd_format.h, + src/rrd_gfx.c, src/rrd_graph.c, src/rrd_graph_helper.c, + src/rrd_hw.c, src/rrd_hw.h, src/rrd_i18n.h, src/rrd_info.c, + src/rrd_is_thread_safe.h, src/rrd_last.c, src/rrd_lastupdate.c, + src/rrd_not_thread_safe.c, src/rrd_open.c, src/rrd_resize.c, + src/rrd_restore.c, src/rrd_rpncalc.c, src/rrd_rpncalc.h, + src/rrd_thread_safe.c, src/rrd_thread_safe_nt.c, src/rrd_tool.c, + src/rrd_tool.h, src/rrd_tune.c, src/rrd_update.c, + src/rrd_version.c, src/rrd_xport.c, src/rrd_xport.h, + src/rrdupdate.c: prepare for the release of rrdtool-1.3rc2 + +2008-05-15 22:37 oetiker + + * Makefile.am, configure.ac, rrdtool-1.3-release, src/Makefile.am: + fix portability to mac osx and freebsd -- tobi + +2008-05-12 23:10 oetiker + + * configure.ac: add solaris pod2man location last + +2008-05-12 23:03 oetiker + + * configure.ac, doc/Makefile.am, doc/rrdbuild.pod: some changes to + make things work on opensolaris 2008.05 + +2008-05-12 22:42 oetiker + + * bindings/tcl/Makefile.am: for some reason tclrrd.c does not get + picked up using $< at least on opensolaris + +2008-05-12 22:23 oetiker + + * src/Makefile.am, src/rrd_graph.h, src/rrd_info.c, + src/rrd_rpncalc.c, src/rrd_rpncalc.h, src/rrd_tool.c: allow + rrd_rpncalc to build without cairo dependencies ... fix warnings + +2008-05-12 21:14 oetiker + + * Makefile.am: add intltool*in files to dist + +2008-05-12 16:15 oetiker + + * bindings/python/rrdtoolmodule.c, src/rrd_update.c: fixed indenting + +2008-05-12 16:15 oetiker + + * src/rrd_graph.c, src/rrd_hw.c, src/rrd_open.c, src/rrd_rpncalc.c, + src/win32comp.c: removed c++ comments // + +2008-05-12 16:09 oetiker + + * NEWS: added notes about rewrites in this release + +2008-05-12 16:08 oetiker + + * configure.ac, src/Makefile.am: improved handling of library + versioning + +2008-05-12 15:35 oetiker + + * src/rrd_update.c: should not leave debug enabled + +2008-05-12 15:33 oetiker + + * branches/1.2/program/doc/rrdcreate.pod, + branches/1.2/program/src/rrd_update.c, doc/rrdcreate.pod, + src/rrd_update.c: Fixed handling of unknown data at PDP build + time. There was a long standing (even documented) missfeature in + rrdtool which caused uknown-data to be accepted as long as it was + less than the mrhb. This was never the intended behaviour and had + interesting side effects + (http://oss.oetiker.ch/rrdtool-trac/ticket/125): If you have a 60 + Second step with 59s unknown data and 1 second of known data the + whole become known data as long as the mrhb was > step. The + intended behaviour was that a step should become unknown as soon + as it contains more than 50% of unknown data. The patch fixes both + the documentation and the code. + +2008-05-12 13:22 oetiker + + * src/rrd_create.c: the last_ds value fuer unknown is 'U' and not + 'UNKN' + +2008-05-04 18:59 oetiker + + * src/rrd_getopt.c, src/rrd_getopt1.c: fix for sun sudio 11 + incompatibility + http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=38555 + +2008-05-01 23:23 oetiker + + * bindings/ruby/main.c, src/rrd.h, src/rrd_info.c, src/rrd_tool.c: + indenting fixes + +2008-05-01 23:23 oetiker + + * src/rrd_graph.c: make sure properties are shown via graph_v even + in --graph-only mode + +2008-05-01 06:56 oetiker + + * MakeMakefile: Make the MakeMakefile script a bit more robust + +2008-04-22 21:40 oetiker + + * bindings/python/rrd_extra.h, bindings/python/rrdtoolmodule.c: fix + for #148 + +2008-04-20 22:46 oetiker + + * CONTRIBUTORS, NEWS, bindings/perl-shared/RRDs.pm, + bindings/perl-shared/RRDs.xs, bindings/ruby/main.c, + doc/rrdgraph.pod, src/rrd.h, src/rrd_graph.c, src/rrd_graph.h, + src/rrd_info.c, src/rrd_tool.c, src/rrd_tool.h: Introduced a + alternated interface to rrd_graph using rrd_info style return + values: rrd_graph_v The graph_v interface returnes additional + information about the graph including the location of the graphing + area within the image. When called with '-' as filename it will + even return the image data. The new interface is supported in the + rrdtool command line, RRDs perl and ruby bindings. + +2008-04-17 07:54 oetiker + + * trunk/talks/nordic-nagios-08, + trunk/talks/nordic-nagios-08/abstract-rrdtut.txt: added bullets + +2008-04-17 05:35 oetiker + + * src/rrd_update.c: indent fix + +2008-04-17 05:35 oetiker + + * src/rrd_tune.c: do not reset the last_ds store unless the data + source type is actually changed. + +2008-04-16 15:50 oetiker + + * branches/1.2/program/doc/rrdgraph.pod, doc/rrdgraph.pod: fixed 2. + x-grid example ... since the lable is valid for the whole day, it + must be 86400 wide. --tobi + +2008-04-12 09:29 oetiker + + * MakeMakefile, configure.ac: alter order of header inclusion for + FreeBSD 4.8 compatibility + +2008-04-12 09:21 oetiker + + * branches/1.2/program/src/parsetime.c, src/parsetime.c: do not mess + with dst status after running localtime, the system gets confused + otherwhise when it comes to times during the switch over periode + as DST changes to non DST. -- tobi + +2008-03-25 23:02 oetiker + + * src/rrd_dump.c: added missing " escapes to xml header in + rrd_tool.c + +2008-03-25 22:59 oetiker + + * CONTRIBUTORS: added Florian octo Forster to contrib list + +2008-03-25 22:59 oetiker + + * doc/rrdgraph_examples.pod: added missing =back for propper pod + syntax + +2008-03-25 22:58 oetiker + + * src/rrd_dump.c: fix indent + +2008-03-25 22:58 oetiker + + * src/rrd_restore.c: fix broken header comment section -- Florian + octo Forster + +2008-03-25 22:57 oetiker + + * src/rrd_graph.c: cast size_t to int to avoid warning -- Florian + octo Forster + +2008-03-25 22:56 oetiker + + * src/rrd_open.c: do not declare DEBUG functions unless compiled in + DEBUG mode -- Florian octo Forster + +2008-03-25 22:55 oetiker + + * src/rrd_tool.c: make helptexts read only memory + +2008-03-25 22:55 oetiker + + * src/rrd_update.c: stop complaints about unused variables if not + running DEBUG + +2008-03-25 22:49 oetiker + + * MakeMakefile: Added check for intltool version. Use Makefile for + cleanup. -- Florian octo Forster + +2008-03-23 13:43 oetiker + + * src/rrd_dump.c: added pointer to florian forsters dtd to the rrd + dumpt + +2008-03-19 23:36 oetiker + + * configure.ac: fix pkgconfig file name + +2008-03-15 10:39 oetiker + + * ., .indent.pro, 00README, CONTRIBUTORS, COPYING, COPYRIGHT, + MakeMakefile, Makefile.am, NEWS, PROJECTS, README, THREADS, TODO, + WIN32-BUILD-TIPS.txt, acinclude.m4, bindings, + bindings/Makefile.am, bindings/perl-piped, + bindings/perl-piped/MANIFEST, bindings/perl-piped/Makefile.PL, + bindings/perl-piped/README, bindings/perl-piped/RRDp.pm, + bindings/perl-piped/leaktest.pl, bindings/perl-piped/rrdpl.dsp, + bindings/perl-piped/rrdpl.dsw, bindings/perl-piped/t, + bindings/perl-piped/t/base.t, bindings/perl-shared, + bindings/perl-shared/MANIFEST, bindings/perl-shared/Makefile.PL, + bindings/perl-shared/README, bindings/perl-shared/RRDs.pm, + bindings/perl-shared/RRDs.ppd, bindings/perl-shared/RRDs.xs, + bindings/perl-shared/ntmake.pl, bindings/perl-shared/t, + bindings/perl-shared/t/base.t, bindings/python, + bindings/python/ACKNOWLEDGEMENT, bindings/python/AUTHORS, + bindings/python/COPYING, bindings/python/README, + bindings/python/rrd_extra.h, bindings/python/rrdtoolmodule.c, + bindings/python/setup.py, bindings/ruby, bindings/ruby/CHANGES, + bindings/ruby/README, bindings/ruby/extconf.rb, + bindings/ruby/main.c, bindings/ruby/test.rb, bindings/tcl, + bindings/tcl/Makefile.am, bindings/tcl/README, + bindings/tcl/ifOctets.tcl.in, bindings/tcl/tclrrd.c, configure.ac, + debian, debian/README.Debian, debian/build_freetype.sh, + debian/changelog, debian/control, debian/copyright, + debian/librrd0-dev.files, debian/librrd0.files, + debian/librrd0.postinst, debian/librrd0.postrm, + debian/librrd0.shlibs, debian/librrdp-perl.files, + debian/librrds-perl.files, debian/rrdtool-tcl.files, + debian/rrdtool.files, debian/rules, debian/watch, doc, + doc/Makefile.am, doc/bin_dec_hex.pod, doc/cdeftutorial.pod, + doc/name.inc, doc/rpntutorial.pod, doc/rrd-beginners.pod, + doc/rrdbuild.pod, doc/rrdcgi.pod, doc/rrdcreate.pod, + doc/rrddump.pod, doc/rrdfetch.pod, doc/rrdfirst.pod, + doc/rrdgraph-old.pod, doc/rrdgraph.pod, doc/rrdgraph_data.pod, + doc/rrdgraph_examples.pod, doc/rrdgraph_graph.pod, + doc/rrdgraph_rpn.pod, doc/rrdinfo.pod, doc/rrdlast.pod, + doc/rrdlastupdate.pod, doc/rrdpython.pod, doc/rrdresize.pod, + doc/rrdrestore.pod, doc/rrdruby.pod, doc/rrdthreads.pod, + doc/rrdtool-dump.dtd, doc/rrdtool-xport.dtd, doc/rrdtool.pod, + doc/rrdtune.pod, doc/rrdtutorial.es.pod, doc/rrdtutorial.pod, + doc/rrdupdate.pod, doc/rrdxport.pod, examples, + examples/4charts.pl.in, examples/Makefile.am, + examples/bigtops.pl.in, examples/cgi-demo.cgi.in, + examples/minmax.pl.in, examples/perftest.pl.in, + examples/piped-demo.pl.in, examples/shared-demo.pl.in, + examples/stripes.pl.in, favicon.ico, netware, netware/Makefile, + po, po/ChangeLog, po/LINGUAS, po/POTFILES.in, po/de.po, + rrdtool-1.2-release, rrdtool-1.3-release, rrdtool.spec, src, + src/Makefile.am, src/compile_afm.pl, src/fnv.h, src/get_ver.awk, + src/hash_32.c, src/parsetime.c, src/parsetime.h, src/pngsize.c, + src/rrd.h, src/rrd_cgi.c, src/rrd_create.c, src/rrd_datalang.c, + src/rrd_diff.c, src/rrd_dump.c, src/rrd_error.c, src/rrd_fetch.c, + src/rrd_first.c, src/rrd_format.c, src/rrd_format.h, + src/rrd_getopt.c, src/rrd_getopt.h, src/rrd_getopt1.c, + src/rrd_gfx.c, src/rrd_graph.c, src/rrd_graph.h, + src/rrd_graph_helper.c, src/rrd_hw.c, src/rrd_hw.h, + src/rrd_hw_math.c, src/rrd_hw_math.h, src/rrd_hw_update.c, + src/rrd_hw_update.h, src/rrd_i18n.h, src/rrd_info.c, + src/rrd_is_thread_safe.h, src/rrd_last.c, src/rrd_lastupdate.c, + src/rrd_nan_inf.c, src/rrd_not_thread_safe.c, src/rrd_open.c, + src/rrd_resize.c, src/rrd_restore.c, src/rrd_rpncalc.c, + src/rrd_rpncalc.h, src/rrd_thread_safe.c, + src/rrd_thread_safe_nt.c, src/rrd_tool.c, src/rrd_tool.h, + src/rrd_tune.c, src/rrd_update.c, src/rrd_version.c, + src/rrd_xport.c, src/rrd_xport.h, src/rrdupdate.c, src/strftime.c, + src/strftime.h, src/unused.h, src/win32comp.c, svn2cl.xsl, win32, + win32/Makefile, win32/config.h, win32/rrd.dsp, win32/rrd.vcproj, + win32/rrd_config.h.msvc, win32/rrdtool.dsp, win32/rrdtool.dsw, + win32/rrdtool.vcproj: reindent aded id keyword substitution + +2008-03-15 10:32 oetiker + + * src/rrd_rpncalc.c: reat nan as FALSE in an IF CDEF + +2008-03-07 08:57 oetiker + + * doc/rrdgraph_rpn.pod, src/rrd_rpncalc.c, src/rrd_rpncalc.h: a + nan-safe add operator (ADDNAN) into rrd. I used it to add several + incomplete graphs. NaN + NaN => NaN x + NaN => x NaN + y => y x + + y => x + y -- Timo Stripf tstripf gmx.de + +2008-03-02 15:38 oetiker + + * src/rrd_graph.c: Fix error "cairo_restore without matching + cairo_save" when zero-time point is out of graph + +2008-02-25 07:11 oetiker + + * branches/1.2/program/src/rrd_fetch.c, src/rrd_fetch.c: Ignore + RRA-end when comparing. coverage. + +2008-02-24 14:27 oetiker + + * src/rrd_create.c, src/rrd_graph_helper.c, src/rrd_i18n.h, + src/rrd_info.c, src/rrd_restore.c, src/rrd_tool.c: fix indents + gone out of kileter by patching ... + +2008-02-24 14:26 oetiker + + * src/rrd_dump.c, src/rrd_tool.c: get rid of a few type cast + warnings + +2008-02-24 14:26 oetiker + + * src/rrd_restore.c: fix one segfault while trying to restore an + invalid xml file. -- tobi + +2008-02-21 07:20 oetiker + + * configure.ac: make ruby obey destdir + +2008-02-21 07:18 oetiker + + * po/ChangeLog: initial + +2008-02-21 07:12 oetiker + + * MakeMakefile, configure.ac, po/LINGUAS, po/de.po, src/rrd_tool.c: + make inbternationalized version actually build + +2008-02-21 06:59 oetiker + + * po, po/LINGUAS, po/POTFILES.in, src/rrd_i18n.h: added missing bits + from internationalization + +2008-02-19 12:56 oetiker + + * branches/1.2/program/src/rrd_create.c, + branches/1.2/program/src/rrd_info.c, + branches/1.2/program/src/rrd_restore.c, src/rrd_create.c, + src/rrd_info.c, src/rrd_restore.c: Generate a random cur_row for + each RRA during create/restore operations. This effectively + randomizes the block crossings among RRDs created around the same + time. Previously, RRDs that were created/restored en masse would + cross block boundaries simultaneously, which is sub-optimal. Also, + this patch enables the user to see the RRA's cur_row pointer via + rrdinfo. This was useful during debugging. -- kevin brintnall + kbrint qwest.net + +2008-02-18 15:04 oetiker + + * MakeMakefile, Makefile.am, configure.ac, rrdtool.spec, + src/Makefile.am, src/rrd_getopt.c, src/rrd_tool.c: Added I18N + support for messages printed by rrd_tool.c -- + http://oss.oetiker.ch/rrdtool-trac/ticket/144 + +2008-02-15 08:49 oetiker + + * configure.ac: check for pdf as well + +2008-02-15 08:44 oetiker + + * configure.ac: check for cairo-ps and cairo-svg explicitly + +2008-02-06 00:12 oetiker + + * configure.ac: ready for beta 4 + +2008-02-06 00:10 oetiker + + * src/rrd_graph.c, src/rrd_graph_helper.c: * replaced strtok with + strtok_r for thread safety * fixed im initialization broken after + the introduction of dashes ... + +2008-02-04 22:34 oetiker + + * src/rrd_create.c: in rrd_create we do not use mmaping and thus + need to free rrd struct members in any case ... + +2008-02-04 22:16 oetiker + + * src/rrd_update.c: this should help with the memory leak + +2008-02-04 18:18 oetiker + + * COPYRIGHT: added zpl 2.1 to floss exception + +2008-02-01 06:52 oetiker + + * branches/1.2/program/src/rrd_graph.c, src/rrd_graph.c: fixed + parsing of fontnames with embeded spaces + +2008-01-14 17:11 oetiker + + * configure.ac: remove c++ warnings flag .. this is not c++ after + all + +2008-01-14 16:52 oetiker + + * src/rrd_cgi.c, src/rrd_create.c: fixed indenting + +2008-01-14 16:51 oetiker + + * src/rrd_gfx.c: fix indents + +2008-01-14 16:50 oetiker + + * bindings/tcl/tclrrd.c, configure.ac, src/parsetime.c, + src/rrd_cgi.c, src/rrd_create.c, src/rrd_nan_inf.c: * fixed + madvise/fadvise detection * fixed many compiler warnings -- Peter + Breitenlohner peb mppmu.mpg.de + +2008-01-13 11:07 oetiker + + * trunk/tutorial/htwchur/about-oss.odp, + trunk/tutorial/htwchur/m7am.odp, + trunk/tutorial/htwchur/rrd-exercises.tex: initial + +2008-01-12 18:37 oetiker + + * src/rrd_graph.c: weekday and time are too tight + +2008-01-04 22:53 oetiker + + * src/rrd_gfx.c, src/rrd_graph.c: fontmap resolution was not + matching scaled_font resolution ... this killed layouting ... much + better now + +2008-01-03 21:30 oetiker + + * doc/rrdgraph_examples.pod, doc/rrdgraph_graph.pod, + src/rrd_graph_helper.c: get rid of DASHED, only use dashes syntax. + less redundancy -- thomas.gutzler gmail.com + +2008-01-02 22:11 oetiker + + * CONTRIBUTORS, NEWS, doc/rrdgraph_examples.pod, + doc/rrdgraph_graph.pod, src/rrd_graph.c, src/rrd_graph.h, + src/rrd_graph_helper.c: support for dashed lines in graphs + +2008-01-02 22:06 oetiker + + * src/pngsize.c, src/rrd_graph.c: fix indenting + +2008-01-02 22:06 oetiker + + * doc/Makefile.am: ignore errors with txt doc building + +2007-12-11 23:41 oetiker + + * Makefile.am, doc/rrdbuild.pod: building the docs depends on the + presence of pod2man ... which does not seem to be installed + necessarily + +2007-12-08 22:15 oetiker + + * doc/rrdbuild.pod: added shared library locations into the docs + +2007-12-08 21:35 oetiker + + * src/rrd_cgi.c: include stdlib since putenv is in there on solaris + +2007-12-08 16:57 oetiker + + * configure.ac, doc/rrdbuild.pod, src/rrd_getopt.c: fixing solaris + portability * isinf and isnan definitions fixed * check if rt must + be linked * ordering must be read write in getopt * updated build + instructions + +2007-12-02 17:11 oetiker + + * trunk/tutorial/htwchur/abstract-rrdtut.txt: fixed spelling + +2007-12-02 16:59 oetiker + + * trunk/tutorial/htwchur, + trunk/tutorial/htwchur/abstract-rrdtut.txt, + trunk/tutorial/htwchur/m7am.odp: initial text + +2007-11-26 20:12 oetiker + + * bindings/python/setup.py: fix libdir for python build + +2007-11-21 10:51 oetiker + + * configure.ac: fixed NetBSD spelling + +2007-11-21 06:56 oetiker + + * configure.ac: define bsd source to get access to chroot + +2007-11-21 06:47 oetiker + + * bindings/perl-shared/Makefile.PL, configure.ac: make perlbuild + more portable + +2007-11-21 05:54 oetiker + + * trunk/talks/rrdtooltipsandtricks, + trunk/talks/rrdtooltipsandtricks/abstract.odt, + trunk/talks/rrdtooltipsandtricks/bio.txt, + trunk/talks/rrdtooltipsandtricks/rrdtipsandtricks.odp: initial + checkin + +2007-11-20 22:22 oetiker + + * configure.ac: enable madvise defines in netbsd + +2007-11-20 00:17 oetiker + + * trunk/status/2007-11-19.txt: added 1.2.26 + +2007-11-20 00:08 oetiker + + * src/rrd_format.h, src/rrd_graph.c, src/rrd_nan_inf.c: remove last + traces of rrd_nan_inf.h fix handling of min==max where min < 0 + +2007-11-19 19:05 oetiker + + * trunk/status/2007-11-19.txt: spell checked + +2007-11-19 19:02 oetiker + + * trunk/status/2007-11-19.txt: added report + +2007-11-15 14:39 oetiker + + * bindings/ruby/main.c, src/rrd.h, src/rrd_create.c, src/rrd_dump.c, + src/rrd_format.h, src/rrd_graph.c, src/rrd_hw.c, src/rrd_info.c, + src/rrd_open.c, src/rrd_restore.c, src/rrd_tune.c, + src/rrd_update.c, src/rrd_xport.c: re-indented files that have + gone out of indent-style over the last few weeks + +2007-11-15 14:36 oetiker + + * src/Makefile.am, src/rrd.h, src/rrd_nan_inf.h: integrate + rrd_nan_inf header + +2007-11-15 14:35 oetiker + + * src/rrd_open.c: Improve layout of documentation. -- Bernhard + Fischer + +2007-11-15 14:34 oetiker + + * src/rrd_update.c: * rrd_update(): Unify error path. * + parse_template(): Likewise. * allocate_data_structures(): Make + error strings use consistent punctuation. -- bernhard fischer + +2007-11-15 14:32 oetiker + + * src/pngsize.c: make sure this compiles with aix + +2007-11-13 01:45 oetiker + + * trunk/tutorial/lisa2007/m7am.odp: lisa update + +2007-11-08 10:16 oetiker + + * NEWS, bindings/ruby/main.c, doc/rrdruby.pod: fixed start end time + in ruby fetch and added step size -- Mike Perham mperham gmail + +2007-11-06 21:27 oetiker + + * doc/rrdbuild.pod: updated build instructions + +2007-11-04 21:56 oetiker + + * bindings/perl-piped/RRDp.pm: handle errors properly ... in RRDp + read call + +2007-10-08 14:36 oetiker + + * trunk/tutorial/lisa2007/m7am.odp, + trunk/tutorial/lisa2007/rrdtutorial.odp: fixed name for release + +2007-10-08 14:36 oetiker + + * trunk/tutorial/lisa2007/abstract-rrdtut.txt, + trunk/tutorial/lisa2007/rrdtutorial.odp: getting ready for release + +2007-09-16 15:35 oetiker + + * src/rrd_open.c: no reason to die when posixfadvise is not + sucessful + +2007-09-11 06:28 oetiker + + * doc/rrdcreate.pod, doc/rrdtune.pod, src/rrd_create.c, + src/rrd_dump.c, src/rrd_format.h, src/rrd_hw.c, src/rrd_info.c, + src/rrd_restore.c, src/rrd_tune.c: Allow to the the smoothing + window size other thatn the default 5%. -- Evan Miller emiller + imvu.com + +2007-09-11 06:16 oetiker + + * configure.ac, src/rrd_open.c: added msync before unmap + +2007-09-08 05:23 oetiker + + * CONTRIBUTORS, doc/rrdgraph_rpn.pod, src/rrd_graph.c, + src/rrd_graph.h: added STDEV aggregation function for VDEF. -- + Patrick J Cherry patrick bytemark.co.uk + +2007-09-07 22:53 oetiker + + * Makefile.am, examples/Makefile.am, examples/perftest.pl.in: a few + leanups -- Bernhard Fischer + +2007-09-06 09:06 oetiker + + * src/rrd_open.c: added missing ; + +2007-09-06 08:42 oetiker + + * src/rrd_open.c: * mimic write() and read() even better -- Bernhard + Fischer + +2007-09-06 08:40 oetiker + + * src/rrd_open.c: rrd_open.c (rrd_read): Mimicing read() behaviour + for EOF case and NULL buffer case. -- Bernhard Fischer + +2007-09-02 16:55 oetiker + + * doc/rrdgraph_graph.pod: fixed speling of horizon + +2007-08-29 06:43 oetiker + + * examples/perftest.pl.in: a better performance tester + +2007-08-16 07:31 oetiker + + * doc/rrdgraph_examples.pod: added holt winters example back into + the examples documentation + +2007-08-14 21:59 oetiker + + * src/rrd_update.c: Fix for HoltWinters phase-shift bug described + below. When one or more primary data point times were missed, the + SEASONAL and DEVSEASONAL archives were marked as being up-to-date, + so that they would not be written to. It was correct not to write + to these archives, but the code failed to advance the pointers + within the SEASONAL and DEVSEASONAL archives so that future + updates would go to the correct location in the archives. Rather + than mark these archives as up-to-date (by setting + rra_step_cnt[rra_idx] = 0), my patch allocates a new "skip_update" + array that is set to 1 for SEASONAL and DEVSEASONAL archives that + have missed one or more primary data points. When an RRA is + written to, the cur_row pointer advancement happens for all + archives, but the skip_update array is checked just before + actually writing out the changes. Please give it a whirl! -- Evan + Miller emiller imvu.com + +2007-08-13 20:06 oetiker + + * src/rrd_update.c: Refactored rrd_update code in preparation of + finding the HW update problem -- Evan Miller + +2007-08-07 15:02 oetiker + + * doc/rrdbuild.pod: updated build instructions for 1.3 + +2007-08-03 23:46 oetiker + + * trunk/talks/rrdtool13/rrdtool13.odp: initial talk + +2007-08-03 21:27 oetiker + + * trunk/talks/rrdtool13/rrdtool13.odp: addded details + +2007-08-03 19:46 oetiker + + * svn2cl.xsl: prepare for the release of rrdtool-1.2.99907080300 + +2007-08-03 19:45 oetiker + + * libraries, src/DejaVuSansMono-Roman.ttf, src/VeraMono.ttf: remove + some things we do not need anymore in 1.3 + +2007-08-03 19:43 oetiker + + * bindings/perl-piped/RRDp.pm, bindings/perl-shared/RRDs.pm, + doc/rrdbuild.pod, rrdtool.spec, src/pngsize.c, src/rrd.h, + src/rrd_cgi.c, src/rrd_create.c, src/rrd_datalang.c, + src/rrd_diff.c, src/rrd_dump.c, src/rrd_error.c, src/rrd_fetch.c, + src/rrd_first.c, src/rrd_format.c, src/rrd_format.h, + src/rrd_gfx.c, src/rrd_graph.c, src/rrd_graph_helper.c, + src/rrd_hw.c, src/rrd_hw.h, src/rrd_info.c, + src/rrd_is_thread_safe.h, src/rrd_last.c, src/rrd_lastupdate.c, + src/rrd_not_thread_safe.c, src/rrd_open.c, src/rrd_resize.c, + src/rrd_restore.c, src/rrd_rpncalc.c, src/rrd_rpncalc.h, + src/rrd_thread_safe.c, src/rrd_thread_safe_nt.c, src/rrd_tool.c, + src/rrd_tool.h, src/rrd_tune.c, src/rrd_update.c, + src/rrd_version.c, src/rrd_xport.c, src/rrd_xport.h, + src/rrdupdate.c: prepare for the release of + rrdtool-1.2.99907080300 + +2007-08-03 19:43 oetiker + + * configure.ac, rrdtool-1.3-release: prepare for 1.3 beta 1 + +2007-08-03 19:26 oetiker + + * src/Makefile.am: continue with the revision numbering + +2007-08-03 19:17 oetiker + + * doc/rrdgraph_graph.pod: added notes on pango inline formatting + +2007-08-02 18:21 oetiker + + * trunk/talks/rrdtool13, trunk/talks/rrdtool13/rrdtool13.odp, + trunk/talks/rrdtoolfast/monitoring-en.ppt, + trunk/talks/rrdtoolfast/onlineusv-de.ppt: talk updates + +2007-08-01 15:29 oetiker + + * src/rrd_graph.c: only release cairo stuff if we ever initialized + it. + +2007-08-01 15:28 oetiker + + * src/rrd_xport.c: fix for 64bit portability problem ... unsigned + long is not int + +2007-07-31 04:53 oetiker + + * bindings/ruby/main.c: reindented + +2007-07-30 22:29 oetiker + + * trunk/tutorial/lisa2007/abstract-rrdtut.txt: added toppics + +2007-07-25 20:38 oetiker + + * src/rrd_create.c, src/rrd_dump.c, src/rrd_fetch.c, + src/rrd_format.h, src/rrd_graph.c, src/rrd_graph_helper.c, + src/rrd_open.c, src/rrd_restore.c, src/rrd_rpncalc.c, + src/rrd_tool.h, src/rrd_tune.c: fixed indenting + +2007-07-25 20:38 oetiker + + * src/rrd_update.c: make sure we check input even when the previous + update was a 'U' ... and some indenting fixes + +2007-07-24 20:35 oetiker + + * trunk/contrib/php4/rrdtool_logo.h: added missing header + +2007-07-22 15:51 oetiker + + * src/rrd_format.h: new consolidation functions must be added last + or this will break binary compatibility + +2007-07-22 15:50 oetiker + + * src/rrd_update.c: don't force data out ... let cache management do + this + +2007-07-22 09:47 oetiker + + * NEWS, src/rrd_create.c, src/rrd_dump.c, src/rrd_format.h, + src/rrd_restore.c: Only create version 4 rrd files if the new + holtwinters MHW.. CF is used. + +2007-07-21 19:55 oetiker + + * src/rrd_open.c: * remove some experimental code from rrd_open * + rrd_dontneed will release all data except for header blocks and + RRA hot blocks which are going to be updated withing 10 minutes. + +2007-07-21 19:53 oetiker + + * src/rrd_fetch.c: for now, do not release fetched data ... in the + future we may call rrd_dontneed and let the users decied with an + option if they want to keep the data in cache ... + +2007-07-21 19:52 oetiker + + * src/Makefile.am: the fonts are now taken from the system. we do + not distribute them anympore + +2007-07-21 19:37 oetiker + + * NEWS: not on update rrd version + +2007-07-20 22:20 oetiker + + * src/rrd_format.h: we have a new holtwinders aggregation fucntion, + so we have a new version ... + +2007-07-20 22:19 oetiker + + * configure.ac: check for fadvise all the time + +2007-07-20 22:16 oetiker + + * doc/rrdcreate.pod: better docs on the aggregate functions + +2007-07-18 22:02 oetiker + + * NEWS: added note on locale + +2007-07-18 21:59 oetiker + + * src/rrd_graph_helper.c: some more piechart removed + +2007-07-18 21:47 oetiker + + * src/rrd_create.c, src/rrd_graph.c, src/rrd_rpncalc.c, + src/rrd_tune.c, src/rrd_update.c: make sure all ascii to float + parsing uses LC_NUMERIC = C so that we do not stuble on locales + confusing the , with a . + +2007-07-18 00:30 oetiker + + * src/rrd_create.c, src/rrd_open.c, src/rrd_tool.h, + src/rrd_update.c: * rrd_open: rrd_close does not purge file from + cache * rrd_open: new function rrd_dontneed for purging un-needed + pages from core * rrd_open: in linux at least only fadivse + DONTNEED has the power to purge pages from cache, so letst call + madvise as well as fadvise * rrd_create: uses open/write/close + now, flushes file to disk and keeps only hot pages in core * + rrd_update: keeps only hot pages in core * configure enables + FADVISE even when mmap is in use + +2007-07-17 21:46 oetiker + + * src/rrd_open.c, src/rrd_resize.c: added comment on float cookie + +2007-07-16 06:37 oetiker + + * bindings/ruby/main.c: fix for fetch in ruby bindings and support + for info added. + +2007-07-14 13:26 oetiker + + * trunk/status/2007-07-14.txt: added report + +2007-07-12 20:33 oetiker + + * doc/rrdtutorial.pod: improve wording + +2007-07-12 20:33 oetiker + + * configure.ac: fix tcl build settup + +2007-07-12 20:33 oetiker + + * trunk/tutorial/emanics/rrd-exercises.tex, + trunk/tutorial/emanics/rrdtutorial.odp, + trunk/tutorial/linuxforum2007/rrdtutorial.odp: monor updates + +2007-07-11 23:08 oetiker + + * src/rrd_create.c: usr rrd_free for freeing the rrd structs ... + vito caputo + +2007-07-10 05:31 oetiker + + * trunk/tutorial/emanics/rrd-exercises.tex: fixed linebreak + +2007-07-09 20:18 oetiker + + * trunk/tutorial/emanics/rrd-exercises.tex: remove the 3.5h comment + +2007-07-06 14:05 oetiker + + * trunk/tutorial/emanics, trunk/tutorial/emanics/rrd-exercises.tex, + trunk/tutorial/emanics/rrdtutorial.odp: initial emanics versions + +2007-07-05 15:19 oetiker + + * src/rrd_graph_helper.c: prevent potential segfaults on boxes where + time_t is not long + +2007-06-24 11:42 oetiker + + * trunk/tutorial/lisa2007/abstract-rrdtut.txt: add halfday + +2007-06-24 11:41 oetiker + + * trunk/tutorial/lisa2007/abstract-rrdtut.txt: fritz fix + +2007-06-19 06:26 oetiker + + * trunk/tutorial/lisa2007: updated for lisa + +2007-06-18 18:25 oetiker + + * src/rrd_cgi.c, src/rrd_graph.c, src/rrd_tune.c, src/rrd_xport.c: + fix indentation + +2007-06-18 16:05 oetiker + + * configure.ac, src/parsetime.c, src/rrd_cgi.c, src/rrd_create.c, + src/rrd_fetch.c, src/rrd_first.c, src/rrd_getopt.c, + src/rrd_getopt1.c, src/rrd_graph.c, src/rrd_open.c, + src/rrd_restore.c, src/rrd_thread_safe.c, src/rrd_tune.c, + src/rrd_update.c, src/rrd_xport.c: Bernhard Fischer: - move + several static struct option out of loops and makes them + non-static - moves some functions from old-style definitions into + new-style definitions + +2007-06-16 23:20 oetiker + + * CONTRIBUTORS: Bernhard is not Benrard + +2007-06-16 05:32 oetiker + + * trunk/contrib/php4/config.m4, trunk/contrib/php4/configure, + trunk/contrib/php4/ltconfig, trunk/contrib/php4/php_rrdtool.h, + trunk/contrib/php4/rrdtool.c: lets have just a single rrdtool + extension annd not two ... -- Jarod Wilson + +2007-06-15 21:49 oetiker + + * NEWS: notes on evans contribs + +2007-06-15 21:41 oetiker + + * rrdtool.spec: rrdtool.spec from Jarod "redhat" Wilson + +2007-06-15 08:09 oetiker + + * CONTRIBUTORS: updated contributors + +2007-06-15 08:01 oetiker + + * NEWS: added note on TEXTALIGN + +2007-06-15 07:59 oetiker + + * doc/rrdcreate.pod, doc/rrdtune.pod, src/Makefile.am, + src/rrd_create.c, src/rrd_dump.c, src/rrd_format.c, + src/rrd_format.h, src/rrd_graph.c, src/rrd_hw.c, + src/rrd_hw_math.c, src/rrd_hw_math.h, src/rrd_hw_update.c, + src/rrd_hw_update.h, src/rrd_info.c, src/rrd_restore.c, + src/rrd_tune.c, src/rrd_update.c: There are two popular variants + of the Holt-Winters forecasting method; RRDtool supports the + "additive" method, which means that seasonal variation is simply + added to the baseline. For our application, it would be more + appropriate to use the "multiplicative" Holt-Winters method, where + seasonal variation is a coefficient multiplied by the baseline. + Quick example to illustrate the difference: if the average doubles + season-over-season, the additive method would predict the delta + between min and max to be constant, whereas the multiplicative + method would predict the delta to double as well. Attached is a + patch against trunk to support the multiplicative method. I've + done this with a new consolidation function, MHWPREDICT, which is + essentially interchangeable with HWPREDICT. There is a noticeable + improvement in prediction deviations for certain types of + functions; the attachments show HWPREDICT and MHWPREDICT + predictions for a function with an x*sin(x) component. Because + HWPREDICT and MHWPREDICT differ only in their equations, I've + factored out their math into rrd_hw_math.c. The appropriate + smoothing functions are passed to the update functions in a + container of function pointers, which are called where + appropriate. Thus the additive and multiplicative methods use the + same update functions, and the right equations are evaluated + without having flag checks everywhere. This approach, I think, + makes the algorithms quite clear, with minimal duplicate code. I + have moved update_hwpredict, update_seasonal, update_devpredict, + update_devseasonal, and update_failures into a separate file, + rrd_hw_update.c, with some slight refactoring related to + rrd_hw_math.c. I ran some regression tests against trunk to make + sure I didn't break anything with the existing HWPREDICT code. + MHWPREDICT uses the same deviation smoothing and failure detection + algorithms as HWPREDICT. Some helpful references on the + multiplicative Holt-Winters method: + http://www.it.iitb.ac.in/~praj/acads/seminar/04329008_ExponentialSmoothing.pdf + (a student's quick overview of additive vs. multiplicative HW) + http://ideas.repec.org/p/msh/ebswps/1999-1.html (paper on + variations to the multiplicative Holt-Winters, including variance + calculations; FYI, my implementation uses "Model 1") My employer + and the owner of this patch (IMVU, Inc.) is happy to license it + under the same terms as RRDtool, i.e. give it to the project. -- + Evan Miller emiller imvu.com + +2007-06-15 06:43 oetiker + + * src/rrd.h: oops missed to update the in memory output interface + here + +2007-06-15 06:28 oetiker + + * src/rrd.h, src/rrd_graph.c, src/rrd_graph.h: added interface to + get rendered image via a pointer to allocated memory ... Evan + Miller emmiller gmail.com + +2007-06-15 06:12 oetiker + + * configure.ac: improve fontnaming + +2007-06-14 20:30 oetiker + + * bindings/ruby/main.c, src/rrd_graph.c, src/rrd_graph_helper.c, + src/rrd_rpncalc.c: fixed indentation + +2007-06-14 20:28 oetiker + + * doc/rrdgraph_graph.pod, src/rrd_graph.c, src/rrd_graph.h, + src/rrd_graph_helper.c: added TEXTALIGN command to change the + default text alignment + +2007-06-13 16:53 oetiker + + * bindings/tcl/Makefile.am, bindings/tcl/tclrrd.c: fixed tcl + includes + +2007-06-13 16:51 oetiker + + * bindings/ruby/main.c: be more helpful when raising rb_eTypeError + in string_arr string_arr_new(VALUE rb_strings). This patch + indicates which index is in error as well as the type you are + erroneously passing. -- anonymous + +2007-06-12 20:36 oetiker + + * src/rrd_update.c: Bernhard Fischer: - fix nulling the updvals - + cosmetic change to move the option struct out of the loop. - need + to operate on a copy of optarg + +2007-06-11 19:45 oetiker + + * doc/rrdgraph_rpn.pod, src/rrd_rpncalc.c, src/rrd_rpncalc.h: added + TRENDNAN function -- Timo Stripf + +2007-06-11 19:45 oetiker + + * src/rrd_graph.c: allow output to stdout -- Timo Stripf + +2007-06-11 16:49 oetiker + + * NEWS: added more news + +2007-06-11 16:34 oetiker + + * doc/rrdgraph.pod, src/rrd_graph.c: fixed indentation, added + documentation note on gridfitting. + +2007-06-11 16:33 oetiker + + * src/rrd_graph.c: fix arrow locations + +2007-06-11 16:20 oetiker + + * src/rrd_graph.c: disable gridfitting for vector formats + +2007-06-11 16:14 oetiker + + * src/rrd_graph.c, src/rrd_graph.h: make pdf output work + +2007-06-11 15:32 oetiker + + * NEWS: added detail + +2007-06-11 15:11 oetiker + + * NEWS, configure.ac, doc/rrdgraph.pod, src/Makefile.am, + src/rrd_gfx.c, src/rrd_gfx.h, src/rrd_graph.c, src/rrd_graph.h, + src/rrd_graph_helper.c: --font-render-mode is back, and there is + also --graph-render-mode now. It allows to enable mono graphs that + look strikingly like rrdtool 1.0.x --tobi + +2007-06-11 13:36 oetiker + + * NEWS, src/rrd_update.c: Bernhard Fischer: - NEWS mention the new + file accessors - rrd_update.c: remove unused some cruft + +2007-06-11 10:09 oetiker + + * src/rrd_update.c: Bernhard Fischer: - fix maintaining our file-pos + when we have to wrap the rra_ptr in update(). - no need to update + the header-data a second time for the mmap case. + +2007-06-11 00:23 oetiker + + * NEWS: updated news + +2007-06-11 00:22 oetiker + + * configure.ac, doc/rrdgraph.pod, src/Makefile.am: * added some + documentation * updated version number + +2007-06-10 23:55 oetiker + + * acinclude.m4, configure.ac, src/Makefile.am, src/art_rgba_svp.c, + src/art_rgba_svp.h, src/rrd_afm.c, src/rrd_afm.h, + src/rrd_afm_data.c, src/rrd_afm_data.h, src/rrd_gfx.c, + src/rrd_gfx.h, src/rrd_graph.c, src/rrd_graph.h, + src/rrd_graph_helper.c: switched graphics library from arts to + cairo+pango + +2007-06-04 11:15 oetiker + + * configure.ac, src/Makefile.am: Bernhard Fischer: - new configure + option --enable-static-programs + +2007-06-01 19:11 oetiker + + * src/rrd_open.c, src/rrd_resize.c: Bernhard: - implement resize + SHRINK for FD (mmap is to be done) - indent + +2007-06-01 17:59 oetiker + + * src/rrd_graph.c: --full-size-mode with and without --no-legend + should work now -- Matthew Chambers + +2007-06-01 17:35 oetiker + + * src/rrd_open.c, src/rrd_resize.c: Bernhard - fill the file with + DNAN and add the remaining data in after the fact ... + +2007-06-01 17:34 oetiker + + * src/rrd_open.c, src/rrd_resize.c: Bernhard Fischer - implement + resize, growing part. truncation is to be done. + +2007-06-01 09:10 oetiker + + * src/rrd_cgi.c, src/rrd_graph_helper.c, src/rrd_open.c: Bernhard + Fischer - use 'z' length modifier when printing size_t - add a + cast to __rrd_read and document why it is there - add RANDOM hint + for the header + +2007-05-31 18:47 oetiker + + * src/rrd_open.c: Bernhard: - plug tiny mem-leak in error path of + rrd_close where freeing the rrd_file was forgotten. - improve two + error messages - use CHECK_MADVISE_OVERLAPS per default + +2007-05-30 19:56 oetiker + + * src/rrd_open.c, src/rrd_update.c: fix rrd_write -- Bernhard + Fischer + +2007-05-30 12:41 oetiker + + * src/rrd_fetch.c, src/rrd_first.c, src/rrd_graph.c, + src/rrd_graph.h, src/rrd_info.c, src/rrd_lastupdate.c, + src/rrd_open.c, src/rrd_resize.c: fix indenting ... again + +2007-05-30 12:39 oetiker + + * src/rrd_create.c, src/rrd_dump.c, src/rrd_fetch.c, + src/rrd_first.c, src/rrd_info.c, src/rrd_last.c, + src/rrd_lastupdate.c, src/rrd_open.c, src/rrd_resize.c, + src/rrd_tune.c, src/rrd_update.c: From Bernhard Fischer - + rrd_close(): call close on the file and use rrd_close consistently + - clean up some error paths. The fadvise error path is leaking + memory (see XXX in these spots). + +2007-05-30 09:28 oetiker + + * trunk/contrib/php4/examples/rrd_fetch.php, + trunk/contrib/php4/php_rrdtool.h, trunk/contrib/php4/rrdtool.c: + make this work on recent php4 versions -- Bernhard Fischer + +2007-05-30 05:23 oetiker + + * CONTRIBUTORS, doc/rrdgraph.pod, src/rrd_graph.c, src/rrd_graph.h: + switch for rrd_graph to specify the outer-size of the graph and + not just the size of the canvas: --full-size-mode -- + matthew.chambers vanderbilt.edu + +2007-05-29 21:29 oetiker + + * configure.ac, examples/perftest.pl.in, src/rrd_hw.c, + src/rrd_last.c, src/rrd_lastupdate.c, src/rrd_open.c, + src/rrd_resize.c, src/rrd_tool.c, src/rrd_tune.c, + src/rrd_update.c: More updates from Bernhard Fischer - flag + rrd_resize's old file with RRD_COPY - cleanup error-handling + pathes in rrd_update and fix a few typos in comments - + rrd_close(): implement printing mincore results for the rrd if + DEBUG=2 was defined - rrd_open(): madvise start addresses need to + be page-aligned; implement alternative path to the fine-grained + (i.e. exact) madvise by flagging just the first two pages as + needed (see TWO_PAGES). Implement alternative path that records + the last madvise()ed area to avoid redundant calls to madvise() on + identical areas (due to page-alignment constraints) -- see + CHECK_MADVISE_OVERLAPS. Implement path for USE_DIRECT_IO. - + configure: add check for O_DIRECT flag to open(2). Add option + --enable-direct-io. Add _GNU_SOURCE to CFLAGS to silence warnings + about chroot which is marked LEGACY since SUSv2 and is a non POSIX + extension. Make checks for posix_fadvise() dependant on + --disable-mmap, since we do not need fadvise for the mmap case. + +2007-05-25 15:24 oetiker + + * src/rrd_stat.c: tobis old cruft removal program ... + +2007-05-25 13:14 oetiker + + * src/rrd_dump.c, src/rrd_fetch.c, src/rrd_open.c, src/rrd_resize.c, + src/rrd_update.c: updates from Bernhard Fischer rep dot nop gmail + com - add some more rrd_sterror calls to failure paths. - make + rrdtool updatev work like 1.2.23 (i.e. multiple values are still + broken, but at least updating a single value works; see + http://oss.oetiker.ch/rrdtool-trac/ticket/8) - indent touched + files. + +2007-05-25 13:12 oetiker + + * .indent.pro, Makefile.am, configure.ac, examples/perftest.pl.in, + src/rrd_dump.c, src/rrd_fetch.c, src/rrd_open.c, src/rrd_resize.c, + src/rrd_tool.h, src/rrd_update.c: Updates from Bernhard Fischer + rep dot nop gmail com - fix typo in rrd_fetch where rrd_read + result was checked against an incorrect size. - in rrd_fetch, drop + rrd_head_size in favour of rrd_file->header_len - in rrd_fetch, + make the message "post fetch" unambiguous (now past vs. post). - + change usage of param rdwr of rrd_open: allow for RRD_READONLY, + RRD_READWRITE, RRD_CREAT, RRD_READAHEAD; adjust callers + accordingly: + rrd_resize needs CREAT + rrd_dump may want + READAHEAD - implement FD based I/O in rrd_open, rrd_read, + rrd_write, rrd_seek. - in rrd_update, unify write_RRA_row(). - + sort | uniq the -T in .indent.pro (info_t was duplicated) - add + stub of an option to use O_DIRECT to the configury - in + Makefile.am, simplify the "indent" invocation of find: My find may + not support "-o" resp. "-or" nor braces. Using -name "*.[ch]" + works everywhere, AFAIK. + +2007-05-24 08:26 oetiker + + * configure.ac: use proper preprocessor directives for the + config-checks. -- tobi + +2007-05-24 07:21 oetiker + + * configure.ac: fixed version number for development + +2007-05-24 06:16 oetiker + + * .indent.pro, Makefile.am, bindings/python/rrd_extra.h, + bindings/python/rrdtoolmodule.c, bindings/ruby/main.c, + bindings/tcl/tclrrd.c, libraries/afm/test-afm.c, src/.indent.pro, + src/hash_32.c, src/parsetime.c, src/rrd.h, src/rrd_afm.c, + src/rrd_create.c, src/rrd_dump.c, src/rrd_fetch.c, src/rrd_gfx.c, + src/rrd_gfx.h, src/rrd_graph.c, src/rrd_graph_helper.c, + src/rrd_hw.c, src/rrd_hw.h, src/rrd_info.c, src/rrd_open.c, + src/rrd_rpncalc.c, src/rrd_rpncalc.h, src/rrd_tool.h, + src/rrd_update.c, src/rrd_xport.c, win32/config.h: indent all the + rest of the code, and add some typedefs to indent.pro there is now + a indent makefile target + +2007-05-23 21:40 oetiker + + * src/gdpng.c: removed superfluouse code + +2007-05-23 21:39 oetiker + + * src/.indent.pro: added more indenting rules + +2007-05-23 21:33 oetiker + + * src/.indent.pro, src/art_rgba_svp.c, src/art_rgba_svp.h, + src/fnv.h, src/gdpng.c, src/hash_32.c, src/parsetime.c, + src/pngsize.c, src/rrd.h, src/rrd_afm.c, src/rrd_afm.h, + src/rrd_afm_data.c, src/rrd_afm_data.h, src/rrd_cgi.c, + src/rrd_create.c, src/rrd_diff.c, src/rrd_dump.c, src/rrd_error.c, + src/rrd_fetch.c, src/rrd_first.c, src/rrd_format.c, + src/rrd_format.h, src/rrd_getopt.c, src/rrd_getopt.h, + src/rrd_getopt1.c, src/rrd_gfx.c, src/rrd_gfx.h, src/rrd_graph.c, + src/rrd_graph.h, src/rrd_graph_helper.c, src/rrd_hw.c, + src/rrd_hw.h, src/rrd_info.c, src/rrd_is_thread_safe.h, + src/rrd_last.c, src/rrd_lastupdate.c, src/rrd_nan_inf.c, + src/rrd_nan_inf.h, src/rrd_not_thread_safe.c, src/rrd_open.c, + src/rrd_resize.c, src/rrd_restore.c, src/rrd_rpncalc.c, + src/rrd_rpncalc.h, src/rrd_stat.c, src/rrd_thread_safe.c, + src/rrd_thread_safe_nt.c, src/rrd_tool.c, src/rrd_tool.h, + src/rrd_tune.c, src/rrd_update.c, src/rrd_version.c, + src/rrd_xport.c, src/rrd_xport.h, src/rrdupdate.c, src/strftime.c, + src/strftime.h, src/win32comp.c: reindented everything according + to .indent.pro + +2007-05-23 20:57 oetiker + + * .indent.pro, src/.indent.pro: profile must be in the source + directory to work + +2007-05-23 20:57 oetiker + + * .indent.pro: tabs be gone! + +2007-05-23 20:42 oetiker + + * configure.ac, src/Makefile.am, src/rrd.h, src/rrd_dump.c, + src/rrd_fetch.c, src/rrd_first.c, src/rrd_hw.c, src/rrd_hw.h, + src/rrd_info.c, src/rrd_last.c, src/rrd_lastupdate.c, + src/rrd_open.c, src/rrd_resize.c, src/rrd_restore.c, + src/rrd_stat.c, src/rrd_thread_safe.c, src/rrd_tool.h, + src/rrd_tune.c, src/rrd_update.c, src/unused.h: * progress in + moving all the fileaccess over to a wrapper system that can do fd + based and mmap based fileaccess transparently ... * small fixes + left and right to improve code quality and stability. -- Bernhard + Fischer rep dot nop gmail com + +2007-05-23 16:10 oetiker + + * .indent.pro: we are going to use indent from now on to keep code + indenting consistent throughout the project + +2007-05-23 16:08 oetiker + + * .: new trunk based on current 1.2 + +2007-05-23 16:07 oetiker + + * .: restarting trynk for 1.2 + +2007-05-22 11:03 oetiker + + * trunk/talks/rrdtoolfast/onlineusv-de.ppt: initial + +2007-05-22 09:27 oetiker + + * trunk/talks/rrdtoolfast/fasttalk.ppt, + trunk/talks/rrdtoolfast/samfs-de.ppt: renamed + +2007-04-10 13:49 oetiker + + * trunk/status/2007-04-10.txt: added sponsors + +2007-04-10 13:29 oetiker + + * trunk/status/2007-04-10.txt: second reading ... + +2007-04-10 13:14 oetiker + + * trunk/status, trunk/status/2007-04-10.txt: status report initial + version + +2007-03-19 22:01 oetiker + + * trunk/articles/rrdtool-infoweek-2007-03.doc: infoweek artikel + initial + +2007-03-19 14:24 oetiker + + * trunk/articles, trunk/articles/rrdtool-infoweek-2007-03.doc: + initial + +2007-03-02 06:38 oetiker + + * trunk/talks/rrdtoolfast/monitoring-en.ppt: added english version + +2007-02-20 06:53 oetiker + + * trunk/tutorial/linuxforum2007/rrdtutorial.odp: ready for + presentation at linuxforum + +2007-01-31 08:29 oetiker + + * trunk/talks/rrdtoolfast/fasttalk.ppt: updated for samfs + +2007-01-30 08:36 oetiker + + * trunk/talks/rrdtoolfast/fasttalk.ppt: added fasttalk for samfs + +2007-01-30 08:34 oetiker + + * trunk/talks, trunk/talks/rrdtoolfast: initial + +2007-01-22 17:20 oetiker + + * trunk/tutorial, trunk/tutorial/linuxforum2007, + trunk/tutorial/linuxforum2007/abstract-rrdtut.txt, + trunk/tutorial/linuxforum2007/rrdtutorial.odp, + trunk/tutorial/linuxforum2007/tobi-2006.jpg: initial + +2006-02-13 14:40 oetiker + + * NEWS: removed extra line from top + +2005-04-04 22:15 oetiker + + * trunk/meta/plan-1.2.txt: plan for 1.2 is now in the 1.2 branche + +2005-04-03 12:44 oetiker + + * trunk/meta/plan-1.2.txt: verified operation on debian + +2005-04-03 12:44 oetiker + + * README, configure.ac: update build instructions and configure + output. + +2005-04-03 11:44 oetiker + + * doc/rrdgraph_graph.src, src/rrd_graph_helper.c: paramters in SHIFT + are separated by : like everywhere else + +2005-04-03 11:36 oetiker + + * doc/rrdgraph_graph.src, src/rrd_graph.c, src/rrd_graph.h, + src/rrd_graph_helper.c: the piechart code does not produce release + ready results ... hide it behind WITH_PIECHART define + +2005-04-03 11:11 oetiker + + * src/rrd_gfx.c: improve png writing speed by lowering the + compression + +2005-04-03 11:11 oetiker + + * src/rrd_graph.c: make sure the font path is shorter than the + buffer + +2005-04-03 10:10 oetiker + + * CONTRIBUTORS, src/rrd_graph.c, src/rrd_graph.h: fix graph layout + ... especially consider text propperties propperly + +2005-04-03 09:37 oetiker + + * src/rrd_graph_helper.c: the legend string of a PRINT command gets + renderd later by runnning it through printf. + +2005-04-03 09:35 oetiker + + * configure.ac, src/rrd_update.c: MMAP support for rrdtool this is + suposed to speed-up uptime 4 times. -- Radoslaw Karas + + +2005-03-20 21:17 oetiker + + * bindings/Makefile.am: revert to last working version + +2005-03-20 21:11 oetiker + + * bindings/Makefile.am: fix quoting + +2005-03-20 21:00 oetiker + + * bindings/Makefile.am: quote sed expression + +2005-03-20 20:59 oetiker + + * doc/rrdgraph.src, doc/rrdgraph_graph.src: document tabbing support + by adding in the textformatting notes document --tabwidth argument + document AXIS color + +2005-03-20 20:58 oetiker + + * src/rrd_graph.c, src/rrd_graph.h, src/rrd_graph_helper.c: * allow + configuration of the default tab width * added new configurable + color AXIS * made tabbing support work with legend elements * use + propper font for the legend: LEGEND * fix apperance by makeing + grid more transparent * draw axis over the graph not under it. + +2005-03-20 20:56 oetiker + + * src/rrd_gfx.c, src/rrd_gfx.h: added tabbig support + +2005-03-20 20:55 oetiker + + * configure.ac: include the thread defs after they have been found + not before + +2005-03-20 20:54 oetiker + + * trunk/meta/plan-1.2.txt: sync with reality + +2005-03-13 16:34 oetiker + + * bindings/perl-shared/RRDs.xs: propperly integrate rrd_first + +2005-03-13 16:13 oetiker + + * MakeMakefile: autotools still run after configure this is not good + ... run autoreconf at the end of MakeMakefile. Maybe this will + help + +2005-03-13 16:09 oetiker + + * configure.ac: set install patch to version + +2005-03-13 16:08 oetiker + + * MakeMakefile: re-run autotools to make sure dependent dates are + correct + +2005-03-13 16:00 oetiker + + * MakeMakefile: reintroduce final header regen + +2005-03-13 15:57 oetiker + + * MakeMakefile: still trying to get the order of calling autotools + right + +2005-03-13 15:54 oetiker + + * MakeMakefile: create aclocal.m4 before libtoolize + +2005-03-13 15:51 oetiker + + * MakeMakefile: make the headers first + +2005-03-13 15:16 oetiker + + * doc/rrdfirst.pod: add the documentation for first + +2005-03-13 15:14 oetiker + + * src/Makefile.am: ntconfig is no more + +2005-03-13 15:12 oetiker + + * src/rrd_first.c: missed the actual code for first + +2005-03-12 17:06 oetiker + + * bindings/perl-shared/RRDs.xs, doc/Makefile.am, src/Makefile.am, + src/rrd.h, src/rrd_tool.c: rrd_first code contributed by Burton + Strauss + +2005-03-10 17:04 oetiker + + * trunk/meta/plan-1.2.txt: updated plan ... + +2005-03-10 17:03 oetiker + + * README, acinclude.m4, bindings/Makefile.am, configure.ac, + examples/4charts.pl.in, examples/bigtops.pl.in, + examples/cgi-demo.cgi.in, examples/minmax.pl.in, + examples/piped-demo.pl.in, examples/shared-demo.pl.in, + examples/stripes.pl.in, src/rrd.h, src/rrd_last.c, src/rrd_tool.h: + * Updated perl compile system. It now uses Makefile.PL for + everything, but gets it to install the perl module in + @prefix@/lib/perl such that you can use the same use lib line for + whatever platform and perlversion you install into this directory. + They all live neatly next to each other. * fixed examples to work + with new perl install system. Added a few exec_prefix lines where + appropriate * fixed piped demo * fixed VeraMono.ttf file. This + somehow got damaged by cvs ... * added thread defines to normal + compile run, so that _r functions to not through errors. * tested + compilation and installation + +2005-03-04 23:53 oetiker + + * acinclude.m4, configure.ac: revamped configure system ... lots + more stuff is in acinclude now still a bit of a mess, but better + than before ... if configure does not find the dependent libraries + and header it will not try to get help from pkg-config. If you + know where your libraries are it is best to just use CPPFLAGS and + LDFLAGS to specify their location. + +2005-03-04 00:12 oetiker + + * MakeMakefile, acinclude.m4, bindings/Makefile.am, configure.ac, + src/Makefile.am: Big autotool update: * Upgraded to the latest + version of autoconf, automake and libtool * replaced pthread + detection code in configure with a more effective one * added a + test to see if special solaris defines are required for ctime_r to + behave posixly correct. * Fixed lots of warnings from autotools * + started adding support for pkg-config ... this will eventually + make the whole library finding much simpler + +2005-03-04 00:05 oetiker + + * trunk/meta/plan-1.2.txt: added warning cleanup + +2005-03-03 13:56 oetiker + + * trunk/meta/plan-1.2.txt: added notes about including stuff + +2005-03-03 13:48 oetiker + + * trunk/meta/plan-1.2.txt: spelled + +2005-03-03 13:46 oetiker + + * trunk/meta/plan-1.2.txt: initial + +2005-03-03 13:34 oetiker + + * trunk/contrib/php4/.cvsignore, trunk/meta, + trunk/meta/plan-1.2.txt, ., .cvsignore, bindings/.cvsignore, + bindings/perl-piped/.cvsignore, bindings/perl-shared/.cvsignore, + bindings/tcl/.cvsignore, doc/.cvsignore, examples/.cvsignore, + libraries/.cvsignore, src/.cvsignore: ignorelists are a propperty + of an svn directory not a file + +2005-03-03 13:21 oetiker + + * branches/gnu, branches/gpl, trunk/CVSROOT, trunk/rrdtool: post + cvs2svn conversion cleanup + +2005-02-27 22:00 oetiker + + * src/rrd_cgi.c: do not complain when setting environemnt variable + sucessfully. -- hunter@mimuw.edu.pl + +2005-02-13 16:13 oetiker + + * CONTRIBUTORS, bindings/perl-shared/RRDs.xs, bindings/tcl/tclrrd.c, + src/rrd.h, src/rrd_cgi.c, src/rrd_graph.c, src/rrd_graph.h, + src/rrd_tool.c: let rrd_graph return the actual value range it + picked ... -- Henrik Stoerner + +2005-01-28 14:02 oetiker + + * src/rrd_hw.c: fix for memory leak. Rene Gallati + +2005-01-03 22:25 oetiker + + * TODO: update todo + +2004-10-25 22:22 oetiker + + * doc/rrdgraph.src, src/rrd_graph.c, src/rrd_graph.h: * + fore-rules-legend option -- author name missing + +2004-10-25 22:21 oetiker + + * src/rrd_tool.c: fixed segmentation falt problem in rrd_tool -- + Yasuhiro Sumi + +2004-10-21 19:21 oetiker + + * src/rrd_tool.c: fix return codes in the error case -- Haroon + Rafique + +2004-09-24 21:11 oetiker + + * CONTRIBUTORS, doc/rrdgraph_data.src, doc/rrdgraph_rpn.src, + src/rrd_graph.c, src/rrd_graph.h, src/rrd_graph_helper.c, + src/rrd_resize.c, src/rrd_rpncalc.c, src/rrd_rpncalc.h, + src/rrd_xport.c: misc fixed and TREND and reduce functionality by + -- David M. Grimes + +2004-08-24 05:26 oetiker + + * CONTRIBUTORS, doc/rrdgraph_rpn.src, src/rrd_graph.c, + src/rrd_graph.h, src/rrd_graph_helper.c, src/rrd_rpncalc.c, + src/rrd_rpncalc.h, src/rrd_xport.c: CDEF operators SHIFT, SQRT, + SORT, and REV (reverse). See documentation for what they do. This + included removal of redundant code in the rrd_xport path, replaced + with a call to rrd_graph_script(). -- David M. Grimes + + +2004-08-09 08:38 oetiker + + * doc/rrdcgi.pod: added note on escaping : + +2004-08-08 21:54 oetiker + + * src/rrd_cgi.c: port forward of fixes from the stable version of + rrd_cgi + +2004-08-07 23:46 oetiker + + * src/rrd_graph.c: when moving the data pointers we should take into + account how fahr off they are. Found by David M. Grimes + + +2004-08-05 21:24 oetiker + + * bindings/perl-piped/MANIFEST, bindings/perl-shared/MANIFEST: + removed nonexisting files from manifest + +2004-07-30 00:30 jake + + * NT-BUILD-TIPS.txt, bindings/perl-shared/RRDs.ppd, + bindings/perl-shared/ntmake.pl, bindings/perl-shared/rrdpl.dsp, + bindings/perl-shared/rrdpl.dsw, confignt/config.h, src/rd_cgi.dsp, + src/rrd.dsp, src/rrd.dsw, src/rrd.vcproj, src/rrd_afm.c, + src/rrd_cgi.dsp, src/rrd_cgi.vcproj, src/rrd_restore.c, + src/rrdtool.dsp, src/rrdtool.dsw, src/rrdtool.sln, + src/rrdtool.suo, src/rrdtool.vcproj: Fix the Win32 build for + executable and perl-shared library. See NT-BUILD-TIPS.txt for step + by step instructions. Remove VC++ project files not being + maintained by anyone. + +2004-07-14 10:55 oetiker + + * CONTRIBUTORS: added Peter Speck + +2004-06-26 09:03 oetiker + + * rrdtool.spec: allow building rpm from cvs where there is not + ChangeLog (this gets generated when the distribution tar is built) + -- Tobi and Mike Slifcak + +2004-06-23 20:36 oetiker + + * src/rrd_graph.c: It's quie enough that the title is placed on the + top of the graph, there's no need to emphasize it more. -- + Stanislav Sinyagin + +2004-06-23 08:39 oetiker + + * src/Makefile.am: reverted ... $< does not work + +2004-06-22 22:09 oetiker + + * src/Makefile.am: The "$^" variable is GNU make-specific, and fails + to compile under FreeBSD 4.10. Please change it to $<, which is + more compatible. -- Stanislav Sinyagin + +2004-06-17 22:09 oetiker + + * src/rrd_graph.h: fixed type for text_prop_conv prototype + +2004-06-07 19:07 oetiker + + * debian/changelog, debian/control, debian/rules: Fix for debian + freetype linking -- Peter Hirdina + +2004-05-26 22:11 oetiker + + * src/fnv.h, src/parsetime.c, src/pngsize.c, src/rrd.h, + src/rrd_afm.c, src/rrd_afm_data.c, src/rrd_afm_data.h, + src/rrd_cgi.c, src/rrd_gfx.c, src/rrd_graph.c, + src/rrd_graph_helper.c, src/rrd_last.c, src/rrd_open.c, + src/rrd_resize.c, src/rrd_restore.c, src/rrd_tool.c, + src/rrd_tool.h, src/rrd_tune.c, src/rrd_update.c, src/rrd_xport.c: + reduce compiler warnings. Many small fixes. -- Mike Slifcak + + +2004-05-26 22:10 oetiker + + * rrdtool.spec: improve redhat/fedora building -- Mike Slifcak + +2004-05-26 22:09 oetiker + + * debian/rules: update debian build instructions -- Mike Slifcak + +2004-05-25 22:08 oetiker + + * examples/shared-demo.pl.in: The counter was the only variable + which needed to be an integer. -- Mike Slifcak + +2004-05-25 22:07 oetiker + + * rrdtool.spec: The rrdtool RPM package was depending on the + rrdtool-perl package. These changes move the examples, which are + primarily perl scripts, in with the rrdtool-perl RPM package, + thereby de-coupling the rest of the RRDtool from Perl. Perhaps + this is silliness ? If there is no need for rrdtool separate from + the Perl modules, let me know, then I'll just create an rrdtool + and an rrdtool-devel RPM package (that would be a cleaner build + and scripting, anyway). -- Mike Slifcak + +2004-05-25 22:03 oetiker + + * doc/Makefile.am, doc/rrdtool-dump.dtd, doc/rrdtool-xport.dtd: + added dtd descriptsion s or rrdtool xml output -- Wolfgang Schrimm + + +2004-05-25 21:06 oetiker + + * bindings/perl-shared/RRDs.xs: added dump and restore ... Mike + Schilli + +2004-05-25 21:01 oetiker + + * CONTRIBUTORS: added some contributors + +2004-05-25 21:00 oetiker + + * doc/rrdupdate.pod: fixed time stamp in example -- Mike Slifcak + +2004-05-25 20:59 oetiker + + * rrdtool.spec: more fixes for rpm spec -- Mike Slifcak + +2004-05-25 20:58 oetiker + + * doc/rrdtutorial.pod: single word fix -- Mike Slifcak + +2004-05-25 20:57 oetiker + + * src/rrd_xport.c: Clear out previous legend array contents before + freeing legend array. Problem could manifest under extreme + resource limits. Not tested. -- Mike Slifcak + +2004-05-25 20:55 oetiker + + * doc/rrdcreate.pod: subordinate term was improperly formed -- Mike + Slifcak + +2004-05-25 20:53 oetiker + + * src/rrd_create.c, src/rrd_dump.c: prevent small leak when + resources are exhausted -- Mike Slifcak + +2004-05-25 20:52 oetiker + + * THREADS, doc/rrdthreads.pod, doc/rrdtutorial.pod, + doc/rrdupdate.pod, src/rrd_cgi.c, src/rrd_resize.c, + src/rrd_restore.c, src/rrd_tool.c, src/rrd_update.c: fix spelling + and syntax, especially in messages that are printed -- Mike + Slifcak + +2004-05-25 20:51 oetiker + + * src/rrd_cgi.c, src/rrd_dump.c, src/rrd_restore.c, src/rrd_tool.c, + src/rrd_update.c: Update displayed copyright messages to be + consistent. -- Mike Slifcak + +2004-05-25 20:51 oetiker + + * doc/Makefile.am: don't process the old rrdgraph single file + document -- Mike Slifcak + +2004-05-25 20:50 oetiker + + * rrdtool.spec: fix rpm rules -- Mike Slifcak + +2004-05-25 20:50 oetiker + + * debian/control: fixed debian dependencies -- Mike Slifcak + +2004-05-25 16:51 oetiker + + * src/rrd_rpncalc.c: The expression's head was first checking for + LT, and then for LTIME, and the latter was never reached. -- + Stanislav Sinyagin + +2004-05-19 05:11 oetiker + + * doc/rrd-beginners.pod: integrated from debian + +2004-05-18 18:54 oetiker + + * src/parsetime.c: its 365 days in a year .... -- Mike Slifcak + +2004-05-18 18:53 oetiker + + * CONTRIBUTORS, NEWS, README, TODO, bindings/perl-piped/README, + bindings/perl-piped/RRDp.pm, bindings/perl-piped/t/base.t, + bindings/perl-shared/RRDs.pm, bindings/tcl/README, + doc/bin_dec_hex.pod, doc/cdeftutorial.pod, doc/rpntutorial.pod, + doc/rrdcgi.pod, doc/rrdcreate.pod, doc/rrddump.pod, + doc/rrdfetch.pod, doc/rrdgraph-old.pod, doc/rrdgraph.src, + doc/rrdgraph_data.src, doc/rrdgraph_examples.src, + doc/rrdgraph_graph.src, doc/rrdgraph_rpn.src, doc/rrdinfo.pod, + doc/rrdresize.pod, doc/rrdrestore.pod, doc/rrdthreads.pod, + doc/rrdtool.pod, doc/rrdtune.pod, doc/rrdtutorial.es.pod, + doc/rrdtutorial.pod, doc/rrdupdate.pod, src/parsetime.c, + src/rrd_fetch.c, src/rrd_format.c, src/rrd_gfx.c, src/rrd_graph.c: + big spell checking patch -- slif@bellsouth.net + +2004-05-18 18:51 oetiker + + * src/rrd_restore.c: make force option work + +2004-05-18 18:51 oetiker + + * doc/Makefile.am: added beginners guide off debian -- + slif@bellsouth.net + +2004-05-18 18:49 oetiker + + * configure.ac, examples/4charts.pl.in, examples/Makefile.am, + examples/shared-demo.pl.in, examples/stripes.pl.in: add 4chars and + fix two examples -- Mike Slifcak + +2004-05-18 18:40 oetiker + + * debian, debian/README.Debian, debian/build_freetype.sh, + debian/changelog, debian/control, debian/copyright, + debian/librrd0-dev.files, debian/librrd0.files, + debian/librrd0.postinst, debian/librrd0.postrm, + debian/librrd0.shlibs, debian/librrdp-perl.files, + debian/librrds-perl.files, debian/rrdtool-tcl.files, + debian/rrdtool.files, debian/rules, debian/watch: initial debian + build system added -- Mike Slifcak + +2004-05-18 18:36 oetiker + + * src/Makefile.am: fix library numbering -- Mike Slifcak + +2004-05-18 18:25 oetiker + + * doc/Makefile.am: better cleaning -- Mike Slifcak + +2004-05-12 21:57 oetiker + + * bindings/Makefile.am, doc/Makefile.am: locate the mkinstalldirs + script at top level accept "configure --mandir=" settings -- Mike + Slifcak + +2004-05-04 21:01 oetiker + + * doc/rrdgraph_rpn.src, src/rrd_rpncalc.c, src/rrd_rpncalc.h: Added + the ATAN function. This is being used to convert a DS for each + vector component of wind direction into a single direction for + graphing. + CDEF:avdir=yavg,xavg,/,ATAN,57.296,*,xavg,0,LT,180,0,IF,+,DUP,0,LT,360,0,IF,+ + -- Daniel Shiels + +2004-05-04 20:54 oetiker + + * rrdtool.spec: updated spec file -- Chris Adams + + +2004-05-04 05:25 oetiker + + * MakeMakefile: die only after all the version checks are done and + not for each one -- Alex van den Bogaerdt + +2004-05-03 14:05 oetiker + + * Makefile.am, configure.ac, src/Makefile.am: * Allows rrdtool 1.1.x + (2004-04-29) to compile on freebsd. * Add configure options + --disable-rrdcgi disable building of rrdcgi --disable-pthread + disable multithread support -- Stanislav Sinyagin + + +2004-05-02 21:10 oetiker + + * configure.ac, src/rrd_graph.c: See the patch, attached. It changes + the default angle to 90, and allows one to change it from + configure command line: ./configure RRDGRAPH_YLEGEND_ANGLE=270.0 + -- Stanislav Sinyagin + +2004-04-18 10:21 oetiker + + * src/rrd_restore.c: fixed O_BINARY + +2004-03-23 21:34 oetiker + + * src/rrd_restore.c: make sure fole is opened binary on restore ... + to make things work on windows -- "Girod, Laurent" + + +2004-03-21 11:40 oetiker + + * doc/rrdgraph.src, src/rrd_graph.c, src/rrd_graph.h, + src/rrd_tool.c: Added --only-graph option -- Piotr Kodzis + + +2004-03-14 20:58 oetiker + + * MakeMakefile, acinclude.m4, bindings/Makefile.am, + bindings/perl-shared/Makefile.PL, bindings/perl-shared/RRDs.pm, + bindings/perl-shared/t/base.t, configure.ac, doc/Makefile.am: make + MakeMaker work on debian and fix some leftovers from the library + rip-out transition -- Tobi + +2004-01-19 23:41 oetiker + + * src/VeraMono.ttf, src/compile_afm.pl: initial + +2004-01-19 23:39 oetiker + + * config: kill + +2004-01-19 23:39 oetiker + + * config/Makefile.am: remove + +2004-01-19 23:37 oetiker + + * libraries/cgilib-0.4: kill it + +2004-01-19 23:35 oetiker + + * libraries/Makefile.am, libraries/cgilib-0.4/Makefile.am, + libraries/cgilib-0.4/cgi.5, libraries/cgilib-0.4/cgi.c, + libraries/cgilib-0.4/cgi.h, libraries/cgilib-0.4/cgiDebug.3, + libraries/cgilib-0.4/cgiGetValue.3, + libraries/cgilib-0.4/cgiHeader.3, libraries/cgilib-0.4/cgiInit.3, + libraries/cgilib-0.4/cgiRedirect.3, + libraries/cgilib-0.4/cgilib.dsp, libraries/cgilib-0.4/cgilib.dsw, + libraries/cgilib-0.4/cgilib.vcproj, + libraries/cgilib-0.4/cgitest.c, libraries/cgilib-0.4/jumpto.c, + libraries/cgilib-0.4/readme, libraries/freetype-2.0.5-import.txt, + libraries/libart_lgpl-2.3.7, libraries/libpng-1.2.0, + libraries/libpng-1.2.0-import.txt, libraries/zlib-1.1.4: killem + +2004-01-19 23:27 oetiker + + * libraries/freetype-2.0.5: all must go + +2004-01-19 23:17 oetiker + + * MakeMakefile, Makefile.am, NEWS, README, bindings/Makefile.am, + bindings/perl-shared/Makefile.PL, bindings/perl-shared/RRDs.xs, + bindings/tcl/Makefile.am, configure.ac, doc/rrdcgi.pod, + libraries/Makefile.am: misc fixes to get rrdtool working without + included libraries. + +2004-01-19 23:16 oetiker + + * src/Makefile.am, src/rrd_gfx.h: modifications for 'no more local + libaries' + +2004-01-15 18:14 oetiker + + * bindings/perl-shared/RRDs.pm, bindings/perl-shared/RRDs.xs: + addition of RRDs::times -- Christophe Kalt + +2003-12-26 16:54 oetiker + + * src/rrd_graph.c: using --riggid it is possible to get a case where + minval is bigger than maxval ... this breaks the horizontal grid + ... + +2003-11-27 06:31 oetiker + + * bindings/perl-shared/RRDs.xs: Stop RRDs for segfaulting on invalid + graph input -- Ian Holsman + +2003-11-27 06:30 oetiker + + * src/rrd_cgi.c: make rrd_cgi build again ... Ian Holsman + + +2003-11-23 12:55 oetiker + + * doc/rrdcgi.pod, src/rrd_cgi.c: New recursive parser for rrdcgi by + Arend-Jan Wijtzes + +2003-11-19 07:06 oetiker + + * src/rrd_gfx.c: Adding attributions: * xml fix was by Ian Holsman + * font rotation was by Chris + Turbeville + +2003-11-19 06:58 oetiker + + * src/rrd_gfx.c: fixed svg generation + +2003-11-17 11:43 oetiker + + * src/rrd_restore.c: more correct usage added -- Eldad Zack + + +2003-11-14 23:10 oetiker + + * src/rrd_cgi.c: handle NULL pointers gracefully + +2003-11-12 22:14 oetiker + + * bindings/perl-shared/RRDs.xs, src/rrd.h, src/rrd_cgi.c, + src/rrd_graph.c, src/rrd_graph.h, src/rrd_tool.c: allow to pass an + open filehandle into rrd_graph as an extra argument + +2003-11-12 22:13 oetiker + + * src/rrd_create.c: make create much faster .. -- David M. Grimes + + +2003-11-11 21:19 oetiker + + * doc/rrdrestore.pod, src/rrd_restore.c, src/rrd_tool.c: Allow to + force overwrite when restoring from xml to rrd. -- Eldad Zack + + +2003-11-11 19:46 oetiker + + * src/fnv.h, src/parsetime.c, src/rrd.h, src/rrd_cgi.c, + src/rrd_create.c, src/rrd_fetch.c, src/rrd_graph.c, + src/rrd_graph_helper.c, src/rrd_update.c, src/rrd_xport.c: + replaced time_value with rrd_time_value as MacOS X introduced a + struct of that name in their standard headers + +2003-11-11 19:38 oetiker + + * src/rrd_update.c: rrd files should NOT change size ever ... bulk + update code wa buggy. -- David M. Grimes + +2003-11-04 22:20 oetiker + + * src/rrd_tool.c: 20 chars max in a ds name -- Kuba Filipowicz + + +2003-10-26 19:29 oetiker + + * src/rrd_gfx.c, src/rrd_gfx.h, src/rrd_graph.c: added rotation ... + +2003-09-04 13:16 oetiker + + * src/rrd_update.c: should not assigne but compare ... grrrrr + +2003-09-02 21:58 oetiker + + * src/rrd_update.c: be pickier about what we accept in rrd_update. + Complain if things do not work out + +2003-08-28 21:48 oetiker + + * configure.ac: make sure we get only 1 flag -- Chris Turbeville + + +2003-07-28 21:59 oetiker + + * bindings/Makefile.am, libraries/freetype-2.0.5/Makefile.am, + src/Makefile.am: I was just taking a look at the development + RRDtool build (I'm looking forward to SVG support), and had a few + problems with an out-of-tree build. I find using a separate build + directory makes things much easier to manage, especially when + building for multiple architectures. I've attached the minor + patches for the progress that I made (I couldn't get the Perl + modules to work, but the main binaries seem okay), and would be + grateful if you could commit them (or something like them!). -- + Joseph Walton + +2003-07-24 14:51 jake + + * src/rrd_graph.h: Allow hyphen character in DEF_NAM_FMT to match + DS_NAM_FMT. + +2003-07-16 23:41 jake + + * confignt/config.h, libraries/cgilib-0.4/cgilib.vcproj, + libraries/freetype-2.0.5/freetype.vcproj, + libraries/libart_lgpl-2.3.7/libart.vcproj, + libraries/libpng-1.2.0/png.vcproj, + libraries/zlib-1.1.4/zlib.vcproj, src/rrd.vcproj, + src/rrd_cgi.vcproj, src/rrd_graph.c, src/rrdtool.sln, + src/rrdtool.vcproj: Updated MS Visual C++ files from 7.0 to 7.1. + Add code to rrd_graph.c: rrd_graph_init() to use %windir% + environment variable to find the default font at runtime. + +2003-07-15 00:58 jake + + * src/rrd_rpncalc.h: Moved OP_COUNT to the end of the enumeration. + +2003-05-20 20:51 oetiker + + * doc/rrdcgi.pod, src/rrd_cgi.c: I've made a patch to rrdcgi to add + which allows you to re-format start and + end-time at-style times using strftime. This allows easy timespans + in the graph (e.g. -2weeks) to be formatted into more usual times. + -- "Erskine, Thomas" + +2003-05-03 15:41 oetiker + + * src/rrd_create.c: small patch to rrd_create.c that corrects + problem with the version number of the newly created files. -- + Sasha Mikheev + +2003-04-29 21:56 oetiker + + * src/rrd_open.c: readline in rrd_open.c reads the file in 8 KB + blocks, and calls realloc for each block. realloc is very slow in + Mac OS X for huge blocks, e.g. when restoring databases from huge + xml files. This patch finds the size of the file, and starts out + with malloc'ing the full size. -- Peter Speck + +2003-04-29 19:37 oetiker + + * doc/rrdfetch.pod: added comment on iso + +2003-04-29 19:14 jake + + * MakeMakefile, doc/rrdupdate.pod, src/rrd_update.c: Change updatev + RRA return from index_number to cf_nam, pdp_cnt. Also revert + accidental addition of -I to aclocal MakeMakefile. + +2003-04-26 05:11 oetiker + + * src/rrd_restore.c: only restore V2 and larger. + +2003-04-25 18:35 jake + + * MakeMakefile, bindings/perl-shared/RRDs.pm, + bindings/perl-shared/RRDs.xs, doc/rrdtool.pod, doc/rrdupdate.pod, + src/rrd.h, src/rrd_create.c, src/rrd_info.c, src/rrd_tool.c, + src/rrd_tool.h, src/rrd_update.c: Alternate update interface, + updatev. Returns info about CDPs written to disk as result of + update. Output format is similar to rrd_info, a hash of + key-values. + +2003-04-23 22:47 oetiker + + * src/rrd_restore.c: fixed version checks to only complain if xml + version is > than current RRD version + +2003-04-11 19:43 oetiker + + * doc/rrdcreate.pod, doc/rrdgraph-old.pod, doc/rrdgraph_rpn.src, + src/rrd_open.c, src/rrd_restore.c, src/rrd_rpncalc.c, + src/rrd_rpncalc.h, src/rrd_tool.c: New special value COUNT which + allows calculations based on the position of a value within a data + set. Bug fix in rrd_rpncalc.c. PREV returned erroneus value for + the second value. Bug fix in rrd_restore.c. Bug causing seek error + when accesing an RRD restored from an xml that holds an RRD + version <3. -- Ruben Justo + +2003-04-04 20:51 oetiker + + * src/rrd_gfx.c: I think I found a very small bug in rrd graph PDF + output : the is_stream member of pdf_buffer is not initialized, + making bad PDF sometimes (I found a case where is_stream was != 0 + for the font initialization). -- lhoudard@netcourrier.com + +2003-04-01 22:52 jake + + * THREADS, bindings/perl-shared/ntmake.pl, src/rrd.dsp, src/rrd.h, + src/rrd.vcproj, src/rrd_graph.c, src/rrd_nan_inf.c, + src/rrd_not_thread_safe.c, src/rrd_thread_safe_nt.c, + src/rrd_tool.h, src/rrdtool.dsp: Fix Win32 build. VC++ 6.0 and 7.0 + now use the thread-safe code. + +2003-03-31 21:22 oetiker + + * src/rrd_format.h, src/rrd_open.c, src/rrd_update.c: enables + RRDtool updates with microsecond or in case of windows millisecond + precision. This is needed to reduce time measurement error when + archive step is small. (<30s) -- Sasha Mikheev + + +2003-03-25 22:29 oetiker + + * bindings/perl-shared/ntmake.pl: use the environment variable + VCINSTALLDIR -- Ian Holsman + +2003-03-24 22:08 oetiker + + * src/rrd_thread_safe.c: strerror should not turn us recursive here + ... -- Peter Stamfest + +2003-03-24 22:05 oetiker + + * src/rrd_not_thread_safe.c: strerror must not become recursive -- + Peter Stamfest + +2003-03-12 20:39 oetiker + + * doc/rrdresize.pod: remove ^M + +2003-03-10 00:30 oetiker + + * src/rrd_diff.c: handle cases with two negative numbers -- Sasha + Mikheev + +2003-03-08 18:44 oetiker + + * src/rrd_graph.c: don't display legends for [HV]RULEs out of graph + bounds (rrdgraph) -- Christophe Kalt + +2003-03-01 22:25 oetiker + + * src/rrd_tool.c: realy suppress size output when talking to stdout. + Patch from Mat Zimmerman @ debian + +2003-02-24 18:26 oetiker + + * examples/piped-demo.pl.in: fix for : in piped demo + +2003-02-22 21:57 oetiker + + * doc/rrdthreads.pod: Initial checkin -- Peter Stamfest + + +2003-02-22 21:57 oetiker + + * doc/Makefile.am, src/Makefile.am, src/rrd_error.c: a patch to + avoid a memory leak and a Makefile.am patch to distribute all + required source files -- Peter Stamfest + +2003-02-21 22:40 oetiker + + * examples/piped-demo.pl.in: colons must be escaped + +2003-02-20 21:48 oetiker + + * libraries/libpng-1.2.0/Makefile.am, src/Makefile.am: make the + threading work and compile, fix linking to libpng and update the + timestaps int the files + +2003-02-20 21:27 oetiker + + * src/Makefile.am, src/rrd_thread_safe.c, src/rrd_tool.c: updated + copyrigh dates removed error.h from threaded variant added + compiletime to rrdtool + +2003-02-16 12:32 oetiker + + * src/rrd_restore.c: if output is - there is not need to deref the + handler + +2003-02-16 12:31 oetiker + + * src/parsetime.c: expect seems to exist on some systems in the + system inc files + +2003-02-13 07:05 oetiker + + * Makefile.am, THREADS, configure.ac, src/Makefile.am, + src/parsetime.c, src/rrd.h, src/rrd_cgi.c, src/rrd_create.c, + src/rrd_dump.c, src/rrd_error.c, src/rrd_format.c, + src/rrd_graph.c, src/rrd_graph_helper.c, src/rrd_info.c, + src/rrd_is_thread_safe.h, src/rrd_last.c, + src/rrd_not_thread_safe.c, src/rrd_open.c, src/rrd_restore.c, + src/rrd_rpncalc.c, src/rrd_stat.c, src/rrd_thread_safe.c, + src/rrd_tool.c, src/rrd_tool.h, src/rrd_update.c: Find attached + the patch I promised to send to you. Please note that there are + three new source files (src/rrd_is_thread_safe.h, + src/rrd_thread_safe.c and src/rrd_not_thread_safe.c) and the + introduction of librrd_th. This library is identical to librrd, + but it contains support code for per-thread global variables + currently used for error information only. This is similar to how + errno per-thread variables are implemented. librrd_th must be + linked alongside of libpthred There is also a new file "THREADS", + holding some documentation. -- Peter Stamfest + +2003-02-12 07:06 oetiker + + * CONTRIBUTORS, bindings/Makefile.am, bindings/perl-shared/MANIFEST, + libraries/Makefile.am, src/Makefile.am: improved dist target -- + Peter Stamfest + +2003-02-11 10:16 oetiker + + * doc/rrdgraph_graph.src: removed lg we do not allow this in the + code at th moment + +2003-02-05 18:16 oetiker + + * src/rrd_resize.c: rrd resize SHRINK was broken :-) -- Scott Mace + + +2003-01-31 06:46 oetiker + + * src/rrd_graph.c: The NaN check should only use lastgdes when + following a STACK -- Scott Mace + +2003-01-30 21:39 oetiker + + * src/rrd_graph.c: fix stak+nan error ... Scott Mace + + +2003-01-29 07:17 oetiker + + * src/rrd_graph.c: fixed the processing of + TICK:vname#color:frac:legend -- Scott Mace + +2003-01-25 22:50 oetiker + + * CONTRIBUTORS, examples/4charts.pl.in, src/rrd_graph.c, + src/rrd_graph.h: added function (--no-minor) to turn off minor + gridlines on graphs -- Travis Brown + +2003-01-16 23:27 oetiker + + * src/rrd_fetch.c: fix border condition in rra selection of + rrd_fetch -- Stanislav Sinyagin + +2003-01-15 19:24 oetiker + + * doc/rrdcreate.pod, doc/rrdgraph-old.pod, doc/rrdgraph.src, + doc/rrdgraph_graph.src, src/rrd_graph.c: * single letter variants + for all graph options -- James Overbeck + +2002-12-14 22:30 oetiker + + * configure.ac: fix rrdtool compile on solaris where CC for perl is + "gcc -B/usr/ccs/bin/" -- Russell Van Tassell + + +2002-11-29 11:57 oetiker + + * doc/rrdtool.pod: note on info added + +2002-11-19 22:33 oetiker + + * doc/rrdgraph-old.pod, doc/rrdgraph_graph.src, src/rrd_graph.c: + added g as valid string format value + +2002-11-18 23:37 oetiker + + * configure.ac: check for -OPT:IEEE_NaN_inf=ON on SGI C compiler -- + Albert Chin-A-Young + +2002-11-03 15:07 oetiker + + * MakeMakefile: fixed + +2002-10-24 21:17 oetiker + + * src/rrd_cgi.c: added patch for apache 2 compatibility + +2002-10-07 06:22 oetiker + + * MakeMakefile: keep up with the jhonses + +2002-10-07 06:21 oetiker + + * src/rrd_graph.c: -z does not take an option -- Tomoyuki Murakami + + +2002-09-02 18:41 oetiker + + * src/rrd_graph.c: fixed leak in VDEF_PERCENT handlin -- Perry Stoll + + +2002-08-01 05:42 oetiker + + * src/rrd_graph.c: fix for segfault condition in print_calc -- Paul + Clifford + +2002-07-31 05:42 oetiker + + * doc/rrdfetch.pod: improved fetch explanation -- + Nenad.Antic@era.ericsson.se + +2002-07-13 18:35 oetiker + + * src/rrd_graph.h, src/rrd_rpncalc.c, src/rrd_rpncalc.h: fixed + DEF_NAM_FMT definition added double include protection the + rrd_graph.h and rrd_rpncalc.h + +2002-07-12 11:20 oetiker + + * src/rrd_rpncalc.c: fixed PREV parsing ... Gonzalo Augusto Arana + Tagle + +2002-07-06 15:45 oetiker + + * src/rrd_rpncalc.h: new operators must be added at the END of the + sequence ... + +2002-07-05 18:57 oetiker + + * doc/cdeftutorial.pod, doc/rrdgraph_rpn.src, src/rrd_graph.c, + src/rrd_rpncalc.c, src/rrd_rpncalc.h: new operand on rrdgraph + CDEFs: PREV(xxxx) -- Gonzalo Augusto Arana Tagle + + +2002-07-05 18:47 oetiker + + * bindings/perl-shared/RRDs.pm: explain tzset + +2002-07-02 10:35 oetiker + + * src/rrd_nan_inf.c: fixed DINF for win32 + +2002-06-29 15:33 alex + + * doc/rrdgraph.src, doc/rrdgraph_data.src, doc/rrdgraph_graph.src: + Changed DEF:... + +2002-06-29 15:24 alex + + * src/rrd_graph.c, src/rrd_graph.h, src/rrd_graph_helper.c: Changed + parsing again. Added a DEBUG prefix to all grapher commands + +2002-06-29 14:55 alex + + * src/rrd_graph_helper.h: Not needed anymore + +2002-06-27 19:34 alex + + * src/rrd_graph.c, src/rrd_graph.h: DEF now takes "--start" and + "--end" LINEx, AREA and such now take parameter "STACK" + +2002-06-23 23:13 alex + + * doc/rrdgraph_data.src, doc/rrdgraph_examples.src: Updated docs for + the "DEF ... :step=nnnn" case + +2002-06-23 22:29 alex + + * src/Makefile.am, src/rrd_fetch.c, src/rrd_graph.c, + src/rrd_resize.c: Added "step=1800" and such to "DEF" Cleaned some + of the signed vs. unsigned problems + +2002-06-23 22:28 alex + + * src/rrd_format.h, src/rrd_nan_inf.c, src/rrd_nan_inf.h: In stead + of a zillion warnings, only one place gives a warning for DNAN + +2002-06-20 00:21 jake + + * NT-BUILD-TIPS.txt, bindings/perl-shared/RRDs.xs, + bindings/perl-shared/ntmake.pl, confignt/config.h, + libraries/freetype-2.0.5/freetype.dsp, + libraries/libart_lgpl-2.3.7/libart.dsp, + libraries/libpng-1.2.0/png.dsp, libraries/zlib-1.1.4/zlib.dsp, + src/rrd.dsp, src/rrd_open.c, src/rrd_tool.h, src/rrdtool.dsp, + src/rrdtool.ncb: More Win32 build changes; thanks to Kerry + Calvert. + +2002-06-14 12:15 oetiker + + * doc/rrdresize.pod: better explanations -- "Shipway, Steve" + + +2002-05-22 15:25 jake + + * doc/rrdtune.pod: Changed intercept to slope for beta parameter in + rrdtune doc. + +2002-05-22 05:35 oetiker + + * bindings/perl-shared/ntmake.pl, + libraries/cgilib-0.4/cgilib.vcproj, + libraries/freetype-2.0.5/freetype.vcproj, + libraries/libart_lgpl-2.3.7/libart.vcproj, + libraries/libpng-1.2.0/png.vcproj, + libraries/zlib-1.1.4/zlib.vcproj, src/rrd.vcproj, + src/rrd_cgi.vcproj, src/rrdtool.ncb, src/rrdtool.sln, + src/rrdtool.suo, src/rrdtool.vcproj: VC++ .NET (7.0) project files + -- Eric Chamberlain + +2002-05-16 19:18 oetiker + + * configure.ac: added -W ... lets have some more warnings ... with + gcc 3.1 985 + +2002-05-15 06:14 oetiker + + * libraries/afm/compile_afm.pl, src/rrd_afm_data.c: afm fixes -- + Peter Speck + +2002-05-14 21:52 jake + + * NT-BUILD-TIPS.txt, confignt/config.h, + libraries/libart_lgpl-2.3.7/libart.dsp, src/rrd.dsp, + src/rrd_tool.c, src/rrdtool.dsp: Fix Win32 Build compatibility. + +2002-05-14 21:48 oetiker + + * src/rrd_restore.c: double free fixed + +2002-05-14 05:28 oetiker + + * configure.ac, src/rrd_tool.c: make opendir readdir chdir chroot + and thus the serverfunctionality a conditional compile depending + on the presence of the necessary function calls. + +2002-05-11 09:09 oetiker + + * configure.ac, src/rrd_tool.c, src/rrd_tool.h: make dirent + sys/types and sys/stat autoconfable .... + +2002-05-08 20:34 oetiker + + * doc/rrdtool.pod, src/rrd_tool.c, src/rrd_tool.h: Add funtionality + to rrdtool to run it as a 'server' -- Hartmut.Vogler@epost.de + +2002-05-07 21:58 oetiker + + * CONTRIBUTORS, bindings/perl-shared/RRDs.xs, doc/Makefile.am, + doc/rrdtool.pod, doc/rrdxport.pod, examples/shared-demo.pl.in, + src/Makefile.am, src/rrd.h, src/rrd_graph.c, src/rrd_graph.h, + src/rrd_tool.c, src/rrd_xport.c, src/rrd_xport.h: new command + rrdtool xport integrated -- Wolfgang Schrimm + + +2002-05-02 13:23 oetiker + + * doc/rrdcreate.pod: typo fixed + +2002-04-29 17:11 oetiker + + * src/rrd_graph.c: badformat parser fixed ... for good this time I + hope + +2002-04-28 19:13 oetiker + + * src/rrd_graph.c: inserted PRINT checker at the wrong point ... + +2002-04-28 14:14 oetiker + + * src/rrd_graph.c: It's nice and simple, the error checker for the + PRINT stuff which is passed to printf() is not allowing certain + valid printf() style operations which make text alignment much + more fun. -- Richard A Steenbergen + +2002-04-24 21:04 oetiker + + * examples/cgi-demo.cgi, libraries/libart_lgpl-2.3.7/art_config.h, + src/rrd_graph.c: fixed setlocale issues + +2002-04-24 20:54 oetiker + + * configure.ac, doc/rrdgraph.src: fixed adress for wishlist + +2002-04-24 20:49 oetiker + + * src/rrd_gfx.c, src/rrd_gfx.h, src/rrd_graph.c: Patch for + supporting PDF as output format + +2002-04-24 20:49 oetiker + + * src/rrd_graph.c, src/rrd_graph.h: Modification of rrd_graph.c/h so + it uses dashes for gridlines much like rrdtool 1.0 Avoids drawing + minor vertical gridlines where a major gridline is to avoid + artifacts from having the grey line beneath the red one. Patches + src/rrd_graph.c and src/rrd_graph.h -- Peter Speck + +2002-04-24 20:43 oetiker + + * src/rrd_graph.c: fixed setlocale issues + +2002-04-16 05:00 oetiker + + * doc/rrdgraph.src: doc for gridfit by peter + +2002-04-15 21:29 oetiker + + * src/rrd_gfx.c, src/rrd_graph.c, src/rrd_graph.h: Evenly-spaced + y-axis gridlines. I had to split horizontal_grid() into + calc_horizontal_grid and draw_horizontal_grid as the calculated + info is needed in the adjustment code. My previous patch had the + problem that it adjusted the y-axis too late, e.g. after the data + lines was drawn. The result of the calc is stored in struct + ygrid_scale_t which image_desc_t has as a member. --no-gridfit is + implemented. The round-to-integer coordinates for png is moved to + the libart code in rrd_gfx. The 'close path' code is cleaned up so + the node list is left unchanged if you want to save the same graph + in multiple formats in one run. The rounding is done on the scaled + coordinates (zoom). I have made a simple version for logarithmic y + scales as such a scale might have 5 gridlines with 4 difference + spacings. This version only uses y = 10^x values for modifying the + scale. -- Peter Speck + +2002-04-09 21:35 oetiker + + * doc/rrdcgi.pod: remove boguos description of goodfor and refresh + +2002-04-09 21:34 oetiker + + * bindings/perl-shared/RRDs.xs: removed tzset as it is in rrd_graph + now + +2002-04-09 21:34 oetiker + + * configure.ac, src/rrd_graph.c: added tzset and setlocale to + rrd_graph + +2002-04-07 22:07 oetiker + + * src/rrd_afm.c, src/rrd_afm.h, src/rrd_afm_data.c, + src/rrd_afm_data.h: added missing files from peters patch + +2002-04-07 20:20 oetiker + + * configure.ac, doc/rrdgraph.src, examples/4charts.pl.in, + examples/bigtops.pl, examples/piped-demo.pl, + examples/shared-demo.pl, examples/stripes.pl, + libraries/Makefile.am, libraries/afm, libraries/afm/COPYRIGHT.txt, + libraries/afm/Courier-Bold.afm, + libraries/afm/Courier-BoldOblique.afm, + libraries/afm/Courier-Oblique.afm, libraries/afm/Courier.afm, + libraries/afm/Helvetica-Bold.afm, + libraries/afm/Helvetica-BoldOblique.afm, + libraries/afm/Helvetica-Oblique.afm, libraries/afm/Helvetica.afm, + libraries/afm/Makefile.am, libraries/afm/Symbol.afm, + libraries/afm/Times-Bold.afm, libraries/afm/Times-BoldItalic.afm, + libraries/afm/Times-Italic.afm, libraries/afm/Times-Roman.afm, + libraries/afm/ZapfDingbats.afm, libraries/afm/compile_afm.pl, + libraries/afm/glyphlist.txt, libraries/afm/test-afm.c, + libraries/libart_lgpl-2.3.7/Makefile.in, + libraries/libpng-1.2.0/Makefile.in, src/Makefile.am, + src/rrd_gfx.c, src/rrd_gfx.h, src/rrd_graph.c, src/rrd_tool.c: 3 + patches, #3 depends on #1 as EPS uses AFM for stringwidth too. + src/rrd_afm.[ch], src/rrd_afm_data.[ch] and changes to + rrd_gfx.[ch] to use AFM for stringwidth in SVG output. + libraries/afm with .afm files for the standard 14 postscript fonts + and perl script to create src/rrd_afm_data.c Includes small test + program to show examples of calculated stringwidth and actual + stringwidth. Adds EPS output support. Modifies rrd_tool.c as + rrd_graph() changes the argv pointer, and rrd_tool then always + wrote the 200x100 output line to the file (which probably doesn't + do anything for png images, but eps files fail having it after the + %%EOF marker). -- Peter Speck + +2002-04-06 12:40 alex + + * src/rrd_graph.c: Different default font when WIN32 is defined + +2002-04-06 12:25 alex + + * NT-BUILD-TIPS.txt, bindings/perl-shared/Makefile.PL, + bindings/perl-shared/RRDs.pm, bindings/perl-shared/ntmake.pl, + bindings/perl-shared/t/base.t, doc/Makefile.am, + doc/cdeftutorial.pod, doc/rrdgraph-old.pod, + doc/rrdgraph_graph.src, doc/rrdtutorial.es.pod, + examples/cgi-demo.cgi, examples/cgi-demo.cgi.in, + examples/piped-demo.pl, examples/piped-demo.pl.in, + examples/shared-demo.pl, examples/shared-demo.pl.in, + src/rrd_cgi.c, src/rrd_gfx.c, src/rrd_gfx.h, src/rrd_graph.c, + src/rrd_graph.h, src/rrd_tool.h: Removed references to GIF Changed + y0 and such into Y0 and so + +2002-04-05 23:51 jake + + * NT-BUILD-TIPS.txt, bindings/perl-shared/RRDs.xs, + bindings/perl-shared/ntmake.pl, confignt, confignt/config.h, + libraries/freetype-2.0.5/freetype.dsp, + libraries/libart_lgpl-2.3.7/libart.dsp, + libraries/libpng-1.2.0/png.dsp, libraries/zlib-1.1.4/zlib.dsp, + src/ntconfig.h, src/rrd.dsp, src/rrd_gfx.c, src/rrd_graph.c, + src/rrd_tool.h, src/rrdtool.dsp, src/rrdtool.dsw: Updated/added + MVSC++ 6.0 project files for compilation of rrd.lib and + rrdtool.exe on Win32. Changes for RRDs compilation on Win32. Moved + src/ntconfig.h to confignt/config.h. + +2002-04-03 14:52 oetiker + + * src/rrd_gfx.c, src/rrd_gfx.h, src/rrd_graph.c, src/rrd_graph.h: As + gfx_canvas_t now has excatly the same lifespan as image_desc_t, + I've made 'gfx_canvas_t canvas' a member of image_desc_t and + dropped it as a separate parameter in all function calls. + imgformat, interlaced and zoom are moved to gfx_canvas_t. I have + dropped my old fontlib-enum as imgformat contains that + information. The gfx_render_xxx switch is moved to rrd_gfx so + rrd_graph is (almost) only bothered with image formats in cmd line + parsing. gfx_close_path is added. gfx_new_dashed_line is added + with 2 new arguments: length of a dash and length between dashes. + gfx_new_line is still there for plain lines. Having dash-length == + 0 creates normal line. rrd_graph.c is not updated for dashed + lines. It's not decided how one should specify which and how lines + are dashed. An extension of the color specification? svg is + updated for dashes and opacity, but libart code is not. I've fixed + indent in SVG, all lines had a space before func decl. etc. Misc + small fixes, e.g. sscanf of gfx_color_t, position of x-axis arrow. + --- Peter Speck + +2002-04-03 05:32 oetiker + + * src/rrd_restore.c: i suck. sorry. add ,0666 to the open(). -- Paul + Vixie + +2002-04-02 21:32 oetiker + + * bindings/perl-shared/RRDs.xs: added call to tzset to activate TZ + settings -- Paul A Vixie + +2002-04-02 21:31 oetiker + + * src/rrd_restore.c: aded missing fcntl.h + +2002-04-02 19:37 oetiker + + * src/rrd_restore.c: rrd restore should not burn down existing files + -- Paul Vixie + +2002-04-01 18:32 oetiker + + * NEWS: merged svg update + +2002-04-01 18:31 oetiker + + * src/rrd_diff.c: "!" takes a higher preference than "||" this means + rrd_update N:: would segfault -- Oliver Cook + +2002-03-28 17:33 jake + + * MakeMakefile: Added comment suggesting use of -I flag with + aclocal. + +2002-03-26 07:02 oetiker + + * doc/rrdgraph.src, src/rrd_gfx.c, src/rrd_gfx.h, src/rrd_graph.h: + added SVG support -- Peter Speck + +2002-03-23 20:41 alex + + * src/rrd_graph.c: Better positioning of the pie when it is alone on + the canvas + +2002-03-23 20:01 alex + + * NEWS: Modified rrd_graph + +2002-03-23 19:59 alex + + * src/rrd_graph.c, src/rrd_graph.h: Changes in rrd_graph; see NEWS + +2002-03-23 09:05 oetiker + + * doc/rrdcgi.pod, doc/rrdgraph.src, doc/rrdtutorial.pod: removed + reference to GIF + +2002-03-23 09:01 oetiker + + * src/Makefile.am, src/rrd_graph.c, src/rrd_graph.h, src/rrd_tool.c: + remove all traces of GIF and make PNG the default + +2002-03-23 08:53 oetiker + + * src/rrd_graph.c: Move CDEF start pointers if start of cdef is a + step ahead of the start of the data -- Ashok Mandala + + +2002-03-21 22:39 oetiker + + * src/rrd_graph.c: fixed color area in legend and fixed color area + in 3d border + +2002-03-21 12:00 alex + + * src/rrd_graph.c, src/rrd_graph.h: Pie charts didn't have + anti-aliasing; building them clockwise seems to solve this + problem. + +2002-03-20 22:48 oetiker + + * src/rrd_rpncalc.c: fixed longstanding bug affection CDEFS where + values from rrds with different resolutions got mixed .. + +2002-03-17 22:40 alex + + * src/rrd_gfx.c, src/rrd_gfx.h, src/rrd_graph.c: Changed the way + circle sections are drawn. + +2002-03-13 02:58 alex + + * src/rrd_gfx.c, src/rrd_gfx.h, src/rrd_graph.c: New, hopefully + better, implementation of PART drawing + +2002-03-12 07:19 oetiker + + * libraries/zlib-1.1.3: realy remove zlibe 1.1.3 dir + +2002-03-12 07:18 oetiker + + * MakeMakefile, configure.ac, examples/bigtops.pl, + examples/piped-demo.pl, examples/shared-demo.pl, + examples/stripes.pl: updated + +2002-03-12 07:17 oetiker + + * libraries/libart_lgpl-2.3.7, + libraries/libart_lgpl-2.3.7/.cvsignore: ignore generated files + +2002-03-12 07:16 oetiker + + * libraries/libart_lgpl-2.3.7/libart_lgpl_2.la, + libraries/zlib-1.1.4, libraries/zlib-1.1.4/.cvsignore, + libraries/zlib-1.1.4/Makefile, libraries/zlib-1.1.4/Makefile.in: + missing bits + +2002-03-12 06:43 oetiker + + * configure.ac: updated to zlib 1.1.4 + +2002-03-12 06:42 oetiker + + * libraries/zlib-1.1.3/ChangeLog, libraries/zlib-1.1.3/FAQ, + libraries/zlib-1.1.3/INDEX, libraries/zlib-1.1.3/Makefile.am, + libraries/zlib-1.1.3/README, libraries/zlib-1.1.3/README.rrdtool, + libraries/zlib-1.1.3/adler32.c, + libraries/zlib-1.1.3/algorithm.txt, + libraries/zlib-1.1.3/compress.c, libraries/zlib-1.1.3/crc32.c, + libraries/zlib-1.1.3/deflate.c, libraries/zlib-1.1.3/deflate.h, + libraries/zlib-1.1.3/descrip.mms, libraries/zlib-1.1.3/example.c, + libraries/zlib-1.1.3/gzio.c, libraries/zlib-1.1.3/infblock.c, + libraries/zlib-1.1.3/infblock.h, libraries/zlib-1.1.3/infcodes.c, + libraries/zlib-1.1.3/infcodes.h, libraries/zlib-1.1.3/inffast.c, + libraries/zlib-1.1.3/inffast.h, libraries/zlib-1.1.3/inffixed.h, + libraries/zlib-1.1.3/inflate.c, libraries/zlib-1.1.3/inftrees.c, + libraries/zlib-1.1.3/inftrees.h, libraries/zlib-1.1.3/infutil.c, + libraries/zlib-1.1.3/infutil.h, libraries/zlib-1.1.3/maketree.c, + libraries/zlib-1.1.3/minigzip.c, libraries/zlib-1.1.3/trees.c, + libraries/zlib-1.1.3/trees.h, libraries/zlib-1.1.3/uncompr.c, + libraries/zlib-1.1.3/zconf.h, libraries/zlib-1.1.3/zlib.3, + libraries/zlib-1.1.3/zlib.dsp, libraries/zlib-1.1.3/zlib.dsw, + libraries/zlib-1.1.3/zlib.h, libraries/zlib-1.1.3/zutil.c, + libraries/zlib-1.1.3/zutil.h, libraries/zlib-1.1.4, + libraries/zlib-1.1.4/ChangeLog, libraries/zlib-1.1.4/FAQ, + libraries/zlib-1.1.4/INDEX, libraries/zlib-1.1.4/Make_vms.com, + libraries/zlib-1.1.4/Makefile, libraries/zlib-1.1.4/Makefile.am, + libraries/zlib-1.1.4/Makefile.am~, + libraries/zlib-1.1.4/Makefile.in, + libraries/zlib-1.1.4/Makefile.riscos, libraries/zlib-1.1.4/README, + libraries/zlib-1.1.4/adler32.c, + libraries/zlib-1.1.4/algorithm.txt, + libraries/zlib-1.1.4/compress.c, libraries/zlib-1.1.4/crc32.c, + libraries/zlib-1.1.4/deflate.c, libraries/zlib-1.1.4/deflate.h, + libraries/zlib-1.1.4/descrip.mms, libraries/zlib-1.1.4/example.c, + libraries/zlib-1.1.4/gzio.c, libraries/zlib-1.1.4/infblock.c, + libraries/zlib-1.1.4/infblock.h, libraries/zlib-1.1.4/infcodes.c, + libraries/zlib-1.1.4/infcodes.h, libraries/zlib-1.1.4/inffast.c, + libraries/zlib-1.1.4/inffast.h, libraries/zlib-1.1.4/inffixed.h, + libraries/zlib-1.1.4/inflate.c, libraries/zlib-1.1.4/inftrees.c, + libraries/zlib-1.1.4/inftrees.h, libraries/zlib-1.1.4/infutil.c, + libraries/zlib-1.1.4/infutil.h, libraries/zlib-1.1.4/maketree.c, + libraries/zlib-1.1.4/minigzip.c, libraries/zlib-1.1.4/trees.c, + libraries/zlib-1.1.4/trees.h, libraries/zlib-1.1.4/uncompr.c, + libraries/zlib-1.1.4/zconf.h, libraries/zlib-1.1.4/zlib.3, + libraries/zlib-1.1.4/zlib.h, libraries/zlib-1.1.4/zlib.html, + libraries/zlib-1.1.4/zutil.c, libraries/zlib-1.1.4/zutil.h: + replace zlib 1.1.3 with zlib 1.1.4 + +2002-03-10 23:08 alex + + * doc/rrdgraph_graph.src, src/rrd_graph.c, src/rrd_graph.h: Pie + chart support added to rrdtool graph + +2002-03-10 22:49 oetiker + + * MakeMakefile: added quotes to echo + +2002-03-10 16:22 alex + + * src/rrd_rpncalc.c: Realigned function rpn_calc() Stack checking + now done using a macro + +2002-03-10 14:58 alex + + * doc/rrdgraph.src, doc/rrdgraph_rpn.src: Fixed some typos/errors + Updated for the NE and ISINF operators in RPN + +2002-03-10 14:53 alex + + * src/rrd_graph.c: Using the font option resulted in a segfault. + Needs more care, the current change is just a hack + +2002-03-10 14:48 alex + + * src/rrd_rpncalc.c, src/rrd_rpncalc.h: Added NE and ISINF operands + to RPN + +2002-03-10 12:28 oetiker + + * MakeMakefile: better version check + +2002-03-08 22:14 alex + + * doc/rrdtutorial.pod: Needed to escape a wildcard + +2002-03-08 22:11 alex + + * doc/rrdtutorial.pod: Fixed some typos + +2002-02-18 21:52 oetiker + + * MakeMakefile, examples/bigtops.pl: added autotools version check + to MakeMakefiles + +2002-02-09 06:21 oetiker + + * src/rrd_gfx.c: do propper error checking and release memmory when + it is not required anymore + +2002-02-08 18:40 oetiker + + * src/rrd_cgi.c: allow rrd_cgi to deal with umlauts -- Alexander + Schwartz + +2002-02-03 08:10 oetiker + + * doc/rrdcreate.pod: fixed spelling + +2002-02-02 14:36 oetiker + + * src/rrd_graph.c: fixed data pointer storage + +2002-02-01 20:34 oetiker + + * src/gdpng.c, src/gifsize.c, src/pngsize.c, src/rrd_cgi.c, + src/rrd_create.c, src/rrd_datalang.c, src/rrd_diff.c, + src/rrd_dump.c, src/rrd_error.c, src/rrd_fetch.c, + src/rrd_format.c, src/rrd_graph.c, src/rrd_hw.c, src/rrd_info.c, + src/rrd_last.c, src/rrd_open.c, src/rrd_resize.c, + src/rrd_restore.c, src/rrd_rpncalc.c, src/rrd_stat.c, + src/rrd_tool.c, src/rrd_tune.c, src/rrd_update.c: fixed version + number and date/time + +2002-02-01 20:29 oetiker + + * libraries/libart_lgpl-2.3.7/Makefile, + libraries/libpng-1.2.0/Makefile, src/rrd_graph.c: *** empty log + message *** + +2002-01-31 22:44 oetiker + + * acinclude.m4: this file and all the external libraries + configurability was contributed by mat zimmermann + +2002-01-31 22:43 oetiker + + * acinclude.m4, configure.ac, examples/minmax.pl, + libraries/Makefile.am, src/Makefile.am, src/rrd_graph.c: allow use + of libraries already installed on the system + +2002-01-31 11:56 oetiker + + * src/parsetime.c: make "18:00 yesterday" work Pavel Mores + + +2002-01-31 07:23 oetiker + + * src/rrd_graph.c: weeknumber is not %V which is more appropriate + than %W + +2002-01-31 06:36 oetiker + + * MakeMakefile: copy ltmain.sh + +2002-01-17 20:31 oetiker + + * libraries/libpng-1.0.9: this also + +2002-01-17 20:30 oetiker + + * config/libtool, libraries/gd1.3, libraries/libpng-1.0.9/ANNOUNCE, + libraries/libpng-1.0.9/CHANGES, libraries/libpng-1.0.9/INSTALL, + libraries/libpng-1.0.9/KNOWNBUG, libraries/libpng-1.0.9/LICENSE, + libraries/libpng-1.0.9/Makefil, + libraries/libpng-1.0.9/Makefile.am, libraries/libpng-1.0.9/README, + libraries/libpng-1.0.9/README.rrdtool, + libraries/libpng-1.0.9/TODO, libraries/libpng-1.0.9/Y2KINFO, + libraries/libpng-1.0.9/example.c, libraries/libpng-1.0.9/libpng.3, + libraries/libpng-1.0.9/libpng.txt, + libraries/libpng-1.0.9/libpngpf.3, libraries/libpng-1.0.9/png.5, + libraries/libpng-1.0.9/png.c, libraries/libpng-1.0.9/png.dsp, + libraries/libpng-1.0.9/png.dsw, libraries/libpng-1.0.9/png.h, + libraries/libpng-1.0.9/pngasmrd.h, + libraries/libpng-1.0.9/pngbar.jpg, + libraries/libpng-1.0.9/pngbar.png, + libraries/libpng-1.0.9/pngconf.h, + libraries/libpng-1.0.9/pngerror.c, + libraries/libpng-1.0.9/pnggccrd.c, + libraries/libpng-1.0.9/pngget.c, libraries/libpng-1.0.9/pngmem.c, + libraries/libpng-1.0.9/pngnow.png, + libraries/libpng-1.0.9/pngpread.c, + libraries/libpng-1.0.9/pngread.c, libraries/libpng-1.0.9/pngrio.c, + libraries/libpng-1.0.9/pngrtran.c, + libraries/libpng-1.0.9/pngrutil.c, + libraries/libpng-1.0.9/pngset.c, libraries/libpng-1.0.9/pngtest.c, + libraries/libpng-1.0.9/pngtest.png, + libraries/libpng-1.0.9/pngtrans.c, + libraries/libpng-1.0.9/pngvcrd.c, libraries/libpng-1.0.9/pngwio.c, + libraries/libpng-1.0.9/pngwrite.c, + libraries/libpng-1.0.9/pngwtran.c, + libraries/libpng-1.0.9/pngwutil.c: this is not needed anymore + +2002-01-17 20:28 oetiker + + * libraries/gd1.3/.cvsignore: killing remains + +2002-01-16 23:11 oetiker + + * MakeMakefile: added places for download + +2002-01-15 22:58 oetiker + + * ., .cvsignore, config, config/.cvsignore: ignore irrelevant things + +2002-01-15 22:53 oetiker + + * libraries/freetype-2.0.5, libraries/freetype-2.0.5/.cvsignore, + libraries/libart_lgpl-2.3.7, + libraries/libart_lgpl-2.3.7/.cvsignore, libraries/libpng-1.2.0, + libraries/libpng-1.2.0/.cvsignore: added new .cvsignore files + +2002-01-15 22:51 oetiker + + * CONTRIBUTORS, MakeMakefile, Makefile.am, NEWS, config/acconfig.h, + config/aclocal.m4, config/config.guess, config/config.h.in, + config/config.sub, config/install-sh, config/ltconfig, + config/ltmain.sh, config/missing, config/mkinstalldirs, + config/stamp-h, config/stamp-h.in, configure.ac, configure.in, + doc/rrdgraph.src, doc/rrdgraph_graph.src, examples/4charts.pl.in, + examples/bigtops.pl, examples/bigtops.pl.in, + examples/cgi-demo.cgi, examples/minmax.pl, examples/minmax.pl.in, + examples/piped-demo.pl, examples/piped-demo.pl.in, + examples/shared-demo.pl, examples/shared-demo.pl.in, + examples/stripes.pl, examples/stripes.pl.in, + libraries/Makefile.am, libraries/cgilib-0.4/Makefile.am, + libraries/freetype-2.0.5, libraries/freetype-2.0.5-import.txt, + libraries/freetype-2.0.5/Makefile.am, + libraries/freetype-2.0.5/README, + libraries/freetype-2.0.5/ahangles.c, + libraries/freetype-2.0.5/ahglobal.c, + libraries/freetype-2.0.5/ahglyph.c, + libraries/freetype-2.0.5/ahhint.c, + libraries/freetype-2.0.5/ahmodule.c, + libraries/freetype-2.0.5/ahoptim.c, + libraries/freetype-2.0.5/autohint.c, + libraries/freetype-2.0.5/cff.c, + libraries/freetype-2.0.5/cffdrivr.c, + libraries/freetype-2.0.5/cffgload.c, + libraries/freetype-2.0.5/cffload.c, + libraries/freetype-2.0.5/cffobjs.c, + libraries/freetype-2.0.5/cffparse.c, + libraries/freetype-2.0.5/cidgload.c, + libraries/freetype-2.0.5/cidload.c, + libraries/freetype-2.0.5/cidobjs.c, + libraries/freetype-2.0.5/cidparse.c, + libraries/freetype-2.0.5/cidriver.c, + libraries/freetype-2.0.5/ftbase.c, + libraries/freetype-2.0.5/ftbbox.c, + libraries/freetype-2.0.5/ftcache.c, + libraries/freetype-2.0.5/ftcalc.c, + libraries/freetype-2.0.5/ftcchunk.c, + libraries/freetype-2.0.5/ftcglyph.c, + libraries/freetype-2.0.5/ftcimage.c, + libraries/freetype-2.0.5/ftcmanag.c, + libraries/freetype-2.0.5/ftcsbits.c, + libraries/freetype-2.0.5/ftdebug.c, + libraries/freetype-2.0.5/ftextend.c, + libraries/freetype-2.0.5/ftglyph.c, + libraries/freetype-2.0.5/ftgrays.c, + libraries/freetype-2.0.5/ftinit.c, + libraries/freetype-2.0.5/ftlist.c, + libraries/freetype-2.0.5/ftlru.c, + libraries/freetype-2.0.5/ftmac.c, libraries/freetype-2.0.5/ftmm.c, + libraries/freetype-2.0.5/ftnames.c, + libraries/freetype-2.0.5/ftobjs.c, + libraries/freetype-2.0.5/ftoutln.c, + libraries/freetype-2.0.5/ftraster.c, + libraries/freetype-2.0.5/ftrend1.c, + libraries/freetype-2.0.5/ftsmooth.c, + libraries/freetype-2.0.5/ftstream.c, + libraries/freetype-2.0.5/ftsynth.c, + libraries/freetype-2.0.5/ftsystem.c, + libraries/freetype-2.0.5/fttrigon.c, + libraries/freetype-2.0.5/include, + libraries/freetype-2.0.5/include/Makefile.am, + libraries/freetype-2.0.5/include/ahangles.h, + libraries/freetype-2.0.5/include/aherrors.h, + libraries/freetype-2.0.5/include/ahglobal.h, + libraries/freetype-2.0.5/include/ahglyph.h, + libraries/freetype-2.0.5/include/ahhint.h, + libraries/freetype-2.0.5/include/ahloader.h, + libraries/freetype-2.0.5/include/ahmodule.h, + libraries/freetype-2.0.5/include/ahoptim.h, + libraries/freetype-2.0.5/include/ahtypes.h, + libraries/freetype-2.0.5/include/cffdrivr.h, + libraries/freetype-2.0.5/include/cfferrs.h, + libraries/freetype-2.0.5/include/cffgload.h, + libraries/freetype-2.0.5/include/cffload.h, + libraries/freetype-2.0.5/include/cffobjs.h, + libraries/freetype-2.0.5/include/cffparse.h, + libraries/freetype-2.0.5/include/cfftoken.h, + libraries/freetype-2.0.5/include/ciderrs.h, + libraries/freetype-2.0.5/include/cidgload.h, + libraries/freetype-2.0.5/include/cidload.h, + libraries/freetype-2.0.5/include/cidobjs.h, + libraries/freetype-2.0.5/include/cidparse.h, + libraries/freetype-2.0.5/include/cidriver.h, + libraries/freetype-2.0.5/include/cidtoken.h, + libraries/freetype-2.0.5/include/fnterrs.h, + libraries/freetype-2.0.5/include/freetype, + libraries/freetype-2.0.5/include/freetype/Makefile.am, + libraries/freetype-2.0.5/include/freetype/cache, + libraries/freetype-2.0.5/include/freetype/cache/Makefile.am, + libraries/freetype-2.0.5/include/freetype/cache/ftcchunk.h, + libraries/freetype-2.0.5/include/freetype/cache/ftcglyph.h, + libraries/freetype-2.0.5/include/freetype/cache/ftcimage.h, + libraries/freetype-2.0.5/include/freetype/cache/ftcmanag.h, + libraries/freetype-2.0.5/include/freetype/cache/ftcsbits.h, + libraries/freetype-2.0.5/include/freetype/cache/ftlru.h, + libraries/freetype-2.0.5/include/freetype/config, + libraries/freetype-2.0.5/include/freetype/config/Makefile.am, + libraries/freetype-2.0.5/include/freetype/config/ftconfig.h, + libraries/freetype-2.0.5/include/freetype/config/ftheader.h, + libraries/freetype-2.0.5/include/freetype/config/ftmodule.h, + libraries/freetype-2.0.5/include/freetype/config/ftoption.h, + libraries/freetype-2.0.5/include/freetype/freetype.h, + libraries/freetype-2.0.5/include/freetype/ftbbox.h, + libraries/freetype-2.0.5/include/freetype/ftcache.h, + libraries/freetype-2.0.5/include/freetype/ftchapters.h, + libraries/freetype-2.0.5/include/freetype/fterrors.h, + libraries/freetype-2.0.5/include/freetype/ftglyph.h, + libraries/freetype-2.0.5/include/freetype/ftimage.h, + libraries/freetype-2.0.5/include/freetype/ftlist.h, + libraries/freetype-2.0.5/include/freetype/ftmac.h, + libraries/freetype-2.0.5/include/freetype/ftmm.h, + libraries/freetype-2.0.5/include/freetype/ftmoderr.h, + libraries/freetype-2.0.5/include/freetype/ftmodule.h, + libraries/freetype-2.0.5/include/freetype/ftoutln.h, + libraries/freetype-2.0.5/include/freetype/ftrender.h, + libraries/freetype-2.0.5/include/freetype/ftsizes.h, + libraries/freetype-2.0.5/include/freetype/ftsnames.h, + libraries/freetype-2.0.5/include/freetype/ftsynth.h, + libraries/freetype-2.0.5/include/freetype/ftsystem.h, + libraries/freetype-2.0.5/include/freetype/fttrigon.h, + libraries/freetype-2.0.5/include/freetype/fttypes.h, + libraries/freetype-2.0.5/include/freetype/internal, + libraries/freetype-2.0.5/include/freetype/internal/Makefile.am, + libraries/freetype-2.0.5/include/freetype/internal/autohint.h, + libraries/freetype-2.0.5/include/freetype/internal/cfftypes.h, + libraries/freetype-2.0.5/include/freetype/internal/fnttypes.h, + libraries/freetype-2.0.5/include/freetype/internal/ftcalc.h, + libraries/freetype-2.0.5/include/freetype/internal/ftdebug.h, + libraries/freetype-2.0.5/include/freetype/internal/ftdriver.h, + libraries/freetype-2.0.5/include/freetype/internal/ftextend.h, + libraries/freetype-2.0.5/include/freetype/internal/ftmemory.h, + libraries/freetype-2.0.5/include/freetype/internal/ftobjs.h, + libraries/freetype-2.0.5/include/freetype/internal/ftstream.h, + libraries/freetype-2.0.5/include/freetype/internal/internal.h, + libraries/freetype-2.0.5/include/freetype/internal/pcftypes.h, + libraries/freetype-2.0.5/include/freetype/internal/psaux.h, + libraries/freetype-2.0.5/include/freetype/internal/psnames.h, + libraries/freetype-2.0.5/include/freetype/internal/sfnt.h, + libraries/freetype-2.0.5/include/freetype/internal/t1types.h, + libraries/freetype-2.0.5/include/freetype/internal/tttypes.h, + libraries/freetype-2.0.5/include/freetype/t1tables.h, + libraries/freetype-2.0.5/include/freetype/ttnameid.h, + libraries/freetype-2.0.5/include/freetype/tttables.h, + libraries/freetype-2.0.5/include/freetype/tttags.h, + libraries/freetype-2.0.5/include/ft2build.h, + libraries/freetype-2.0.5/include/ftcerror.h, + libraries/freetype-2.0.5/include/ftgrays.h, + libraries/freetype-2.0.5/include/ftraster.h, + libraries/freetype-2.0.5/include/ftrend1.h, + libraries/freetype-2.0.5/include/ftsmerrs.h, + libraries/freetype-2.0.5/include/ftsmooth.h, + libraries/freetype-2.0.5/include/pcf.h, + libraries/freetype-2.0.5/include/pcfdriver.h, + libraries/freetype-2.0.5/include/pcferror.h, + libraries/freetype-2.0.5/include/pcfutil.h, + libraries/freetype-2.0.5/include/psauxerr.h, + libraries/freetype-2.0.5/include/psauxmod.h, + libraries/freetype-2.0.5/include/psmodule.h, + libraries/freetype-2.0.5/include/psnamerr.h, + libraries/freetype-2.0.5/include/psobjs.h, + libraries/freetype-2.0.5/include/pstables.h, + libraries/freetype-2.0.5/include/rasterrs.h, + libraries/freetype-2.0.5/include/sfdriver.h, + libraries/freetype-2.0.5/include/sferrors.h, + libraries/freetype-2.0.5/include/sfobjs.h, + libraries/freetype-2.0.5/include/t1afm.h, + libraries/freetype-2.0.5/include/t1decode.h, + libraries/freetype-2.0.5/include/t1driver.h, + libraries/freetype-2.0.5/include/t1errors.h, + libraries/freetype-2.0.5/include/t1gload.h, + libraries/freetype-2.0.5/include/t1load.h, + libraries/freetype-2.0.5/include/t1objs.h, + libraries/freetype-2.0.5/include/t1parse.h, + libraries/freetype-2.0.5/include/t1tokens.h, + libraries/freetype-2.0.5/include/ttcmap.h, + libraries/freetype-2.0.5/include/ttdriver.h, + libraries/freetype-2.0.5/include/tterrors.h, + libraries/freetype-2.0.5/include/ttgload.h, + libraries/freetype-2.0.5/include/ttinterp.h, + libraries/freetype-2.0.5/include/ttload.h, + libraries/freetype-2.0.5/include/ttobjs.h, + libraries/freetype-2.0.5/include/ttpload.h, + libraries/freetype-2.0.5/include/ttpost.h, + libraries/freetype-2.0.5/include/ttsbit.h, + libraries/freetype-2.0.5/include/winfnt.h, + libraries/freetype-2.0.5/license.txt, + libraries/freetype-2.0.5/pcf.c, + libraries/freetype-2.0.5/pcfdriver.c, + libraries/freetype-2.0.5/pcfread.c, + libraries/freetype-2.0.5/pcfutil.c, + libraries/freetype-2.0.5/psaux.c, + libraries/freetype-2.0.5/psauxmod.c, + libraries/freetype-2.0.5/psmodule.c, + libraries/freetype-2.0.5/psnames.c, + libraries/freetype-2.0.5/psobjs.c, + libraries/freetype-2.0.5/raster.c, + libraries/freetype-2.0.5/sfdriver.c, + libraries/freetype-2.0.5/sfnt.c, + libraries/freetype-2.0.5/sfobjs.c, + libraries/freetype-2.0.5/smooth.c, + libraries/freetype-2.0.5/t1afm.c, + libraries/freetype-2.0.5/t1decode.c, + libraries/freetype-2.0.5/t1driver.c, + libraries/freetype-2.0.5/t1gload.c, + libraries/freetype-2.0.5/t1load.c, + libraries/freetype-2.0.5/t1objs.c, + libraries/freetype-2.0.5/t1parse.c, + libraries/freetype-2.0.5/test_bbox.c, + libraries/freetype-2.0.5/test_trig.c, + libraries/freetype-2.0.5/truetype.c, + libraries/freetype-2.0.5/ttcmap.c, + libraries/freetype-2.0.5/ttdriver.c, + libraries/freetype-2.0.5/ttgload.c, + libraries/freetype-2.0.5/ttinterp.c, + libraries/freetype-2.0.5/ttload.c, + libraries/freetype-2.0.5/ttobjs.c, + libraries/freetype-2.0.5/ttpload.c, + libraries/freetype-2.0.5/ttpost.c, + libraries/freetype-2.0.5/ttsbit.c, + libraries/freetype-2.0.5/type1.c, + libraries/freetype-2.0.5/type1cid.c, + libraries/freetype-2.0.5/winfnt.c, libraries/libart_lgpl-2.3.7, + libraries/libart_lgpl-2.3.7/AUTHORS, + libraries/libart_lgpl-2.3.7/COPYING, + libraries/libart_lgpl-2.3.7/ChangeLog, + libraries/libart_lgpl-2.3.7/INSTALL, + libraries/libart_lgpl-2.3.7/Makefile, + libraries/libart_lgpl-2.3.7/Makefile.am, + libraries/libart_lgpl-2.3.7/Makefile.in, + libraries/libart_lgpl-2.3.7/NEWS, + libraries/libart_lgpl-2.3.7/README, + libraries/libart_lgpl-2.3.7/art_affine.c, + libraries/libart_lgpl-2.3.7/art_affine.h, + libraries/libart_lgpl-2.3.7/art_alphagamma.c, + libraries/libart_lgpl-2.3.7/art_alphagamma.h, + libraries/libart_lgpl-2.3.7/art_bpath.c, + libraries/libart_lgpl-2.3.7/art_bpath.h, + libraries/libart_lgpl-2.3.7/art_config.h, + libraries/libart_lgpl-2.3.7/art_filterlevel.h, + libraries/libart_lgpl-2.3.7/art_gray_svp.c, + libraries/libart_lgpl-2.3.7/art_gray_svp.h, + libraries/libart_lgpl-2.3.7/art_misc.c, + libraries/libart_lgpl-2.3.7/art_misc.h, + libraries/libart_lgpl-2.3.7/art_pathcode.h, + libraries/libart_lgpl-2.3.7/art_pixbuf.c, + libraries/libart_lgpl-2.3.7/art_pixbuf.h, + libraries/libart_lgpl-2.3.7/art_point.h, + libraries/libart_lgpl-2.3.7/art_rect.c, + libraries/libart_lgpl-2.3.7/art_rect.h, + libraries/libart_lgpl-2.3.7/art_rect_svp.c, + libraries/libart_lgpl-2.3.7/art_rect_svp.h, + libraries/libart_lgpl-2.3.7/art_rect_uta.c, + libraries/libart_lgpl-2.3.7/art_rect_uta.h, + libraries/libart_lgpl-2.3.7/art_render.c, + libraries/libart_lgpl-2.3.7/art_render.h, + libraries/libart_lgpl-2.3.7/art_render_gradient.c, + libraries/libart_lgpl-2.3.7/art_render_gradient.h, + libraries/libart_lgpl-2.3.7/art_render_svp.c, + libraries/libart_lgpl-2.3.7/art_render_svp.h, + libraries/libart_lgpl-2.3.7/art_rgb.c, + libraries/libart_lgpl-2.3.7/art_rgb.h, + libraries/libart_lgpl-2.3.7/art_rgb_a_affine.c, + libraries/libart_lgpl-2.3.7/art_rgb_a_affine.h, + libraries/libart_lgpl-2.3.7/art_rgb_affine.c, + libraries/libart_lgpl-2.3.7/art_rgb_affine.h, + libraries/libart_lgpl-2.3.7/art_rgb_affine_private.c, + libraries/libart_lgpl-2.3.7/art_rgb_affine_private.h, + libraries/libart_lgpl-2.3.7/art_rgb_bitmap_affine.c, + libraries/libart_lgpl-2.3.7/art_rgb_bitmap_affine.h, + libraries/libart_lgpl-2.3.7/art_rgb_pixbuf_affine.c, + libraries/libart_lgpl-2.3.7/art_rgb_pixbuf_affine.h, + libraries/libart_lgpl-2.3.7/art_rgb_rgba_affine.c, + libraries/libart_lgpl-2.3.7/art_rgb_rgba_affine.h, + libraries/libart_lgpl-2.3.7/art_rgb_svp.c, + libraries/libart_lgpl-2.3.7/art_rgb_svp.h, + libraries/libart_lgpl-2.3.7/art_rgba.c, + libraries/libart_lgpl-2.3.7/art_rgba.h, + libraries/libart_lgpl-2.3.7/art_svp.c, + libraries/libart_lgpl-2.3.7/art_svp.h, + libraries/libart_lgpl-2.3.7/art_svp_intersect.c, + libraries/libart_lgpl-2.3.7/art_svp_intersect.h, + libraries/libart_lgpl-2.3.7/art_svp_ops.c, + libraries/libart_lgpl-2.3.7/art_svp_ops.h, + libraries/libart_lgpl-2.3.7/art_svp_point.c, + libraries/libart_lgpl-2.3.7/art_svp_point.h, + libraries/libart_lgpl-2.3.7/art_svp_render_aa.c, + libraries/libart_lgpl-2.3.7/art_svp_render_aa.h, + libraries/libart_lgpl-2.3.7/art_svp_vpath.c, + libraries/libart_lgpl-2.3.7/art_svp_vpath.h, + libraries/libart_lgpl-2.3.7/art_svp_vpath_stroke.c, + libraries/libart_lgpl-2.3.7/art_svp_vpath_stroke.h, + libraries/libart_lgpl-2.3.7/art_svp_wind.c, + libraries/libart_lgpl-2.3.7/art_svp_wind.h, + libraries/libart_lgpl-2.3.7/art_uta.c, + libraries/libart_lgpl-2.3.7/art_uta.h, + libraries/libart_lgpl-2.3.7/art_uta_ops.c, + libraries/libart_lgpl-2.3.7/art_uta_ops.h, + libraries/libart_lgpl-2.3.7/art_uta_rect.c, + libraries/libart_lgpl-2.3.7/art_uta_rect.h, + libraries/libart_lgpl-2.3.7/art_uta_svp.c, + libraries/libart_lgpl-2.3.7/art_uta_svp.h, + libraries/libart_lgpl-2.3.7/art_uta_vpath.c, + libraries/libart_lgpl-2.3.7/art_uta_vpath.h, + libraries/libart_lgpl-2.3.7/art_vpath.c, + libraries/libart_lgpl-2.3.7/art_vpath.h, + libraries/libart_lgpl-2.3.7/art_vpath_bpath.c, + libraries/libart_lgpl-2.3.7/art_vpath_bpath.h, + libraries/libart_lgpl-2.3.7/art_vpath_dash.c, + libraries/libart_lgpl-2.3.7/art_vpath_dash.h, + libraries/libart_lgpl-2.3.7/art_vpath_svp.c, + libraries/libart_lgpl-2.3.7/art_vpath_svp.h, + libraries/libart_lgpl-2.3.7/gen_art_config.c, + libraries/libart_lgpl-2.3.7/install-sh, + libraries/libart_lgpl-2.3.7/libart-2.0.pc.in, + libraries/libart_lgpl-2.3.7/libart-config.in, + libraries/libart_lgpl-2.3.7/libart-features.c, + libraries/libart_lgpl-2.3.7/libart-features.h, + libraries/libart_lgpl-2.3.7/libart-features.h.in, + libraries/libart_lgpl-2.3.7/libart.h, + libraries/libart_lgpl-2.3.7/libart_lgpl_2.la, + libraries/libart_lgpl-2.3.7/missing, + libraries/libart_lgpl-2.3.7/mkinstalldirs, + libraries/libart_lgpl-2.3.7/stamp-h.in, + libraries/libart_lgpl-2.3.7/testart.c, + libraries/libart_lgpl-2.3.7/testuta.c, libraries/libpng-1.2.0, + libraries/libpng-1.2.0-import.txt, + libraries/libpng-1.2.0/ANNOUNCE, libraries/libpng-1.2.0/CHANGES, + libraries/libpng-1.2.0/INSTALL, libraries/libpng-1.2.0/KNOWNBUG, + libraries/libpng-1.2.0/LICENSE, libraries/libpng-1.2.0/Makefile, + libraries/libpng-1.2.0/Makefile.am, + libraries/libpng-1.2.0/Makefile.in, libraries/libpng-1.2.0/README, + libraries/libpng-1.2.0/TODO, libraries/libpng-1.2.0/Y2KINFO, + libraries/libpng-1.2.0/example.c, libraries/libpng-1.2.0/libpng.3, + libraries/libpng-1.2.0/libpng.txt, + libraries/libpng-1.2.0/libpngpf.3, libraries/libpng-1.2.0/png.5, + libraries/libpng-1.2.0/png.c, libraries/libpng-1.2.0/png.h, + libraries/libpng-1.2.0/pngasmrd.h, + libraries/libpng-1.2.0/pngbar.jpg, + libraries/libpng-1.2.0/pngbar.png, + libraries/libpng-1.2.0/pngconf.h, + libraries/libpng-1.2.0/pngerror.c, + libraries/libpng-1.2.0/pnggccrd.c, + libraries/libpng-1.2.0/pngget.c, libraries/libpng-1.2.0/pngmem.c, + libraries/libpng-1.2.0/pngnow.png, + libraries/libpng-1.2.0/pngpread.c, + libraries/libpng-1.2.0/pngread.c, libraries/libpng-1.2.0/pngrio.c, + libraries/libpng-1.2.0/pngrtran.c, + libraries/libpng-1.2.0/pngrutil.c, + libraries/libpng-1.2.0/pngset.c, libraries/libpng-1.2.0/pngtest.c, + libraries/libpng-1.2.0/pngtest.png, + libraries/libpng-1.2.0/pngtrans.c, + libraries/libpng-1.2.0/pngvcrd.c, libraries/libpng-1.2.0/pngwio.c, + libraries/libpng-1.2.0/pngwrite.c, + libraries/libpng-1.2.0/pngwtran.c, + libraries/libpng-1.2.0/pngwutil.c, src/Makefile.am, + src/rrd_format.h, src/rrd_gfx.c, src/rrd_gfx.h, src/rrd_graph.c, + src/rrd_graph.h, src/rrd_tool.c, src/rrd_tool.h: The BIG graph + update * Replace libgd with libart * Added freetype * Updated zlib + and libpng * rrd_gfx.c intrduced as libart wrapper * LINE takes + now a float as argument * rrdtool uses truetype for fonts * thanks + to libart there is now full alpha transparenc and antialiasing. * + the new option --font lets customize the font and size for various + graph elements * Updated to -> libtool 1.4.2 automake 2.12 + autoconf 2.52 * new --zoom commandline option for zoom ans + shrinking -- tobias oetiker + +2002-01-04 01:11 alex + + * src/rrd_graph.c, src/rrd_graph.h: Reworked rrd_graph_script() + +2001-12-24 06:51 alex + + * src/rrd_fetch.c, src/rrd_graph.c, src/rrd_graph.h, src/rrd_tool.c: + A patch of size 44Kbytes... in short: Found and repaired the + off-by-one error in rrd_fetch_fn(). As a result I had to remove + the hacks in rrd_fetch_fn(), rrd_tool.c, vdef_calc(), data_calc(), + data_proc() and reduce_data(). There may be other places which I + didn't find so be careful. Enhanced debugging in rrd_fetch_fn(), + it shows the RRA selection process. Added the ability to print + VDEF timestamps. At the moment it is a hack, I needed it now to + fix the off-by-one error. If the format string is "%c" (and + nothing else!), the time will be printed by both ctime() and as a + long int. Moved some code around (slightly altering it) from + rrd_graph() initializing now in rrd_graph_init() options parsing + now in rrd_graph_options() script parsing now in + rrd_graph_script() + +2001-12-22 02:49 alex + + * src/rrd_graph.c: Somehow eight lines were missing from function + rrd_graph(). Also fixed minor bug in vdef_calc(). + +2001-12-17 12:48 oetiker + + * src/rrd_fetch.c: fix overflow error ... + +2001-12-11 22:55 jake + + * src/rrd_info.c: Fixed uninitialized ptr causing seg fault invoking + info for COMPUTE data sources. + +2001-11-18 08:41 oetiker + + * src/rrd_cgi.c: return "" instead of NULL for -- Michael + +2001-11-17 16:57 oetiker + + * bindings/Makefile.am: fixed path to mkinstalldirs -- Laurent + Saehyun Kim� + +2001-09-08 18:25 oetiker + + * doc/cdeftutorial.pod, doc/rrdtutorial.pod: spelling updates by + Martin Schulze + +2001-08-22 22:29 jake + + * doc/rrdtune.pod, src/rrd_create.c, src/rrd_hw.c, src/rrd_hw.h, + src/rrd_rpncalc.c, src/rrd_tool.c, src/rrd_tune.c: Contents of + this patch: (1) Adds/revises documentation for rrd tune in + rrd_tool.c and pod files. (2) Moves some initialization code from + rrd_create.c to rrd_hw.c. (3) Adds another pass to smoothing for + SEASONAL and DEVSEASONAL RRAs. This pass computes the coefficients + as deviations from an average; the average is added the baseline + coefficient of HWPREDICT. Statistical texts suggest this to + preserve algorithm stability. It will not invalidate RRD files + created and smoothed with the old code. (4) Adds the + aberrant-reset flag to rrd tune. This operation, which is + specified for a single data source, causes the holt-winters + algorithm to forget everthing it has learned and start over. (5) + Fixes a few out-of-date code comments. + +2001-08-13 18:58 oetiker + + * src/rrd_graph.c: spell fix for si units (only in comments) + +2001-07-28 22:34 alex + + * doc/rrdgraph.pod, doc/rrdgraph_data.pod, + doc/rrdgraph_examples.pod, doc/rrdgraph_graph.pod, + doc/rrdgraph_rpn.pod: Removing rrdgraph*.pod from the cvs + +2001-07-28 22:21 alex + + * doc/Makefile.am, doc/name.inc, doc/rrdgraph.pod, + doc/rrdgraph_graph.src, doc/rrdgraph_rpn.src: Edited Makefile.am + and the rrdgraph_*.src files. By mistake the previous update was + made on the rrdgraph_*.pod files however they are not to be + edited. This is now corrected. + +2001-07-26 02:27 alex + + * src/rrd_graph_helper.c, src/rrd_graph_helper.h: Supporting + functions for rrd_graph. Functions that are used frequently and/or + from different places should be added here in stead of repeating + them in rrd_graph.c over and over again. + +2001-07-26 02:25 alex + + * src/rrd_graph.h: Moved most typedefs etc. from rrd_graph.c to this + file + +2001-07-26 02:22 alex + + * src/rrd_graph.c: Added VDEF TOTAL Moved most typedefs etc. to + rrd_graph.h + +2001-07-26 02:19 alex + + * src/Makefile.am: Added rrd_graph_helper + +2001-07-26 02:15 alex + + * doc/rrdgraph_rpn.pod: Updated for VDEF TOTAL + +2001-07-26 02:11 alex + + * NEWS: Announce of VDEF in rrd_graph + +2001-07-21 18:17 alex + + * doc/rrdgraph_graph.pod, src/rrd_graph.c: Made PRINT and GPRINT + aware of VDEF statements + +2001-07-20 22:34 oetiker + + * doc/rrdgraph_data.pod, doc/rrdgraph_examples.pod, + doc/rrdgraph_graph.pod, doc/rrdgraph_rpn.pod: missing + documentation ... -- Alex van den Bogaerdt + + +2001-07-20 22:34 oetiker + + * src/rrd_datalang.c: only a comment + +2001-07-20 22:33 oetiker + + * src/rrd_graph.c: small fixes -- Alex van den Bogaerdt + + +2001-07-18 22:30 oetiker + + * src/rrd_graph.c, src/rrd_rpncalc.c: VDEF and VRULE are comig along + -- Alex van den Bogaerdt + +2001-06-05 13:42 oetiker + + * doc/rrdupdate.pod: spell fix + +2001-05-09 05:31 oetiker + + * NEWS, doc/rrdcreate.pod, src/rrd_update.c: Bug fix: when update of + multiple PDP/CDP RRAs coincided with interpolation of multiple + PDPs an incorrect value was stored as the CDP. Especially evident + for GAUGE data sources. Minor changes to rrdcreate.pod. -- Jake + Brutlag + +2001-03-31 15:21 oetiker + + * Makefile.am: added 'all' dependancy to site-perl-install rule as + many seem to skip this step when instaling cricket ... probably an + incomplete cricket doku. + +2001-03-15 19:43 oetiker + + * PROJECTS: added PROJECTS file + +2001-03-11 12:03 oetiker + + * src/rrd_rpncalc.c, src/rrd_rpncalc.h: reindented + +2001-03-11 11:49 oetiker + + * src/rrd_create.c: reindented the cource for better readability + +2001-03-10 23:54 oetiker + + * NEWS, doc/rrdcreate.pod, doc/rrdinfo.pod, doc/rrdtune.pod, + doc/rrdupdate.pod, src/Makefile.am, src/rrd_create.c, + src/rrd_dump.c, src/rrd_format.c, src/rrd_format.h, + src/rrd_graph.c, src/rrd_hw.c, src/rrd_hw.h, src/rrd_info.c, + src/rrd_restore.c, src/rrd_rpncalc.c, src/rrd_rpncalc.h, + src/rrd_tool.h, src/rrd_update.c: Support for COMPUTE data sources + (CDEF data sources). Removes the RPN parser and calculator from + rrd_graph and puts then in a new file, rrd_rpncalc.c. Changes to + core files rrd_create and rrd_update. Some clean-up of aberrant + behavior stuff, including a bug fix. Documentation update + (rrdcreate.pod, rrdupdate.pod). Change xml format. -- Jake Brutlag + + +2001-03-07 21:21 oetiker + + * NEWS, doc, doc/.cvsignore, doc/Makefile.am, doc/name.inc, + doc/rrdgraph-old.pod, doc/rrdgraph.pod, doc/rrdgraph.src, + doc/rrdgraph_data.src, doc/rrdgraph_examples.src, + doc/rrdgraph_graph.src, doc/rrdgraph_rpn.src, doc/see_also.inc, + src/rrd_tune.c: complete rewrite of rrdgraph documentation. This + also includs info on upcomming/planned changes to the rrdgraph + interface and functionality -- Alex van den Bogaerdt + + +2001-03-04 14:06 oetiker + + * trunk/CVSROOT/history: want to keep a history of events + +2001-03-04 13:50 oetiker + + * NEWS: fidex jackes adderss + +2001-03-04 13:12 oetiker + + * doc/rrdcreate.pod: added note on counter vs derive -- Don BAARDA + + +2001-03-04 13:01 oetiker + + * NEWS, doc/rrdcreate.pod, doc/rrdgraph.pod, doc/rrdtool.pod, + doc/rrdtune.pod, src/Makefile.am, src/fnv.h, src/hash_32.c, + src/rrd_create.c, src/rrd_dump.c, src/rrd_format.h, + src/rrd_graph.c, src/rrd_hw.c, src/rrd_info.c, src/rrd_open.c, + src/rrd_restore.c, src/rrd_tool.h, src/rrd_tune.c, + src/rrd_update.c, src/rrdupdate.c: Aberrant Behavior Detection + support. A brief overview added to rrdtool.pod. Major updates to + rrd_update.c, rrd_create.c. Minor update to other core files. This + is backwards compatible! But new files using the Aberrant stuff + are not readable by old rrdtool versions. See + http://cricket.sourceforge.net/aberrant/rrd_hw.htm -- Jake Brutlag + + +2001-03-04 13:00 oetiker + + * examples, examples/.cvsignore: another do not report Makefile and + Makefile.in + +2001-03-04 12:51 oetiker + + * src/memtest.c: this file has no purpose + +2001-03-04 12:32 oetiker + + * src/rrdupdate.c: rrdupdate is a generated file it has no place in + cvs + +2001-03-04 11:31 oetiker + + * ., .cvsignore, CHANGES, bindings, bindings/.cvsignore, + bindings/perl-piped, bindings/perl-piped/.cvsignore, + bindings/perl-shared, bindings/perl-shared/.cvsignore, + bindings/tcl, bindings/tcl/.cvsignore, config, config.log, + config.status, config/.cvsignore, doc, doc/.cvsignore, libraries, + libraries/.cvsignore, libraries/cgilib-0.4, + libraries/cgilib-0.4/.cvsignore, libraries/gd1.3, + libraries/gd1.3/.cvsignore, libraries/libpng-1.0.9, + libraries/libpng-1.0.9/.cvsignore, libraries/zlib-1.1.3, + libraries/zlib-1.1.3/.cvsignore, libtool, src, src/.cvsignore: + repository cleanup + +2001-03-04 11:14 oetiker + + * doc/rrdupdate.pod, src/rrd_tool.c, src/rrd_update.c: added + at-style-time@value:value syntax to rrd_update -- Dave Bodenstab + + +2001-03-04 10:29 oetiker + + * src/rrd_open.c: fixed filedescriptor leak -- Mike Franusich + + +2001-03-02 22:48 oetiker + + * configure.in, libraries/zlib-1.1.3/Makefile.am: added test for + hpux. if matched, compile zlib with -fpic instead of -fPIC + +2001-03-01 21:37 oetiker + + * configure.in: added check for the presence of the compiler used to + build perl modules + +2001-02-25 23:18 oetiker + + * config/config.h, configure, doc/test1.ps, doc/test2.ps: they do + not belong into cvs ad they are autogenerated + +2001-02-25 22:57 oetiker + + * doc/Makefile.am: Fixed ln for modules + +2001-02-25 22:53 oetiker + + * Makefile.am: fixed compile order ... src before bindings + +2001-02-25 22:30 oetiker + + * trunk/contrib, trunk/contrib/README, trunk/contrib/add_ds, + trunk/contrib/add_ds/README, trunk/contrib/add_ds/add_ds.pl, + trunk/contrib/add_ds/batch.pl, trunk/contrib/killspike, + trunk/contrib/killspike/README, + trunk/contrib/killspike/killspike.pl, + trunk/contrib/killspike/killspike.pl.in, trunk/contrib/log2rrd, + trunk/contrib/log2rrd/README, trunk/contrib/log2rrd/log2rrd.pl, + trunk/contrib/log2rrd/log2rrd.pl.in, trunk/contrib/php3, + trunk/contrib/php3/INSTALL, trunk/contrib/php3/Makefile, + trunk/contrib/php3/README, trunk/contrib/php3/USAGE, + trunk/contrib/php3/VERSION, trunk/contrib/php3/examples, + trunk/contrib/php3/examples/rrd_create.php, + trunk/contrib/php3/examples/rrd_fetch.php, + trunk/contrib/php3/examples/rrd_graph.php, + trunk/contrib/php3/examples/rrd_last.php, + trunk/contrib/php3/examples/rrd_update.php, + trunk/contrib/php3/php3_rrdtool.c, + trunk/contrib/php3/php3_rrdtool.h, trunk/contrib/php4, + trunk/contrib/php4/.cvsignore, trunk/contrib/php4/INSTALL, + trunk/contrib/php4/Makefile.in, trunk/contrib/php4/README, + trunk/contrib/php4/USAGE, trunk/contrib/php4/acinclude.m4, + trunk/contrib/php4/aclocal.m4, trunk/contrib/php4/build, + trunk/contrib/php4/build/dynlib.mk, + trunk/contrib/php4/build/fastgen.sh, + trunk/contrib/php4/build/library.mk, + trunk/contrib/php4/build/ltlib.mk, + trunk/contrib/php4/build/program.mk, + trunk/contrib/php4/build/rules.mk, + trunk/contrib/php4/build/shtool, trunk/contrib/php4/config.guess, + trunk/contrib/php4/config.m4, trunk/contrib/php4/config.sub, + trunk/contrib/php4/configure, trunk/contrib/php4/configure.in, + trunk/contrib/php4/dynlib.m4, trunk/contrib/php4/examples, + trunk/contrib/php4/examples/rrd_create.php, + trunk/contrib/php4/examples/rrd_fetch.php, + trunk/contrib/php4/examples/rrd_graph.php, + trunk/contrib/php4/examples/rrd_last.php, + trunk/contrib/php4/examples/rrd_update.php, + trunk/contrib/php4/install-sh, trunk/contrib/php4/ltconfig, + trunk/contrib/php4/ltmain.sh, trunk/contrib/php4/missing, + trunk/contrib/php4/mkinstalldirs, + trunk/contrib/php4/php_config.h.in, + trunk/contrib/php4/php_rrdtool.h, trunk/contrib/php4/rrdtool.c, + trunk/contrib/rrd-file-icon, trunk/contrib/rrd-file-icon/README, + trunk/contrib/rrd-file-icon/rrd.png, trunk/contrib/rrdexplorer, + trunk/contrib/rrdexplorer/README.txt, + trunk/contrib/rrdexplorer/map.cgi, + trunk/contrib/rrdexplorer/png.cgi, trunk/contrib/rrdfetchnames, + trunk/contrib/rrdfetchnames/README, + trunk/contrib/rrdfetchnames/rrdfetchnames.pl, + trunk/contrib/rrdlastds, trunk/contrib/rrdlastds/README, + trunk/contrib/rrdlastds/rrdlastds.pl, trunk/contrib/rrdproc, + trunk/contrib/rrdproc/README, trunk/contrib/rrdproc/rrdproc.c, + trunk/contrib/rrdview, trunk/contrib/rrdview/README, + trunk/contrib/rrdview/rrdview.cgi, trunk/contrib/snmpstats, + trunk/contrib/snmpstats/README, + trunk/contrib/snmpstats/SNMPstats.pl, trunk/contrib/trytime, + trunk/contrib/trytime/.deps, + trunk/contrib/trytime/.deps/trytime.P, + trunk/contrib/trytime/Makefile, trunk/contrib/trytime/Makefile.am, + trunk/contrib/trytime/Makefile.in, trunk/contrib/trytime/README, + trunk/contrib/trytime/trytime.c, trunk/website, + trunk/website/.img, trunk/website/.img/.imgdot-1x1-transp.gif, + trunk/website/.pics, trunk/website/.pics/CAIDAlogo.120.gif, + trunk/website/.pics/CAIDAlogo.120.png, + trunk/website/.pics/CAIDAlogo.gif, + trunk/website/.pics/CAIDAlogo.png, + trunk/website/.pics/CAIDAlogo.spons.png, + trunk/website/.pics/CAIDAlogo.xpm, + trunk/website/.pics/CAIDAlogo2.gif, + trunk/website/.pics/CAIDAlogo_small.gif, + trunk/website/.pics/b.gif, trunk/website/.pics/b.png, + trunk/website/.pics/background.xcf, trunk/website/.pics/bbo.gif, + trunk/website/.pics/bbo.png, trunk/website/.pics/bco.gif, + trunk/website/.pics/bco.png, trunk/website/.pics/border.gif, + trunk/website/.pics/bro.gif, trunk/website/.pics/bro.png, + trunk/website/.pics/ecke.gif, trunk/website/.pics/logo-apache.gif, + trunk/website/.pics/logo-apache.small.gif, + trunk/website/.pics/logo-extra.gif, + trunk/website/.pics/logo-linux.gif, + trunk/website/.pics/logo-wml.gif, trunk/website/.pics/rrddemo.gif, + trunk/website/.pics/rrdlogdemo.gif, + trunk/website/.pics/rrdtool.gif, trunk/website/.pics/rrdtool.xar, + trunk/website/.pics/unten.gif, trunk/website/.ttf, + trunk/website/.ttf/futurab.ttf, trunk/website/.ttf/futurabc.ttf, + trunk/website/.ttf/futurabi.ttf, trunk/website/.ttf/futurah.ttf, + trunk/website/.ttf/futurahi.ttf, trunk/website/.ttf/futurak.ttf, + trunk/website/.ttf/futural.ttf, trunk/website/.ttf/futuralc.ttf, + trunk/website/.ttf/futurali.ttf, trunk/website/.ttf/futuram.ttf, + trunk/website/.ttf/futuramc.ttf, trunk/website/.ttf/futurami.ttf, + trunk/website/.ttf/futuran.ttf, trunk/website/.ttf/futurani.ttf, + trunk/website/.ttf/futuraxk.ttf, trunk/website/.ttf/futurbci.ttf, + trunk/website/.ttf/futurlci.ttf, trunk/website/.ttf/futurmci.ttf, + trunk/website/.ttf/futurxkc.ttf, trunk/website/.ttf/futurxki.ttf, + trunk/website/.ttf/futuxkci.ttf, trunk/website/.ttf/trebuc.ttf, + trunk/website/.ttf/trebucbd.ttf, trunk/website/.ttf/trebucbi.ttf, + trunk/website/.ttf/trebucit.ttf, trunk/website/.ttf/zinjaron.ttf, + trunk/website/.wml, trunk/website/.wml/navbar.inc, + trunk/website/.wml/nestednavbar.inc, + trunk/website/.wml/template.inc, trunk/website/.wml/tobis.inc, + trunk/website/.wmlrc, trunk/website/compiling.wml, + trunk/website/contributors.wml, trunk/website/developers.wml, + trunk/website/download.wml, trunk/website/frontends, + trunk/website/frontends/bigsister.wml, + trunk/website/frontends/bronc.wml, + trunk/website/frontends/cricket.wml, + trunk/website/frontends/flowscan.wml, + trunk/website/frontends/fwgold.wml, + trunk/website/frontends/hoth.wml, + trunk/website/frontends/index.wml, + trunk/website/frontends/nmis.wml, trunk/website/frontends/nrg.wml, + trunk/website/frontends/ntop.wml, + trunk/website/frontends/orca.wml, + trunk/website/frontends/remstats.wml, + trunk/website/frontends/rrgrapher.wml, + trunk/website/frontends/slamon.wml, trunk/website/gallery, + trunk/website/gallery/alex-01.bash, + trunk/website/gallery/alex-01.png, + trunk/website/gallery/alex-01.wml, + trunk/website/gallery/bkw-01.gif, trunk/website/gallery/bkw-01.pl, + trunk/website/gallery/bkw-01.wml, + trunk/website/gallery/blair-01-a.png, + trunk/website/gallery/blair-01-b.png, + trunk/website/gallery/blair-01-c.png, + trunk/website/gallery/blair-01-d.png, + trunk/website/gallery/blair-01-e.png, + trunk/website/gallery/blair-01-f.png, + trunk/website/gallery/blair-01.wml, + trunk/website/gallery/chris-01.wml, + trunk/website/gallery/chris-01temp.png, + trunk/website/gallery/chris-01wind.png, + trunk/website/gallery/colleen-01.gif, + trunk/website/gallery/colleen-01.wml, + trunk/website/gallery/edvard-01.png, + trunk/website/gallery/edvard-01.wml, + trunk/website/gallery/index.wml, + trunk/website/gallery/jeff-01.png, + trunk/website/gallery/jeff-01.wml, + trunk/website/gallery/neal-01.png, + trunk/website/gallery/neal-01.wml, + trunk/website/gallery/simon-01.png, + trunk/website/gallery/simon-01.wml, + trunk/website/gallery/steve-01.gif, + trunk/website/gallery/steve-01.wml, trunk/website/index.wml, + trunk/website/license.wml, trunk/website/mailinglists.wml, + trunk/website/manual, trunk/website/manual/bin_dec_hex.wml, + trunk/website/manual/cdeftutorial.wml, + trunk/website/manual/index.wml, + trunk/website/manual/rpntutorial.wml, + trunk/website/manual/rrdcgi.wml, + trunk/website/manual/rrdcreate.wml, + trunk/website/manual/rrddump.wml, + trunk/website/manual/rrdfetch.wml, + trunk/website/manual/rrdgraph.wml, + trunk/website/manual/rrdinfo.wml, + trunk/website/manual/rrdlast.wml, + trunk/website/manual/rrdresize.wml, + trunk/website/manual/rrdrestore.wml, + trunk/website/manual/rrdtune.wml, + trunk/website/manual/rrdtutorial.es.wml, + trunk/website/manual/rrdtutorial.wml, + trunk/website/manual/rrdupdate.wml, trunk/website/news.wml, + trunk/website/perlbind, trunk/website/perlbind/RRDp.wml, + trunk/website/perlbind/RRDs.wml, trunk/website/perlbind/index.wml, + trunk/website/rrdcgi.wml, trunk/website/screen.wml, + trunk/website/site-sync, trunk/website/tutorial, + trunk/website/tutorial/bin_dec_hex.wml, + trunk/website/tutorial/cdeftutorial.wml, + trunk/website/tutorial/index.wml, + trunk/website/tutorial/rpntutorial.wml, + trunk/website/tutorial/rrdtutorial.es.wml, + trunk/website/tutorial/rrdtutorial.ps, + trunk/website/tutorial/rrdtutorial.wml: Initial revision + +2001-02-25 22:25 oetiker + + * ., 00README, CHANGES, CONTRIBUTORS, COPYING, COPYRIGHT, + MakeMakefile, Makefile.am, NT-BUILD-TIPS.txt, README, TODO, + bindings, bindings/Makefile.am, bindings/perl-piped, + bindings/perl-piped/MANIFEST, bindings/perl-piped/Makefile.PL, + bindings/perl-piped/README, bindings/perl-piped/RRDp.pm, + bindings/perl-piped/leaktest.pl, bindings/perl-piped/rrdpl.dsp, + bindings/perl-piped/rrdpl.dsw, bindings/perl-piped/t, + bindings/perl-piped/t/base.t, bindings/perl-shared, + bindings/perl-shared/MANIFEST, bindings/perl-shared/Makefile.PL, + bindings/perl-shared/README, bindings/perl-shared/RRDs.pm, + bindings/perl-shared/RRDs.xs, bindings/perl-shared/ntmake.pl, + bindings/perl-shared/rrdpl.dsp, bindings/perl-shared/rrdpl.dsw, + bindings/perl-shared/t, bindings/perl-shared/t/base.t, + bindings/tcl, bindings/tcl/Makefile.am, bindings/tcl/README, + bindings/tcl/ifOctets.tcl, bindings/tcl/tclrrd.c, config, + config.log, config.status, config/Makefile.am, config/acconfig.h, + config/aclocal.m4, config/config.guess, config/config.h, + config/config.h.in, config/config.sub, config/install-sh, + config/libtool, config/libtool/libtool.m4, config/ltconfig, + config/ltmain.sh, config/missing, config/mkinstalldirs, + config/stamp-h, config/stamp-h.in, configure, configure.in, doc, + doc/Makefile.am, doc/bin_dec_hex.pod, doc/cdeftutorial.pod, + doc/rpntutorial.pod, doc/rrdcgi.pod, doc/rrdcreate.pod, + doc/rrddump.pod, doc/rrdfetch.pod, doc/rrdgraph.pod, + doc/rrdinfo.pod, doc/rrdlast.pod, doc/rrdresize.pod, + doc/rrdrestore.pod, doc/rrdtool.pod, doc/rrdtune.pod, + doc/rrdtutorial.es.pod, doc/rrdtutorial.pod, doc/rrdupdate.pod, + doc/test1.ps, doc/test2.ps, examples, examples/4charts.pl.in, + examples/Makefile.am, examples/bigtops.pl, examples/bigtops.pl.in, + examples/cgi-demo.cgi, examples/cgi-demo.cgi.in, + examples/minmax.pl, examples/minmax.pl.in, examples/piped-demo.pl, + examples/piped-demo.pl.in, examples/shared-demo.pl, + examples/shared-demo.pl.in, examples/stripes.pl, + examples/stripes.pl.in, libraries, libraries/Makefile.am, + libraries/cgilib-0.4, libraries/cgilib-0.4/Makefile.am, + libraries/cgilib-0.4/cgi.5, libraries/cgilib-0.4/cgi.c, + libraries/cgilib-0.4/cgi.h, libraries/cgilib-0.4/cgiDebug.3, + libraries/cgilib-0.4/cgiGetValue.3, + libraries/cgilib-0.4/cgiHeader.3, libraries/cgilib-0.4/cgiInit.3, + libraries/cgilib-0.4/cgiRedirect.3, + libraries/cgilib-0.4/cgilib.dsp, libraries/cgilib-0.4/cgilib.dsw, + libraries/cgilib-0.4/cgitest.c, libraries/cgilib-0.4/jumpto.c, + libraries/cgilib-0.4/readme, libraries/gd1.3, + libraries/gd1.3/Makefile.am, libraries/gd1.3/README.rrdtool, + libraries/gd1.3/demoin.gif, libraries/gd1.3/gd.c, + libraries/gd1.3/gd.dsp, libraries/gd1.3/gd.dsw, + libraries/gd1.3/gd.h, libraries/gd1.3/gddemo.c, + libraries/gd1.3/gdfontg.c, libraries/gd1.3/gdfontg.h, + libraries/gd1.3/gdfontl.c, libraries/gd1.3/gdfontl.h, + libraries/gd1.3/gdfontmb.c, libraries/gd1.3/gdfontmb.h, + libraries/gd1.3/gdfonts.c, libraries/gd1.3/gdfonts.h, + libraries/gd1.3/gdfontt.c, libraries/gd1.3/gdfontt.h, + libraries/gd1.3/gdlucidab10.c, libraries/gd1.3/gdlucidab10.h, + libraries/gd1.3/gdlucidab12.c, libraries/gd1.3/gdlucidab12.h, + libraries/gd1.3/gdlucidab14.c, libraries/gd1.3/gdlucidab14.h, + libraries/gd1.3/gdlucidan10.c, libraries/gd1.3/gdlucidan10.h, + libraries/gd1.3/gdlucidan12.c, libraries/gd1.3/gdlucidan12.h, + libraries/gd1.3/gdlucidan14.c, libraries/gd1.3/gdlucidan14.h, + libraries/gd1.3/giftogd.c, libraries/gd1.3/index.html, + libraries/gd1.3/mathmake.c, libraries/gd1.3/mtables.c, + libraries/gd1.3/readme.txt, libraries/gd1.3/webgif.c, + libraries/libpng-1.0.9, libraries/libpng-1.0.9/ANNOUNCE, + libraries/libpng-1.0.9/CHANGES, libraries/libpng-1.0.9/INSTALL, + libraries/libpng-1.0.9/KNOWNBUG, libraries/libpng-1.0.9/LICENSE, + libraries/libpng-1.0.9/Makefil, + libraries/libpng-1.0.9/Makefile.am, libraries/libpng-1.0.9/README, + libraries/libpng-1.0.9/README.rrdtool, + libraries/libpng-1.0.9/TODO, libraries/libpng-1.0.9/Y2KINFO, + libraries/libpng-1.0.9/example.c, libraries/libpng-1.0.9/libpng.3, + libraries/libpng-1.0.9/libpng.txt, + libraries/libpng-1.0.9/libpngpf.3, libraries/libpng-1.0.9/png.5, + libraries/libpng-1.0.9/png.c, libraries/libpng-1.0.9/png.dsp, + libraries/libpng-1.0.9/png.dsw, libraries/libpng-1.0.9/png.h, + libraries/libpng-1.0.9/pngasmrd.h, + libraries/libpng-1.0.9/pngbar.jpg, + libraries/libpng-1.0.9/pngbar.png, + libraries/libpng-1.0.9/pngconf.h, + libraries/libpng-1.0.9/pngerror.c, + libraries/libpng-1.0.9/pnggccrd.c, + libraries/libpng-1.0.9/pngget.c, libraries/libpng-1.0.9/pngmem.c, + libraries/libpng-1.0.9/pngnow.png, + libraries/libpng-1.0.9/pngpread.c, + libraries/libpng-1.0.9/pngread.c, libraries/libpng-1.0.9/pngrio.c, + libraries/libpng-1.0.9/pngrtran.c, + libraries/libpng-1.0.9/pngrutil.c, + libraries/libpng-1.0.9/pngset.c, libraries/libpng-1.0.9/pngtest.c, + libraries/libpng-1.0.9/pngtest.png, + libraries/libpng-1.0.9/pngtrans.c, + libraries/libpng-1.0.9/pngvcrd.c, libraries/libpng-1.0.9/pngwio.c, + libraries/libpng-1.0.9/pngwrite.c, + libraries/libpng-1.0.9/pngwtran.c, + libraries/libpng-1.0.9/pngwutil.c, libraries/zlib-1.1.3, + libraries/zlib-1.1.3/ChangeLog, libraries/zlib-1.1.3/FAQ, + libraries/zlib-1.1.3/INDEX, libraries/zlib-1.1.3/Makefile.am, + libraries/zlib-1.1.3/README, libraries/zlib-1.1.3/README.rrdtool, + libraries/zlib-1.1.3/adler32.c, + libraries/zlib-1.1.3/algorithm.txt, + libraries/zlib-1.1.3/compress.c, libraries/zlib-1.1.3/crc32.c, + libraries/zlib-1.1.3/deflate.c, libraries/zlib-1.1.3/deflate.h, + libraries/zlib-1.1.3/descrip.mms, libraries/zlib-1.1.3/example.c, + libraries/zlib-1.1.3/gzio.c, libraries/zlib-1.1.3/infblock.c, + libraries/zlib-1.1.3/infblock.h, libraries/zlib-1.1.3/infcodes.c, + libraries/zlib-1.1.3/infcodes.h, libraries/zlib-1.1.3/inffast.c, + libraries/zlib-1.1.3/inffast.h, libraries/zlib-1.1.3/inffixed.h, + libraries/zlib-1.1.3/inflate.c, libraries/zlib-1.1.3/inftrees.c, + libraries/zlib-1.1.3/inftrees.h, libraries/zlib-1.1.3/infutil.c, + libraries/zlib-1.1.3/infutil.h, libraries/zlib-1.1.3/maketree.c, + libraries/zlib-1.1.3/minigzip.c, libraries/zlib-1.1.3/trees.c, + libraries/zlib-1.1.3/trees.h, libraries/zlib-1.1.3/uncompr.c, + libraries/zlib-1.1.3/zconf.h, libraries/zlib-1.1.3/zlib.3, + libraries/zlib-1.1.3/zlib.dsp, libraries/zlib-1.1.3/zlib.dsw, + libraries/zlib-1.1.3/zlib.h, libraries/zlib-1.1.3/zutil.c, + libraries/zlib-1.1.3/zutil.h, libtool, rrdtool.spec, src, + src/Makefile.am, src/gdpng.c, src/getopt.c, src/getopt.h, + src/getopt1.c, src/gifsize.c, src/memtest.c, src/ntconfig.h, + src/parsetime.c, src/parsetime.h, src/pngsize.c, src/rd_cgi.dsp, + src/rrd.dsp, src/rrd.dsw, src/rrd.h, src/rrd_cgi.c, + src/rrd_cgi.dsp, src/rrd_create.c, src/rrd_diff.c, src/rrd_dump.c, + src/rrd_error.c, src/rrd_fetch.c, src/rrd_format.c, + src/rrd_format.h, src/rrd_graph.c, src/rrd_info.c, src/rrd_last.c, + src/rrd_open.c, src/rrd_resize.c, src/rrd_restore.c, + src/rrd_stat.c, src/rrd_tool.c, src/rrd_tool.h, src/rrd_tune.c, + src/rrd_update.c, src/rrdtool.dsp, src/rrdtool.dsw, + src/rrdupdate.c: Initial revision + +2001-02-25 16:09 oetiker + + * trunk/rrdtool, trunk/rrdtool/README: Initial revision + +2001-02-25 15:29 cvs + + * trunk/CVSROOT, trunk/CVSROOT/checkoutlist, + trunk/CVSROOT/commitinfo, trunk/CVSROOT/config, + trunk/CVSROOT/cvswrappers, trunk/CVSROOT/editinfo, + trunk/CVSROOT/loginfo, trunk/CVSROOT/modules, + trunk/CVSROOT/notify, trunk/CVSROOT/rcsinfo, + trunk/CVSROOT/taginfo, trunk/CVSROOT/verifymsg: initial checkin + +2001-02-25 15:29 + + * branches, tags, trunk: New repository initialized by cvs2svn. + diff --git a/program/CONTRIBUTORS b/program/CONTRIBUTORS new file mode 100644 index 00000000..6c651eb9 --- /dev/null +++ b/program/CONTRIBUTORS @@ -0,0 +1,93 @@ +$Id$ + +I would like to thank to following people for helping to +bring RRDtool into existence. + +Alan Lichty +Alan Milligan Python bindings +Alex van den Bogaerdt (rrd_resize.c and more) +Amos Shapira +Andreas Kroomaa +Andrew Turner (LAST consolidator) +Benny Baumann 64bit stuff, --alt-autoscale-max +Bernhard Fischer MMAP rewrite +Bill Fenner +Blair Zajac +Bruce Campbell +Chin-A-Young +Christophe VG +Christophe Van Ginneken (--no-legend) +Dan Dunn +Daniel Pocock rrd_create to mmap port +Dave Bodenstab AT style time in update, tclfixes +David Grimes SQRT/SORT/REV/SHIFT/TREND +David L. Barker xport function bug fixes +Evan Miller Multiplicative HW Enhancements +Frank Strauss TCL bindings +Florian octo Forster rrd_restore libxml2 rewrite, deprecated function export, rrdcached +Fidelis Assis lua bindings +Henrik Storner functions for min/max values of data in graph +Hermann Hueni (SunOS porting) +Jakob Ilves HPUX 11 +Jeff R. Allen (autoconfigure, portability) +Jeremy Fischer (Makefile changes & RPM builds) +Jesús Couto Fandiño +Joel Becker AIX +Joey Miller php3 and php4 bindings +Jost.Krieger +Kai Siering +Kevin Brintnall bugfixes in and additions to rrdcached, including journaling support +Larry Leszczynski +Mark Plaksin rrd_graph_v +Matt Chambers --full-size-mode for rrdgraph +Melchior Rabe -- legend position patch +McCreary mccreary with xoanon.colorado.edu +Mike Mitchell +Mike Slifcak many rrdtool-1.1.x fixes +Oleg Cherevko +Otmar Lendl (lots of bugfixes) +Pablo Sanchez (CDEF vs VDEF) +Patrick Cherry +Paul Joslin +Peter Speck eps/svg/pdf file format code in rrdtool-1.x +Peter Stamfest initial multi-thread support +Peter Breitenlohner many patches for rrdtool 1.2.x +Philippe.Simonet (NT porting) +Poul-Henning Kamp CDEF enhancements +REIBENSCHUH Alfred AIX +Radoslaw Karas +Rainer Bawidamann +Roman Hoogant +Ronan Mullally +Roger J. Meier (arbitrary linelength in rrdtool) +Russ Wright +Sean Summers (RPM .spec) +Selena M Brewington add_ds +Shane O'Donnell +Simon Leinen +Steen Linden +Sebastian Harl debian packaging, rrdcached fixes and ehancements +Stefan Ludewig 1.3 WIN32 Port +Stefan Mueller HPUX 11 +Steve Harris AIX portability +Steve Rader (rrd_cgi debugging and LAST) +Terminator rAT +Tobias Weingartner +Thomas Gutzler dashed lines +Tom Crawley (GCC&HP configuration) +Travis Brown +Tuc +Ulf Lilleengen Python binding for 'rrdtool first' +Ulrich Schilling AIX +Wim Heirman --units=si option +Wolfgang Schrimm xport function +Wrolf Courtney (HP-UX) +hendrik visage +Vytautas Zdanavicius -- python argument list exander +Martin Sperl (CDEF prediction functions, libdbi) +Philippe Simonet (Windows Binaries) +Alexander Lucke (lucke with dns-net.de) of DNS:NET Internet Services (www.dns-net.de) http://rrdtool.org +Hedley Simons +Nicola Worthington +Wegmann, Christof 1.3/trunk win32 port diff --git a/program/COPYING b/program/COPYING new file mode 100644 index 00000000..37c6105c --- /dev/null +++ b/program/COPYING @@ -0,0 +1,280 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for non-commercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS diff --git a/program/COPYRIGHT b/program/COPYRIGHT new file mode 100644 index 00000000..8c01b8a4 --- /dev/null +++ b/program/COPYRIGHT @@ -0,0 +1,91 @@ +$Id$ +RRDTOOL - Round Robin Database Tool +A tool for fast logging of numerical data graphical display +of this data. + +Copyright (c) 1998-2009 Tobias Oetiker +All rights reserved. + +GNU GPL License +=============== + +This program is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the Free +Software Foundation; either version 2 of the License, or (at your option) +any later version. + +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +more details. + +You should have received a copy of the GNU General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + +FLOSS License Exception +======================= +(Adapted from http://www.mysql.com/company/legal/licensing/foss-exception.html) + +I want specified Free/Libre and Open Source Software ("FLOSS") +applications to be able to use specified GPL-licensed RRDtool +libraries (the "Program") despite the fact that not all FLOSS licenses are +compatible with version 2 of the GNU General Public License (the "GPL"). + +As a special exception to the terms and conditions of version 2.0 of the GPL: + +You are free to distribute a Derivative Work that is formed entirely from +the Program and one or more works (each, a "FLOSS Work") licensed under one +or more of the licenses listed below, as long as: + +1. You obey the GPL in all respects for the Program and the Derivative +Work, except for identifiable sections of the Derivative Work which are +not derived from the Program, and which can reasonably be considered +independent and separate works in themselves, + +2. all identifiable sections of the Derivative Work which are not derived +from the Program, and which can reasonably be considered independent and +separate works in themselves, + +1. are distributed subject to one of the FLOSS licenses listed +below, and + +2. the object code or executable form of those sections are +accompanied by the complete corresponding machine-readable source +code for those sections on the same medium and under the same FLOSS +license as the corresponding object code or executable forms of +those sections, and + +3. any works which are aggregated with the Program or with a Derivative +Work on a volume of a storage or distribution medium in accordance with +the GPL, can reasonably be considered independent and separate works in +themselves which are not derivatives of either the Program, a Derivative +Work or a FLOSS Work. + +If the above conditions are not met, then the Program may only be copied, +modified, distributed or used under the terms and conditions of the GPL. + +FLOSS License List +================== +License name Version(s)/Copyright Date +Academic Free License 2.0 +Apache Software License 1.0/1.1/2.0 +Apple Public Source License 2.0 +Artistic license From Perl 5.8.0 +BSD license "July 22 1999" +Common Public License 1.0 +GNU Library or "Lesser" General Public License (LGPL) 2.0/2.1 +IBM Public License, Version 1.0 +Jabber Open Source License 1.0 +MIT License (As listed in file MIT-License.txt) - +Mozilla Public License (MPL) 1.0/1.1 +Open Software License 2.0 +OpenSSL license (with original SSLeay license) "2003" ("1998") +PHP License 3.0 +Python license (CNRI Python License) - +Python Software Foundation License 2.1.1 +Sleepycat License "1999" +W3C License "2001" +X11 License "2001" +Zlib/libpng License - +Zope Public License 2.0/2.1 diff --git a/program/MakeMakefile b/program/MakeMakefile new file mode 100755 index 00000000..90e4700f --- /dev/null +++ b/program/MakeMakefile @@ -0,0 +1,57 @@ +#!/bin/sh +# +# Run this script after the first cvs checkout to build +# makefiles and friends + +PATH="/usr/pack/automake-1.11-to/amd64-linux-debian3.1/:/usr/pack/automake-1.11-to/amd64-linux-ubuntu8.04/bin:$PATH" +export PATH + +vcheck (){ + perl <= $LIBTOOL_VER" + ERROR=1 +fi + +if vcheck $AUTOMAKE_VER "automake --version" +then + if vcheck $AUTOMAKE_VER "automake-1.11 --version" + then + echo "get a copy of GNU automake >= $AUTOMAKE_VER" + ERROR=1 + else + AUTOMAKE="automake-1.11" + ACLOCAL="aclocal-1.11" + export AUTOMAKE ACLOCAL + fi +fi + + +if vcheck $AUTOCONF_VER "autoconf --version" +then + echo "get a copy of GNU autoconf >= $autoconf_ver" + ERROR=1 +fi + +if [ $ERROR -ne 0 ] +then + exit 1 +fi + +./autogen.sh + +# vim: set syntax=sh : diff --git a/program/Makefile.am b/program/Makefile.am new file mode 100644 index 00000000..1961ef23 --- /dev/null +++ b/program/Makefile.am @@ -0,0 +1,49 @@ +# $Id$ + +## Process this file with automake to produce Makefile.in +RSYNC = rsync --rsh=ssh + +# build the following subdirectories + +SUBDIRS = po src examples doc bindings + + # the following files are not mentioned in any other Makefile +EXTRA_DIST = COPYRIGHT CHANGES WIN32-BUILD-TIPS.txt TODO CONTRIBUTORS THREADS \ + rrdtool.spec favicon.ico win32/Makefile win32/config.h autogen.sh \ + win32/rrd.dsp win32/rrd.sln win32/rrd.vcproj libtool \ + win32/rrd_config.h.msvc win32/rrdlib.vcproj win32/rrdtool.dsp \ + win32/rrdtool.dsw win32/rrdtool.vcproj netware/Makefile \ + etc/rrdcached-default etc/rrdcached-init + + + +CLEANFILES = config.cache + +# use relaxed rules when building dists +AUTOMAKE_OPTIONS= foreign + +# where we keep local rules for automake +ACLOCAL_AMFLAGS=-I m4 +ACLOCAL_M4= $(top_srcdir)/aclocal.m4 +#AUTOHEADER = @AUTOHEADER@ --localdir=$(top_srcdir)/config +#AUTOCONF = @AUTOCONF@ --localdir=$(top_srcdir)/config + +# $(RSYNC) CHANGES archive/$(PACKAGE)-$(VERSION).tar.gz tobi@ipn.caida.org:/ipn/web/Tools/RRDtool/pub/ + +site-perl-inst: site-perl-install + +site-perl-install: all bindings/perl-piped/Makefile bindings/perl-shared/Makefile + cd bindings/perl-piped && $(MAKE) install + cd bindings/perl-shared && $(MAKE) install + +site-tcl-install: all + cd bindings/tcl && $(MAKE) tcl-install + +site-python-install: all + cd bindings/python && $(PYTHON) setup.py install $(if $(DESTDIR),--root=$(DESTDIR)) + +# find . -name "*.c" -or -name "*.h" | xargs perl -0777 -n -e 'while (s/typedef\s+(?:unsigned\s+|signed\s+|unival\s+)?\S+\s+\*?([^{}\s;(]+)//){print "-T$1\n"}' +indent: + find ./ -name "*.[ch]" | xargs indent + +##END## diff --git a/program/NEWS b/program/NEWS new file mode 100644 index 00000000..bac4d122 --- /dev/null +++ b/program/NEWS @@ -0,0 +1,240 @@ +##################################### +Major Changes between 1.3.x and 1.4.x +------------------------------------- +$Id$ + +RRD Caching Daemon (rrdcached) +------------------------------ +by Florian Forster and Kevin Brintnall + +The RRD Caching Daemon can dramatically improve the 'update' performance +of your system. Due to file handling overheads, the time it takes todo one +update is virtually the same as to doing two updates in a row. + +The Cache Daemon intercepts rrdtool update calls, assembling multiple +updates before writing them to the actual rrd file. When calling rrdtool +graph in such a setup, the command will tell the daemon to flush out all +pending updates for the rrd files, required to draw the graph. + +See rrdcached documentation. + +RRD Dumping and Restoring (rrdtool dump/restore) +------------------------------------------------ +by Tobi Oetiker + +The output of rrdtool dump has been adjusted to be simpler to parse by +existing xml parsers. + +The restore core has been completely re-written yet again and is now relying +on an incremental xml parser. This has the advantage that the memory +consumption while restoring xml files is only slightly larger than the +resulting rrd file. Which is much less than the requirements of the 1.3 and +even 1.2 + +RRD Graphing functions (rrdtool graph) +-------------------------------------- +by Martin Sperl + +* VDEF PERCENTNAN (a PRECENT that ignores NAN) + +* CDEF PREDICT and PREDICTSIGMA functions for on-the-fly + data prediction without the need to modify existing rrd files as it is + required for HoltWinters. + +* LibDBI integration provides a path to read data directly of a supported + SQL database into rrdtool graph. See rrdgraph_libdbi documentation. + +Miscellaneous Changes +--------------------- +* graph legends can now be placed left, right or above the graph with the + new --legend-direction and --legend-positon placement options. + by Melchior Rabe + +* switched to using automake 1.11 which provides a 'silent' build process, + causing errors and warnings to stand out much more than before. + by Tobi Oetiker + +* switched from intltoolize to autopoint for the i18n configuration. + by Tobi Oetiker + +* new graph option --grid-dash on:off to configure the dash length + in the grid painted over the graph by Tobi Oetiker + +* lua bindings for rrdtool + by Fidelis Assis + +* various improvements to rrd_open functions and mmap handling + by Daniel Pocock + +* allow the HW smoothing window size to be set to 0 with rrdtool tune + by sylvain luiset + +* new graph option --border to set the 3d border width + by Bernhard Reutner-Fischer + +* draw different color markers (enable with --dynamic-labels) depending on the + type of element in the graph by Loïc Tortay + +for more detail see the CHANGES file. + +##################################### +Major Changes between 1.2.x and 1.3.x +------------------------------------- + +NEW Fast file access methods (Bernhard Fischer / Tobi Oetiker) +---------------------------- +* introduced file-accessor functions rrd_read/rrd_seek/rrd_write + +* implemented full mmap-based file access with madvise hints for + improved scalability, much reduced memory-footprint and much less + blocking while accessing the disk + +* implemented optional full file-descriptor access instead of FILE* + access + +NEW Graphing (Tobi Oetiker) +------------ +* libart has been replaced by cairo/pango + +* pango markup is supported (--pango-markup) + +* full grid fitting + +* --graph-render-mode=mono for non anti aliased graphing + +* --font-render-mode=mono for non anti aliased fonts + +* fonts come through fontconfig, use the Pango font naming scheme + -> 'Times 20' ... it is not possible to use true-type fonts + directly anymore. + +* Tabs are position independent. + +* TRENDNAN filter that ignores NAN values while calculating the + TREND data. (Timo Stripf) + +* --full-size-mode to specify the outer border of the image and not + just of the graphing canvas (Matthew Chambers) + +* TEXTALIGN command to alter default text alignment behavior + +* C API in-memory graphing with rrd_graph_v (Evan Miller) + +* draw dashed lines in graphs (Thomas Gutzler) + +* new interface graphv which returns information using the rrd_info + interface (Tobi Oetiker and Mark Plaksin) + +* improved horizontal grid. Have a bit more grid lines and y-axis + labels while keeping them far enough apart to not run into each + other. + +NEW Forecasting (Evan Miller) +--------------- +* the new MHWPREDICT consolidation function uses a variation of the + Holt-Winters method. It is a drop-in replacement for HWPREDICT, + and is better suited for data whose seasonal variations grow or + shrink in proportion to the average. + +* If you create an RRD with the new MHWPREDICT function, the + resulting rrd file will be version 0004 and can only be used in + rrdtool 1.3. + +Rewrites +-------- +* rrd_restore now uses libxml for parsing which makes things much + more tolerant towards xml variations. The old code could mostly + just parse the XML as it was output by rrdtool dump. See also: + the note at the bottom of this document. (by Florian octo + Forster) + +* rrd_update rewritten to make it more modular. Fixed two + longstanding HW bugs in the process (Evan Miller) + +Internationalization (Takao Fujiwara and Tobi Oetiker) +-------------------- +* The help output by rrdtool has been internationalized. There are + no real translations included with rrdtool yet, contributions are + welcome. + +* The internationalization will only be compiled if libintl and + friends are available on your system. Use the configure option + --disable-libintl if you want to disable this feature + +Language Bindings +----------------- +* ruby rrd_fetch will return step as a last property -- Mike Perham + +RRDtool dump / restore incompatibility +-------------------------------------- +* rrdtool dump 1.3 does emit completely legal XML. Basically this + means that it contains an XML header and a DOCTYPE definition. + Unfortunately this causes older versions of rrdtool restore to be + unhappy. + +* To restore a new dump with an old rrdtool restore version, either + remove the XML header and the doctype by hand (both on the first + line of the dump) or use rrdtool dump --no-header. + + +###################################################################################### +Major Changes between 1.0.x and 1.2.x +====================================================================================== +Graphing +-------- + +* rewritten graphics generation based on libart. + - anti-aliased output + - alpha transparency support + - truetype fonts + +* additional graphics formats: EPS, PDF, SVG + +* extended multi-part documentation + +* VDEF support; define and use variables. Find, and use, the + maximum rate seen by rrdtool; compute and show the average + +* Sliding window (trend) analysis + Compute a smoother average, for instance over the last 6 CDPs + +* percentile (95th or other) + Remove peaks, 95 percent of all rates are at or below the + returned value + +Logging +------- +* a second logging interface: rrdtool updatev + Verbose updating of the database; show CPDs being created + +* Aberrant Behavior Detection with Holt-Winters Forecasting + Compare current data with expected data, detect and log when + the rates are outside expected levels + +* COMPUTE data type for artificial data-sources calculating their + input using RPN math and data from the other data-sources. + +Incompatibilities +----------------- +* Colons in COMMENT arguments to rrdtool graph must be escaped with a backslash + +* the --alt-y-mrtg option is gone or rather since 1.2.7 it is back but + without functionality. + +* In pipe mode, rrdtool answers with OK only if it was successful with the + command. Otherwhise the answer will be ERROR... + + +Behind the Scenes +----------------- +* In order to support Holt-Winters and Calculated Datasources, + the rrdtool data format has changed. While the new version of rrdtool can + read files created with rrdtool 1.0.x. It is not possible to read files + created by rrdtool-1.2.x with rrdtool-1.0.x + +* External libraries are not included with rrdtool anymore. This is in line + with todays trend of using shared libraries everywhere. With the exception + of the cgi library most things required by rrdtool will be found on every recent + system. + +* Memory Mapped IO support for faster logging. diff --git a/program/README b/program/README new file mode 100644 index 00000000..1ba71f67 --- /dev/null +++ b/program/README @@ -0,0 +1,76 @@ +Round Robin Database Tools +========================== +$Id$ + +It is pretty easy to gather status information from all sorts of things, +ranging from the temperature in your office to the number of octets which +have passed through the FDDI interface of your router. But it is not so +trivial to store this data in a efficient and systematic manner. This is +where RRDtool kicks in. It lets you log and analyze the data you gather from +all kinds of data-sources (DS). The data analysis part of RRDtool is based +on the ability to quickly generate graphical representations of the data +values collected over a definable time period. + + +To compile: +----------- + +check out the instructions in doc/rrdbuild.txt + +Getting Started: +---------------- + +Either after compiling or after installing you can try the example +RRDtool applications in the examples directory. + +To learn: +--------- + +Read the documentation in the doc directory. Start of with +RRDtool. All documents are available as html and as ASCII text. + +If you are looking for a more slow paced introduction, make sure to read +Alex van den Bogaerdt's rrdtutorial which is also available from the doc +directory. Also read his cdeftutorial and Steve Rader's rpntutorial. + +If you want to know about the format of the log files check +src/rrd_format.h there are a lot of comments in there ... + +How to make Tobi happy: +----------------------- + +If you want to show your appreciation for RRDtool you could make me happy +by going to http://tobi.oetiker.ch/wish and ordering a CD from +my CD wish list ... + + +How to keep in touch: +--------------------- + +There are 3 Mailing lists for RRDtool: + +rrd-announce LOW volume RRDtool Announcements List (Only Stable Releases) +rrd-users For discussion amongst people who use RRDtool in their applications +rrd-developers For people who actually HACK RRDtool code + +To subscribe to send a message with the subject 'subscribe' +to -request@lists.oetiker.ch + +Note, that postings to rrd-announce will always be cross-posted +to rrd-users and rrd-developers as well. + +To Contribute: +-------------- + +Contributed feature and bug patches are most welcome. But please +send complete patches. A complete patch patches the CODE as well +as the CHANGES, CONTRIBUTORS and the POD files. + +Use GNU diff --unified --recursive olddir newdir to build your patches. + +The latest Version: +------------------- +Is available from http://oss.oetiker.ch/rrdtool/ + + +Tobias Oetiker diff --git a/program/THREADS b/program/THREADS new file mode 100644 index 00000000..b0481638 --- /dev/null +++ b/program/THREADS @@ -0,0 +1,60 @@ +In order to use the librrd in multi-threaded programs you must: + + * Link with librrd_th instead of with librrd + * Use the *_r function instead or the *-functions + * Never use non *_r functions unless it is explicitly documented that the + function is tread-safe + +Every thread SHOULD call rrd_get_context() before the first call to +any librrd function in order to set up thread specific data. This is +not strictly required, but it is the only way to test if memory +allocation can be done by this function. Otherwise the program may die +with a SIGSEGV in a low-memory situation. + + +IMPORTANT NOTE FOR RRD CONTRIBUTORS: + +Some precautions must be followed when developing rrd from now on: + +* Only use thread-safe functions in library code. Many often used libc + functions aren't thread-safe. Take care if you want to use any of + the following functions: + + + direct strerror calls must be avoided: use rrd_strerror instead, + it provides a per-thread error message + + the getpw*, getgr*, gethost* function families (and some more get* + functions): use the *_r variants + + Time functions: asctime, ctime, gmtime, localtime: use *_r variants + + strtok: use strtok_r + + tmpnam: use tmpnam_r + + many other (lookup documentation) + +As an aide(?) a header file named "rrd_is_thread_safe.h" is provided +that works with the GNU C-preprocessor to "poison" some of the most +common non-thread-safe functions using the "#pragma GCC poison" +directive. Just include this header in source files you want to keep +thread-safe. + +* Do not introduce global variables! + + If you really, really have to use a global variable you may add a + new field to the rrd_context structure and modify rrd_error.c, + rrd_thread_safe.c and rrd_non_thread_safe.c + +* Do not use "getopt" or "getopt_long" in *_r (directly or indirectly) + + getopt uses global variables and behaves badly in a multithreaded + application when called concurrently. Instead provide a *_r function + taking all options as function parameters. You may provide argc and + **argv arguments for variable length argument lists. See + rrd_update_r as an example. + +* Do not use the parsetime function! + + It uses lots of global vars. You may use it in functions not + designed to be thread-safe like functions wrapping the _r version of some + operation (eg. rrd_create, but not in rrd_create_r) + +WIN32 Platform Note (added 04/01/03): + +Both rrdtool.vcproj (MSVC++ 7.0) and rrd.dsw (MSVC++ 6.0) are configured to compile with rrd_thread_safe_nt.c. diff --git a/program/TODO b/program/TODO new file mode 100644 index 00000000..706727fe --- /dev/null +++ b/program/TODO @@ -0,0 +1,18 @@ +Random Feature Ideas for RRDtool +-------------------------------- +$Id$ + +make it possible to define order of legend items independant of their order +on the commandline ... + +architecture independant storage format. + +micro second precision + +2036 stable time + +add configurable counter wrap + +align data points not to GMT but some free offset + +allow starting through symlinks called rrdcreate rrdtune and the like diff --git a/program/WIN32-BUILD-TIPS.txt b/program/WIN32-BUILD-TIPS.txt new file mode 100644 index 00000000..b3fae966 --- /dev/null +++ b/program/WIN32-BUILD-TIPS.txt @@ -0,0 +1,391 @@ +Compiling RRDtool on Win32 with Microsoft Visual C++: +--------------------------------------------------------------- +2008-03-12 Stefan Ludewig stefan.ludewig@exitgames.com + +Here are step by step instructions for building rrdlib.lib and rrdtool.exe +version 1.3.5 and newer with Microsoft Visual Studio 2008 (9.0.x). + +(1) Download and extract libraries rrdtool depends on: + + - cairo: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/cairo_1.8.0-1_win32.zip + and http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/cairo-dev_1.8.0-1_win32.zip + + - glib: http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.18/glib_2.18.3-1_win32.zip + and http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.18/glib-dev_2.18.3-1_win32.zip + + - libpng: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libpng_1.2.32-1_win32.zip + and http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libpng-dev_1.2.32-1_win32.zip + + - libxml2: http://downloads.sourceforge.net/gnuwin32/libxml2-2.4.12-bin.zip?modtime=1009062000&big_mirror=1 + and http://downloads.sourceforge.net/gnuwin32/libxml2-2.4.12-1-lib.zip?modtime=1024783200&big_mirror=1 + + - pango: http://ftp.gnome.org/pub/gnome/binaries/win32/pango/1.22/pango_1.22.2-1_win32.zip + and http://ftp.gnome.org/pub/gnome/binaries/win32/pango/1.22/pango-dev_1.22.2-1_win32.zip + + - zlib: http://www.zlib.net/zlib123-dll.zip + +(2) Create a folder named "contrib" next to your rrdtool-folder. + +(3) Copy the following folders and files from the downloaded archieves into + the contrib-folder, you just created: + + a) The folder "bin" from cairo_1.8.0-1_win32 and the folders "lib" and + "include" from cairo-dev_1.8.0-1_win32 into contrib/cairo. + + b) The folder "bin" from glib_2.18.3-1_win32 and the folders "lib" and + "include" from glib-dev_2.18.3-1_win32 into contrib/glib + + c) The folder "bin" from libpng_1.2.32-1_win32 and the folders "lib" and + "include" from libpng-dev_1.2.32-1_win32 into contrib/libpng + + d) The file "libxml2.dll" from libxml2-2.4.12-bin/bin and the file + "libxml2.lib" from libxml2-2.4.12-1-lib\lib into contrib/libxml2/lib and + the folder "include" from from libxml2-2.4.12-1-lib into contrib/libxml2 + + e) The folder "bin" from pango_1.22.2-1_win32 and the folders "lib" and + "include" from pango-dev_1.22.2-1_win32 into contrib/pango + + f) The folders "lib" and "include" and the file "zlib1.dll" into + contrib/zlib + +(4) Open the Visual Studio 2008 Solution "rrd.sln" in the win32 folder of + your rrdtool-folder and build either the project rrdlib (for the + rrdtool-library), rrdtool (for the rrdtool-executable depending on the + libraray) or the complete solution. A post-build event automatically copies + all the dlls, needed by rrdtool, next to the .exe, when you build the + executable. These DLLs must be available on all hosts where rrdtool will + run. + +5/1/05 Tobi +to help windows deal with the reentrant versions of many unix +calls link with win32comp.c + +4/10/05 Tobi +The windows implementation of strftime does not seem to support +the ISO 8601 week number (%V) I have therfore included the file +strftime.[ch] which provides strftime_ ... if you compile rrdtool +with -Dstrftime=_strftime and link strftime.o then you will +get propper support for %V. + +7/29/04 Jake Brutlag + +As of Jan 2004, code for libraries utilized by rrdtool +(png, libart, freetype, and zlib) is no longer distributed with +rrdtool. This requires some changes to the compile process on +Win32. The solution described here is to compile rrdtool to +link against these libraries dynamically. There is an advantage +to this approach: namely the rrdtool distribution doesn't have to +worry about how to compile these libraries on Win32. In theory, +since others already provide and maintain Win32 binaries for these +libraries the users don't have to worry about how to compile them +either. The disadvantage of this approach is that the DLLs for +these libraries must be available on the hosts where rrdtool will run. + +Here are step by step instructions for compiling rrdtool.exe and +the perl shared library (RRDS.dll) with Microsoft Visual C++ 6.0. +(1) Download libraries rrdtool depends on from GnuWin32: +http://gnuwin32.sourceforge.net/ +For freetype, libpng, and zlib download the "Complete Package"; each of +these will be a self-extracting self-installing executable. +For libart, download both the "Binaries" and "Developer Files" packages. +Unfortunately at this time GnuWin32 doesn't provide the "Complete Package" +installer for libart. Perhaps by the time you are following these +instructions GnuWin32 will have a "Complete Package" for libart. +(2) Install the GnuWin32 libraries by running the executables for freetype, +libpng, and zlib. These instructions and the Visual C++ project files +distributed with rrdtool assume that you will use the default install +location: C:\Program Files\GnuWin32. Extract the two zip files for libart, +libart-2.3.3-bin.zip and libart-2.3.3-1-lib.zip into the GnuWin32 directory; +the appropriate libart files will be added to the include, lib, and bin +subdirectories. +(3) Add C:\Program Files\GnuWin32\bin to the PATH (Control Panel -> +System -> Advanced -> Environment Variables). +(4) Start Microsoft Visual C++ 6.0. Load the workspace file, rrdtool.dsw, +from the src subdirectory of your rrdtool code directory. +(5) Compile the Release build of the rrdtool project (since rrdtool depends +on the rrd project, the rrd library will also be compiled). At this +time, the compile will fail in zconf.h, a zlib header file. The problem +is a preprocessor directive that loads unistd.h. Open zconf.h in VC++ +(this file is in C:\Program Files\GnuWin32\include) and find the following +code block: + +#if 1 /* HAVE_UNISTD_H -- this line is updated by ./configure */ +# include /* for off_t */ +# include /* for SEEK_* and off_t */ +# ifdef VMS +# include /* for off_t */ +# endif +# define z_off_t off_t +#endif + +Change it to reads as follows (this is code from zlib-1.1.4): + +#if HAVE_UNISTD_H +# include /* for off_t */ +# include /* for SEEK_* and off_t */ +# ifdef VMS +# include /* for off_t */ +# endif +# define z_off_t off_t +#endif + +Note that it is actually just a one line change. Save the file and +recompile rrdtool. By the time you are following these instructions +this issue with zconf.h may be resolved. +(6) At this point, you can run the executable rrdtool.exe in the +src\toolrelease subdirectory. Note that if you wish to run rrdtool +on other machines, you will need the following DLLs installed (on the +path) on those machines: +zlib1.dll +libpng12.dll +libart_lgpl.dll +freetype6.dll +msvcrt.dll +The names of the first four DLLs might vary from what is listed here +depending on the versions of the packages you downloaded from GnuWin32. +The fifth DLL, msvcrt.dll, is a system DLL for most versions of Windows. +If you are running on old version of Windows, you can install/upgrade to +IE4.0 to get this DLL. +(7) To compile the perl-shared library, open a Command Prompt (DOS box) +and cd to the bindings\perl-shared subdirectory. +(8) Run vcvars32.bat; this batch file, in your vc98\bin directory will +set necessary environment options for command line compiling. +(9) In bindings\perl-shared, run +perl ntmake-build +nmake +nmake test +If nmake test succeeds, you are good to go. RRDs.dll is in +blib\arch\auto\RRDs. If you plan to install via the Active State ppm +tool, tar and gzip the blib directory. You can use the RRDs.ppd file +in bindings\perl-shared directory. Remember that as in the case of +rrdtool.exe you will need the DLLs listed in (6) on the machine where +you are going to use RRDs.dll. + +Microsoft Visual C++ 7.1 (.NET 2003): + +Unfortunately, this is more difficult than with VC++ 6.0. The problem +is that by default the C runtime dll for VC++ 7.1 is msvcr71.dll rather +than msvcrt.dll. The GnuWin32 library binaries are all compiled +to use msvcrt.dll and you can't mix msvcr71.dll and msvcrt.dll in the +same process. One option is to download the source code for the libraries +(available from http://gnuwin32.sourceforge.net) recompile them with +VC++ 7.l. Then all the components will use msvcr71.dll. Once you are +going to go this route, you can also use static multi-threaded libraries +and use static linking between rrdtool (or RRDs.dll) and its dependencies. + +To use the GnuWin32 library binaries, you need to trick VC++ 7.1 into +compiling rrdtool to use the older msvcrt.dll. Follow steps (1) - (3) +as above, then: +(4) Obtain a different version of the msvcrt.lib import library that +is compatible with vc7 and points to msvcrt.dll: +msvcrtlib_for_vc7.zip from http://xchat.org/win32/testing +Backup msvcrt.lib in your vc7\lib directory +(\Program Files\Microsoft Visual Studio .NET 2003\vc7\lib) +Then extract the msvcrt.lib from the zip file into the vc7\lib directory. +WARNING: Use this msvcrt.lib at your own risk! This is not a Microsoft +supplied file nor a file supported by anyone associated with rrdtool. +(5) Start Microsoft Visual C++ 7.1. Load the solution file, rrdtool.sln, +from the src subdirectory of your rrdtool code directory. Edit zconf.h, +as needed, as described under (5) above. Compile the release build of +the rrdtool project. +Proceed with steps (6) - (9) as above, if you are using/picking up +the wrong msvcrt.lib import library then nmake test for perl-shared +will fail. + +Note: it is possible in the future that GnuWin32 will provide Win32 +binaries that utilize msvcr71.dll rather than msvcrt.dll. + +5/14/02 Jake Brutlag + +These notes share some insight I gained compiling 1.1.x with +MS Visual C++ 6.0 (using project files). This information may or +may not be accurate at the time you are reading this. + +(1) freetype and rrdtool cannot use precompiled headers (which are +enabled by default for MSVC++ projects). MSVC++ 6.0 does not +support precompiled headers if #include directives contain MACROS. +(2) Compile Release build with Default optimization, not the +Maximize Speed optimization. I encountered some strange errors +(related to argument processing for complex commands like graph-- +perhaps the getopt stuff is too blame) with Maximize Speed. +(3) libart relies upon config.h (ostensibly generated by the +configure script-- but of course not on Win32 platforms). ..\..\confignt +(which contains a static Win32 version of config.h) should be on +the include path. +(4) Fonts are located in the %windir%\fonts, so the default font +is c:\winnt\fonts\cour.ttf. (6/19/02) At Kerry Calvert's suggestion +this setting was moved to confignt\config.h. +(5) libart requires a custom build step to generate art_config.h; this +is done manually via the commands: +cl -I..\..\confignt gen_art_config.c +gen_art_config.exe > art_config.h + +Currently, to compile rrd.lib and rrdtool.exe using +the MSVC++ project files, first start MSVC++ 6.0. Open the rrdtool +workspace (rrdtool.dsw in the src directory). The active project/ +configuration should be rrdtool-Win32 Release. Select Rebuild All +from the Build menu. The static link library (rrd.lib) will +be generated in src\release directory and executable will be generated +in the src\toolrelease directory. + +Compiling RRDtool on NT ... work in progress +--------------------------------------------------------------- + by Tamas Kovacshazy (khazy@mit.bme.hu) + +Persisting Problems with the current NT port: + +Unfortunately, the RRD perl modules does not work with Perl +(ActivePerl) using the current distribution. + +The RRD shared perl module can be compiled after some +modification... + +Follow these steps: + +0. Install perl if you do not have it! + Visit http://www.ActiveState.com/pw32/ for a complete distribution. + +1. Copy ..\gd1.2\release\gd.lib to ..\gd1.2\ +2. Copy ..\src\release\rrd.lib to ..\src +3. perl Makefile.pl + +In this step the system complains about something I do not +understand. The error message is the following: + +Note (probably harmless): No library found for '-lm' + +Is a library missing? But it does not stop with an error... + +4. nmake test (You must have Visual C++ on the machine!) + +After these steps it generates the test files (svgs and rrds), +and they seem to be good. + +The real problem in the shared perl modul is the following: + +I do not know how this installation stuff works. The problem is +that the installation stuff looks for the gd.lib and the +rrd.lib in the ..\gd1.2 and ..\src directory. The UNIX compile +puts the files into these directories, but the NT compile does +not. + +It is all for today, + +khazy + +Tamas Kovacshazy E-mail: khazy@mit.bme.hu +WWW: http://www.mit.bme.hu/~khazy +Technical University of Budapest +Department of Measurement and Information Systems + + +Compiling RRDtool 1.2.x on Win32 with MingW32 gcc: +--------------------------------------------------------------- + +1. Obtain and install the current version of the MingW package. + + http://www.mingw.org/download.shtml + + In the MinGW set you will need the gcc and binutils as a minimum. + +2. Obtain either of the following awk versions and install in a directory + on your System Path: + + - awk.exe + + http://cm.bell-labs.com/cm/cs/awkbook/index.html + + Note: This version has no dependencies to other libs. + + - gawk.exe (GnuWin32 version) + + http://gnuwin32.sourceforge.net/packages/gawk.htm + + Note: Also fetch the dependant libraries for it from the same page. + +3. If you plan to create a 'distribution' release of the RRD Tools, the + Makefile.Win32 will copy all the needed files to an output directory and + then zip the entire directory. A suitable zip utility can be obtained here: + + http://www.info-zip.org/ + + Install in a directory on your System Path. + +4. Obtain the following libraries, ideally install them all under a common + directory: + + = zlib + + http://oss.oetiker.ch/rrdtool/pub/libs/zlib-1.2.3.tar.gz + http://www.zlib.net/ + + = libpng + + http://oss.oetiker.ch/rrdtool/pub/libs/libpng-1.2.12.tar.gz + http://libpng.sourceforge.net/ + + = freetype + + http://oss.oetiker.ch/rrdtool/pub/libs/freetype-2.2.1.tar.gz + http://freetype.sourceforge.net/index2.html + + = libart_lgpl + + http://oss.oetiker.ch/rrdtool/pub/libs/libart_lgpl-2.3.17.tar.gz + http://www.levien.com/libart/ + + Note: libart_lgpl needs a special tweak because the archive contains + only the base directory, but the libart headers are usually included with + a directory prefix; therefore create a subfolder 'libart_lgpl' and move + all files into this subfolder. + +5. Set up for DOS environment. + + Add MingW\bin and MSYS\bin directories to your System path. + + If the libraries share a common directory set the following environment var: + + set LIBBASE= + e.g set LIBBASE=C:\Libraries + + If the libraries are scattered, set the following environment vers: + + set ZLIBSDK= + e.g set ZLIBSDK=C:\mytest\zlib-1.2.3 + set LIBPNG= + set LIBFT2= + set LIBART= + + If using the Gnu Awk (gawk.exe), edit the Makefile.Win32 and change the line: + + AWK = awk + + to + + AWK = gawk + +6. Compile the project. + + All dependent libs are statically linked in. This has the benefit that the + binaries do not depend on any other DLLs. + In order to build the static freetype lib enter the freetype base directory + and type 'make'. If everything is fine a message appears that gcc is detected, + and that you should again type 'make'. Follow that in order to build freetype. + All other libs are build from the sources with the RRDTool Makefile.Win32. + + Switch to the RRDTOOL .\src directory. Then: + + make -f Makefile.Win32 help + + to see the build options, or + + make -f Makefile.Win32 all + + should build the entire package. + +6. Happy Graphing! + + +written by normw & gk. + + diff --git a/program/autogen.sh b/program/autogen.sh new file mode 100755 index 00000000..a7226cc2 --- /dev/null +++ b/program/autogen.sh @@ -0,0 +1,3 @@ +#!/bin/sh +libtoolize +autoreconf --force --install --verbose -I m4 diff --git a/program/bindings/Makefile.am b/program/bindings/Makefile.am new file mode 100644 index 00000000..c4fdc10f --- /dev/null +++ b/program/bindings/Makefile.am @@ -0,0 +1,59 @@ +.PHONY: python ruby + +if BUILD_TCL +SUB_tcl = tcl +endif +if BUILD_LUA +SUB_lua = lua +endif + +SUBDIRS = $(SUB_tcl) $(SUB_lua) + +# the following files are not mentioned in any other Makefile +EXTRA_DIST = perl-piped/MANIFEST perl-piped/README perl-piped/Makefile.PL perl-piped/RRDp.pm perl-piped/t/base.t \ + perl-shared/ntmake-build perl-shared/MANIFEST perl-shared/README perl-shared/Makefile.PL perl-shared/RRDs.pm perl-shared/RRDs.xs perl-shared/t/base.t \ + ruby/CHANGES ruby/README ruby/extconf.rb ruby/main.c ruby/test.rb \ + python/ACKNOWLEDGEMENT python/AUTHORS python/COPYING python/README python/rrdtoolmodule.c python/setup.py + + +# add the following to the all target +all-local: @COMP_PERL@ @COMP_RUBY@ @COMP_PYTHON@ + +install-data-local: + $(AM_V_GEN)test -f perl-piped/Makefile && cd perl-piped && $(MAKE) install || true + $(AM_V_GEN)test -f perl-shared/Makefile && cd perl-shared && $(MAKE) install || true + $(AM_V_GEN)test -f ruby/Makefile && cd ruby && $(MAKE) EPREFIX=$(DESTDIR)$(exec_prefix) $(RUBY_MAKE_OPTIONS) install || true + $(AM_V_GEN)test -d python/build && cd python && env BUILDLIBDIR=../../src/.libs $(PYTHON) setup.py install --skip-build --prefix=$(DESTDIR)$(prefix) --exec-prefix=$(DESTDIR)$(exec_prefix) || true + +# rules for building the ruby module +# RUBYARCHDIR= is to work around in a makefile quirk not sure +# it is is the right thing todo, but it makes rrdtool build on freebsd as well +ruby: Makefile + cd ruby && $(RUBY) extconf.rb && $(MAKE) EPREFIX=$(exec_prefix) $(RUBY_MAKE_OPTIONS) RUBYARCHDIR= + +# rules for building the pyton module +python: Makefile + cd python && env BUILDLIBDIR=../../src/.libs $(PYTHON) setup.py build_ext --rpath=$(libdir) && env LIBDIR=../../src/.libs $(PYTHON) setup.py build + +# rules for building the perl module +perl_piped: perl-piped/Makefile + cd perl-piped && $(MAKE) + +perl-piped/Makefile: perl-piped/Makefile.PL + cd perl-piped && $(PERL) Makefile.PL $(PERL_MAKE_OPTIONS) + +perl_shared: perl-shared/Makefile + cd perl-shared && $(MAKE) + +perl-shared/Makefile: perl-shared/Makefile.PL Makefile + cd perl-shared && $(PERL) Makefile.PL $(PERLFLAGS) $(PERL_MAKE_OPTIONS) RPATH=$(libdir) +# LIBS="$(LDFLAGS) $(LIBS)" $(PERLFLAGS) $(PERL_MAKE_OPTIONS) + +clean-local: + test -f perl-piped/Makefile && cd perl-piped && $(MAKE) clean || true + test -f perl-piped/Makefile && rm perl-piped/Makefile || true + test -f perl-shared/Makefile && cd perl-shared && $(MAKE) clean || true + test -f perl-shared/Makefile && rm -f perl-shared/Makefile || true + test -f ruby/Makefile && cd ruby && $(MAKE) clean && rm Makefile || true + test -d python/build && cd python && rm -rf build || true +##END## diff --git a/program/bindings/lua/Makefile.am b/program/bindings/lua/Makefile.am new file mode 100644 index 00000000..f1389d62 --- /dev/null +++ b/program/bindings/lua/Makefile.am @@ -0,0 +1,66 @@ +# These files are not mentioned in any other Makefile +# compat-5.1.lua is only necessary for Lua 5.0 in distros where +# it's not already installed. +EXTRA_DIST = README test.lua.bottom compat-5.1r5/compat-5.1.lua + +LIB_VERSION_INFO=0:0:0 + +LUA = @LUA@ +LUA_INSTALL_CMOD = @LUA_INSTALL_CMOD@ +LUA_INSTALL_LMOD = @LUA_INSTALL_LMOD@ +LUA_DEFINES = @LUA_DEFINES@ +LUA_CFLAGS = @LUA_CFLAGS@ +LUA_LFLAGS = @LUA_LFLAGS@ + +CLEANFILES = rrd.o rrd.so test.lua test.rrd test.png + +lualibdir=$(LUA_INSTALL_CMOD) +lualib_LTLIBRARIES = rrd.la +if LUA_NEED_OUR_COMPAT51 + rrd_la_SOURCES = rrdlua.c compat-5.1r5/compat-5.1.c compat-5.1r5/compat-5.1.h + compatdir = $(LUA_INSTALL_LMOD) + compat_DATA = compat-5.1r5/compat-5.1.lua +else + rrd_la_SOURCES = rrdlua.c +endif +rrd_la_LIBADD = -lrrd -lm +rrd_la_LDFLAGS = -module -version-info $(LIB_VERSION_INFO) $(LUA_LFLAGS) -L$(top_builddir)/src/.libs +rrd_la_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir) $(LUA_CFLAGS) $(LUA_DEFINES) -DLIB_VERSION=\"$(LIB_VERSION)\" + +.PHONY: test.lua + +test.lua: test.lua.bottom + @echo "-- Created by Makefile." > test.lua + @echo "-- Test script adapted from the one in the Ruby binding." > test.lua + @echo >> test.lua +if LUA50 + @echo "--- compat-5.1.lua is only required for Lua 5.0 ----------" >> test.lua +if LUA_NEED_OUR_COMPAT51 +if !LUA_SITE_LINSTALL + @echo "original_LUA_PATH = LUA_PATH" >> test.lua + @echo "-- try only compat-5.1.lua installed with RRDtool" >> test.lua + @echo "LUA_PATH = '$(LUA_INSTALL_LMOD)/?.lua'" >> test.lua +endif +endif + @echo "local r = pcall(require, 'compat-5.1')" >> test.lua + @echo "if not r then" >> test.lua + @echo " print('** compat-5.1.lua not found')" >> test.lua + @echo " os.exit(1)" >> test.lua + @echo "end" >> test.lua +if LUA_NEED_OUR_COMPAT51 +if !LUA_SITE_LINSTALL + @echo "LUA_PATH = original_LUA_PATH" >> test.lua + @echo "original_LUA_PATH = nil" >> test.lua +endif +endif + @echo "----------------------------------------------------------" >> test.lua + @echo >> test.lua +endif +if !LUA_SITE_CINSTALL + @echo "package.cpath = '$(LUA_INSTALL_CMOD)/?.so;' .. package.cpath" >> test.lua +endif + @cat test.lua.bottom >> test.lua + +test: test.lua + $(LUA) test.lua + diff --git a/program/bindings/lua/README b/program/bindings/lua/README new file mode 100644 index 00000000..a42339dc --- /dev/null +++ b/program/bindings/lua/README @@ -0,0 +1,68 @@ +RRDLua is a Lua module for RRD functions. + +- Configuration + + From the top dir of RRDtool package, run "./configure", or + "./configure --enable-lua-site-install" if you prefer to install in + Lua's search path. + + You should have lua 5.0, or superior, and respective lua-dev packages + installed before executing configure. + +- Compilation and installation + + Run 'make' and 'sudo make install'. If you don't enable lua-site-install, + the Lua modules will be installed together with RRDtool, under the subdir + lib/lua/. + +- Testing + + Install RRDtool first, as above. Then, enter the bindings/lua dir, run + 'make test' and use your preferred viewer to display the just created + 'test.png'. If you can read "Enjoy Lua RRDtool module!" on the picture, + everything went fine. + +- Using with Lua 5.1 + + Start your programs with: + + ------..----------------------------------------------------------- + package.cpath = ' +#include +#include "lua.h" +#include "lauxlib.h" +#include "compat-5.1.h" + +static void getfield(lua_State *L, int idx, const char *name) { + const char *end = strchr(name, '.'); + lua_pushvalue(L, idx); + while (end) { + lua_pushlstring(L, name, end - name); + lua_gettable(L, -2); + lua_remove(L, -2); + if (lua_isnil(L, -1)) return; + name = end+1; + end = strchr(name, '.'); + } + lua_pushstring(L, name); + lua_gettable(L, -2); + lua_remove(L, -2); +} + +static void setfield(lua_State *L, int idx, const char *name) { + const char *end = strchr(name, '.'); + lua_pushvalue(L, idx); + while (end) { + lua_pushlstring(L, name, end - name); + lua_gettable(L, -2); + /* create table if not found */ + if (lua_isnil(L, -1)) { + lua_pop(L, 1); + lua_newtable(L); + lua_pushlstring(L, name, end - name); + lua_pushvalue(L, -2); + lua_settable(L, -4); + } + lua_remove(L, -2); + name = end+1; + end = strchr(name, '.'); + } + lua_pushstring(L, name); + lua_pushvalue(L, -3); + lua_settable(L, -3); + lua_pop(L, 2); +} + +LUALIB_API void luaL_module(lua_State *L, const char *libname, + const luaL_reg *l, int nup) { + if (libname) { + getfield(L, LUA_GLOBALSINDEX, libname); /* check whether lib already exists */ + if (lua_isnil(L, -1)) { + int env, ns; + lua_pop(L, 1); /* get rid of nil */ + lua_pushliteral(L, "require"); + lua_gettable(L, LUA_GLOBALSINDEX); /* look for require */ + lua_getfenv(L, -1); /* getfenv(require) */ + lua_remove(L, -2); /* remove function require */ + env = lua_gettop(L); + + lua_newtable(L); /* create namespace for lib */ + ns = lua_gettop(L); + getfield(L, env, "package.loaded"); /* get package.loaded table */ + if (lua_isnil(L, -1)) { /* create package.loaded table */ + lua_pop(L, 1); /* remove previous result */ + lua_newtable(L); + lua_pushvalue(L, -1); + setfield(L, env, "package.loaded"); + } + else if (!lua_istable(L, -1)) + luaL_error(L, "name conflict for library `%s'", libname); + lua_pushstring(L, libname); + lua_pushvalue(L, ns); + lua_settable(L, -3); /* package.loaded[libname] = ns */ + lua_pop(L, 1); /* get rid of package.loaded table */ + lua_pushvalue(L, ns); /* copy namespace */ + setfield(L, LUA_GLOBALSINDEX, libname); + lua_remove (L, env); /* remove env */ + } + lua_insert(L, -(nup+1)); /* move library table to below upvalues */ + } + for (; l->name; l++) { + int i; + lua_pushstring(L, l->name); + for (i=0; ifunc, nup); + lua_settable(L, -(nup+3)); + } + lua_pop(L, nup); /* remove upvalues */ +} + diff --git a/program/bindings/lua/compat-5.1r5/compat-5.1.h b/program/bindings/lua/compat-5.1r5/compat-5.1.h new file mode 100644 index 00000000..d835069f --- /dev/null +++ b/program/bindings/lua/compat-5.1r5/compat-5.1.h @@ -0,0 +1,34 @@ +/* +** Compat-5.1 +** Copyright Kepler Project 2004-2006 (http://www.keplerproject.org/compat/) +** $Id$ + +Copyright © 2004-2006 The Kepler Project. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. + +*/ + +#ifndef COMPAT_H + +LUALIB_API void luaL_module(lua_State *L, const char *libname, + const luaL_reg *l, int nup); +#define luaL_openlib luaL_module + +#endif diff --git a/program/bindings/lua/compat-5.1r5/compat-5.1.lua b/program/bindings/lua/compat-5.1r5/compat-5.1.lua new file mode 100644 index 00000000..b662270b --- /dev/null +++ b/program/bindings/lua/compat-5.1r5/compat-5.1.lua @@ -0,0 +1,287 @@ +-- +-- Compat-5.1 +-- Copyright Kepler Project 2004-2006 (http://www.keplerproject.org/compat) +-- According to Lua 5.1 +-- $Id: compat-5.1.lua,v 1.22 2006/02/20 21:12:47 carregal Exp $ +-- +-- Copyright © 2004-2006 The Kepler Project. +-- +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the "Software"), to +-- deal in the Software without restriction, including without limitation the +-- rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +-- sell copies of the Software, and to permit persons to whom the Software is +-- furnished to do so, subject to the following conditions: +-- +-- The above copyright notice and this permission notice shall be included in +-- all copies or substantial portions of the Software. +-- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +-- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +-- IN THE SOFTWARE. +-- + +_COMPAT51 = "Compat-5.1 R5" + +local LUA_DIRSEP = '/' +local LUA_OFSEP = '_' +local OLD_LUA_OFSEP = '' +local POF = 'luaopen_' +local LUA_PATH_MARK = '?' +local LUA_IGMARK = ':' + +local assert, error, getfenv, ipairs, loadfile, loadlib, pairs, setfenv, setmetatable, type = assert, error, getfenv, ipairs, loadfile, loadlib, pairs, setfenv, setmetatable, type +local find, format, gfind, gsub, sub = string.find, string.format, string.gfind, string.gsub, string.sub + +-- +-- avoid overwriting the package table if it's already there +-- +package = package or {} +local _PACKAGE = package + +package.path = LUA_PATH or os.getenv("LUA_PATH") or + ("./?.lua;" .. + "/usr/local/share/lua/5.0/?.lua;" .. + "/usr/local/share/lua/5.0/?/?.lua;" .. + "/usr/local/share/lua/5.0/?/init.lua" ) + +package.cpath = LUA_CPATH or os.getenv("LUA_CPATH") or + "./?.so;" .. + "./l?.so;" .. + "/usr/local/lib/lua/5.0/?.so;" .. + "/usr/local/lib/lua/5.0/l?.so" + +-- +-- make sure require works with standard libraries +-- +package.loaded = package.loaded or {} +package.loaded.debug = debug +package.loaded.string = string +package.loaded.math = math +package.loaded.io = io +package.loaded.os = os +package.loaded.table = table +package.loaded.base = _G +package.loaded.coroutine = coroutine +local _LOADED = package.loaded + +-- +-- avoid overwriting the package.preload table if it's already there +-- +package.preload = package.preload or {} +local _PRELOAD = package.preload + + +-- +-- looks for a file `name' in given path +-- +local function findfile (name, pname) + name = gsub (name, "%.", LUA_DIRSEP) + local path = _PACKAGE[pname] + assert (type(path) == "string", format ("package.%s must be a string", pname)) + for c in gfind (path, "[^;]+") do + c = gsub (c, "%"..LUA_PATH_MARK, name) + local f = io.open (c) + if f then + f:close () + return c + end + end + return nil -- not found +end + + +-- +-- check whether library is already loaded +-- +local function loader_preload (name) + assert (type(name) == "string", format ( + "bad argument #1 to `require' (string expected, got %s)", type(name))) + assert (type(_PRELOAD) == "table", "`package.preload' must be a table") + return _PRELOAD[name] +end + + +-- +-- Lua library loader +-- +local function loader_Lua (name) + assert (type(name) == "string", format ( + "bad argument #1 to `require' (string expected, got %s)", type(name))) + local filename = findfile (name, "path") + if not filename then + return false + end + local f, err = loadfile (filename) + if not f then + error (format ("error loading module `%s' (%s)", name, err)) + end + return f +end + + +local function mkfuncname (name) + name = gsub (name, "^.*%"..LUA_IGMARK, "") + name = gsub (name, "%.", LUA_OFSEP) + return POF..name +end + +local function old_mkfuncname (name) + --name = gsub (name, "^.*%"..LUA_IGMARK, "") + name = gsub (name, "%.", OLD_LUA_OFSEP) + return POF..name +end + +-- +-- C library loader +-- +local function loader_C (name) + assert (type(name) == "string", format ( + "bad argument #1 to `require' (string expected, got %s)", type(name))) + local filename = findfile (name, "cpath") + if not filename then + return false + end + local funcname = mkfuncname (name) + local f, err = loadlib (filename, funcname) + if not f then + funcname = old_mkfuncname (name) + f, err = loadlib (filename, funcname) + if not f then + error (format ("error loading module `%s' (%s)", name, err)) + end + end + return f +end + + +local function loader_Croot (name) + local p = gsub (name, "^([^.]*).-$", "%1") + if p == "" then + return + end + local filename = findfile (p, "cpath") + if not filename then + return + end + local funcname = mkfuncname (name) + local f, err, where = loadlib (filename, funcname) + if f then + return f + elseif where ~= "init" then + error (format ("error loading module `%s' (%s)", name, err)) + end +end + +-- create `loaders' table +package.loaders = package.loaders or { loader_preload, loader_Lua, loader_C, loader_Croot, } +local _LOADERS = package.loaders + + +-- +-- iterate over available loaders +-- +local function load (name, loaders) + -- iterate over available loaders + assert (type (loaders) == "table", "`package.loaders' must be a table") + for i, loader in ipairs (loaders) do + local f = loader (name) + if f then + return f + end + end + error (format ("module `%s' not found", name)) +end + +-- sentinel +local sentinel = function () end + +-- +-- new require +-- +function _G.require (modname) + assert (type(modname) == "string", format ( + "bad argument #1 to `require' (string expected, got %s)", type(name))) + local p = _LOADED[modname] + if p then -- is it there? + if p == sentinel then + error (format ("loop or previous error loading module '%s'", modname)) + end + return p -- package is already loaded + end + local init = load (modname, _LOADERS) + _LOADED[modname] = sentinel + local actual_arg = _G.arg + _G.arg = { modname } + local res = init (modname) + if res then + _LOADED[modname] = res + end + _G.arg = actual_arg + if _LOADED[modname] == sentinel then + _LOADED[modname] = true + end + return _LOADED[modname] +end + + +-- findtable +local function findtable (t, f) + assert (type(f)=="string", "not a valid field name ("..tostring(f)..")") + local ff = f.."." + local ok, e, w = find (ff, '(.-)%.', 1) + while ok do + local nt = rawget (t, w) + if not nt then + nt = {} + t[w] = nt + elseif type(t) ~= "table" then + return sub (f, e+1) + end + t = nt + ok, e, w = find (ff, '(.-)%.', e+1) + end + return t +end + +-- +-- new package.seeall function +-- +function _PACKAGE.seeall (module) + local t = type(module) + assert (t == "table", "bad argument #1 to package.seeall (table expected, got "..t..")") + local meta = getmetatable (module) + if not meta then + meta = {} + setmetatable (module, meta) + end + meta.__index = _G +end + + +-- +-- new module function +-- +function _G.module (modname, ...) + local ns = _LOADED[modname] + if type(ns) ~= "table" then + ns = findtable (_G, modname) + if not ns then + error (string.format ("name conflict for module '%s'", modname)) + end + _LOADED[modname] = ns + end + if not ns._NAME then + ns._NAME = modname + ns._M = ns + ns._PACKAGE = gsub (modname, "[^.]*$", "") + end + setfenv (2, ns) + for i, f in ipairs (arg) do + f (ns) + end +end diff --git a/program/bindings/lua/rrdlua.c b/program/bindings/lua/rrdlua.c new file mode 100644 index 00000000..a7331840 --- /dev/null +++ b/program/bindings/lua/rrdlua.c @@ -0,0 +1,380 @@ +/* + * Lua bindings for RRDTool + * + * This software is licensed to the public under the Free Software + * Foundation's GNU GPL, version 2 or later. You may obtain a copy + * of the GPL by visiting the Free Software Foundations web site at + * www.fsf.org, and a copy is included in this distribution. + * + * Copyright 2008 Fidelis Assis, all rights reserved. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "lua.h" +#include "lauxlib.h" +#include "lualib.h" +#include "../../src/rrd_tool.h" + +#ifdef LUA50 +#ifdef HAVE_COMPAT51 +#include "compat-5.1.h" +#else +#include "compat-5.1r5/compat-5.1.h" +#endif +#endif + +extern void rrd_freemem(void *mem); + +extern int luaopen_rrd (lua_State * L); +typedef int (*RRD_FUNCTION)(int, char **); +typedef rrd_info_t *(RRD_FUNCTION_V)(int, char **); + +/**********************************************************/ + +static void reset_rrd_state(void) +{ + optind = 0; + opterr = 0; + rrd_clear_error(); +} + +static char **make_argv(const char *cmd, lua_State * L) +{ + char **argv; + int i; + int argc = lua_gettop(L) + 1; + + if (!(argv = calloc(argc, sizeof (char *)))) + /* raise an error and never return */ + luaL_error(L, "Can't allocate memory for arguments array", cmd); + + /* fprintf(stderr, "Args:\n"); */ + argv[0] = (char *) cmd; /* Dummy arg. Cast to (char *) because rrd */ + /* functions don't expect (const * char) */ + /* fprintf(stderr, "%s\n", argv[0]); */ + for (i=1; ikey); + switch (data->type) { + case RD_I_CNT: + if (isnan(data->value.u_val)) { + lua_pushnil(L); + } else { + lua_pushnumber(L, (lua_Number) data->value.u_val); + } + lua_rawset(L, -3); + break; + case RD_I_VAL: + lua_pushnumber(L, (lua_Number) data->value.u_val); + lua_rawset(L, -3); + break; + case RD_I_STR: + lua_pushstring(L, data->value.u_str); + lua_rawset(L, -3); + break; + case RD_I_BLO: + lua_pushlstring(L, (const char *) data->value.u_blo.ptr, + data->value.u_blo.size); + lua_rawset(L, -3); + break; + default: + rrd_info_free(p); + return luaL_error(L, "Wrong data type to info call"); + break; + } + data = data->next; + } + rrd_info_free(p); + return 1; +} +#endif + +/**********************************************************/ + +static int +lua_rrd_create (lua_State * L) +{ + rrd_common_call(L, "create", rrd_create); + return 0; +} + +static int +lua_rrd_dump (lua_State * L) +{ + rrd_common_call(L, "dump", rrd_dump); + return 0; +} + +static int +lua_rrd_resize (lua_State * L) +{ + rrd_common_call(L, "resize", rrd_resize); + return 0; +} + +static int +lua_rrd_restore (lua_State * L) +{ + rrd_common_call(L, "restore", rrd_restore); + return 0; +} + +static int +lua_rrd_tune (lua_State * L) +{ + rrd_common_call(L, "tune", rrd_tune); + return 0; +} + +static int +lua_rrd_update (lua_State * L) +{ + rrd_common_call(L, "update", rrd_update); + return 0; +} + +static int +lua_rrd_fetch (lua_State * L) +{ + int argc = lua_gettop(L) + 1; + char **argv = make_argv("fetch", L); + unsigned long i, j, step, ds_cnt; + rrd_value_t *data, *p; + char **names; + time_t t, start, end; + + reset_rrd_state(); + rrd_fetch(argc, argv, &start, &end, &step, &ds_cnt, &names, &data); + free(argv); + if (rrd_test_error()) luaL_error(L, rrd_get_error()); + + lua_pushnumber(L, (lua_Number) start); + lua_pushnumber(L, (lua_Number) step); + /* fprintf(stderr, "%lu, %lu, %lu, %lu\n", start, end, step, num_points); */ + + /* create the ds names array */ + lua_newtable(L); + for (i=0; i 'RRDp', + 'VERSION' => '0.99.0', # finds $VERSION + 'linkext' => {LINKTYPE => ''}, + 'dist' => {COMPRESS=>'gzip', SUFFIX=>'gz'}, +); diff --git a/program/bindings/perl-piped/README b/program/bindings/perl-piped/README new file mode 100644 index 00000000..672061d1 --- /dev/null +++ b/program/bindings/perl-piped/README @@ -0,0 +1,5 @@ +This is a Perl module for using RRDtool process via a set of pipes. + +perl Makefile.PL +make test +make install diff --git a/program/bindings/perl-piped/RRDp.pm b/program/bindings/perl-piped/RRDp.pm new file mode 100644 index 00000000..bf2abe8c --- /dev/null +++ b/program/bindings/perl-piped/RRDp.pm @@ -0,0 +1,213 @@ +package RRDp; + +=head1 NAME + +RRDp - Attach RRDtool from within a perl script via a set of pipes; + +=head1 SYNOPSIS + +use B + +B I + +B I + +$answer = B + +$status = B + +B<$RRDp::user>, B<$RRDp::sys>, B<$RRDp::real>, B<$RRDp::error_mode>, B<$RRDp::error> + +=head1 DESCRIPTION + +With this module you can safely communicate with the RRDtool. + +After every B you have to issue an B command to get +Bs answer to your command. The answer is returned as a pointer, +in order to speed things up. If the last command did not return any +data, B will return an undefined variable. + +If you import the PERFORMANCE variables into your namespace, +you can access RRDtool's internal performance measurements. + +=over 8 + +=item use B + +Load the RRDp::pipe module. + +=item B I + +start RRDtool. The argument must be the path to the RRDtool executable + +=item B I + +pass commands on to RRDtool. Check the RRDtool documentation for +more info on the RRDtool commands. + +B: Due to design limitations, B does not support the +C command - use C instead. + +=item $answer = B + +read RRDtool's response to your command. Note that the $answer variable will +only contain a pointer to the returned data. The reason for this is, that +RRDtool can potentially return quite excessive amounts of data +and we don't want to copy this around in memory. So when you want to +access the contents of $answer you have to use $$answer which dereferences +the variable. + +=item $status = B + +terminates RRDtool and returns RRDtool's status ... + +=item B<$RRDp::user>, B<$RRDp::sys>, B<$RRDp::real> + +these variables will contain totals of the user time, system time and +real time as seen by RRDtool. User time is the time RRDtool is +running, System time is the time spend in system calls and real time +is the total time RRDtool has been running. + +The difference between user + system and real is the time spent +waiting for things like the hard disk and new input from the Perl +script. + +=item B<$RRDp::error_mode> and B<$RRDp::error> + +If you set the variable $RRDp::error_mode to the value 'catch' before you run RRDp::read a potential +ERROR message will not cause the program to abort but will be returned in this variable. If no error +occurs the variable will be empty. + + $RRDp::error_mode = 'catch'; + RRDp::cmd qw(info file.rrd); + print $RRDp::error if $RRDp::error; + +=back + + +=head1 EXAMPLE + + use RRDp; + RRDp::start "/usr/local/bin/rrdtool"; + RRDp::cmd qw(create demo.rrd --step 100 + DS:in:GAUGE:100:U:U + RRA:AVERAGE:0.5:1:10); + $answer = RRDp::read; + print $$answer; + ($usertime,$systemtime,$realtime) = ($RRDp::user,$RRDp::sys,$RRDp::real); + +=head1 SEE ALSO + +For more information on how to use RRDtool, check the manpages. + +=head1 AUTHOR + +Tobias Oetiker + +=cut + +#' this is to make cperl.el happy + +use strict; +use Fcntl; +use Carp; +use IO::Handle; +use IPC::Open2; +use vars qw($Sequence $RRDpid $VERSION); +my $Sequence; +my $RRDpid; + +# Prototypes + +sub start ($); +sub cmd (@); +sub end (); +sub read (); + +$VERSION=1.4003; + +sub start ($){ + croak "rrdtool is already running" + if defined $Sequence; + $Sequence = 'S'; + my $rrdtool = shift @_; + $RRDpid = open2 \*RRDreadHand,\*RRDwriteHand, $rrdtool,"-" + or croak "Can't Start rrdtool: $!"; + RRDwriteHand->autoflush(); #flush after every write + fcntl RRDreadHand, F_SETFL,O_NONBLOCK|O_NDELAY; #make readhandle NON BLOCKING + return $RRDpid; +} + + +sub read () { + croak "RRDp::read can only be called after RRDp::cmd" + unless $Sequence eq 'C'; + $RRDp::error = undef; + $Sequence = 'R'; + my $inmask = 0; + my $srbuf; + my $minibuf; + my $buffer; + my $nfound; + my $timeleft; + vec($inmask,fileno(RRDreadHand),1) = 1; # setup select mask for Reader + while (1) { + my $rout; + $nfound = select($rout=$inmask,undef,undef,2); + if ($nfound == 0 ) { + # here, we could do something sensible ... + next; + } + sysread(RRDreadHand,$srbuf,4096); + $minibuf .= $srbuf; + while ($minibuf =~ s|^(.+?)\n||s) { + my $line = $1; + # print $line,"\n"; + $RRDp::error = undef; + if ($line =~ m|^ERROR|) { + $RRDp::error_mode eq 'catch' ? $RRDp::error = $line : croak $line; + $RRDp::sys = undef; + $RRDp::user = undef; + $RRDp::real = undef; + return undef; + } + elsif ($line =~ m|^OK(?: u:([\d\.]+) s:([\d\.]+) r:([\d\.]+))?|){ + ($RRDp::sys,$RRDp::user,$RRDp::real)=($1,$2,$3); + return \$buffer; + } else { + $buffer .= $line. "\n"; + } + } + } +} + +sub cmd (@){ + croak "RRDp::cmd can only be called after RRDp::read or RRDp::start" + unless $Sequence eq 'R' or $Sequence eq 'S'; + $Sequence = 'C'; + my $cmd = join " ", @_; + if ($Sequence ne 'S') { + } + $cmd =~ s/\n/ /gs; + $cmd =~ s/\s/ /gs; + + # The generated graphs aren't necessarily terminated by a newline, + # causing RRDp::read() to wait for a line matching '^OK' forever. + if ($cmd =~ m/^\s*graph\s+-\s+/) { + croak "RRDp does not support the 'graph -' command - " + . "use 'graphv -' instead"; + } + print RRDwriteHand "$cmd\n"; +} + +sub end (){ + croak "RRDp::end can only be called after RRDp::start" + unless $Sequence; + close RRDwriteHand; + close RRDreadHand; + $Sequence = undef; + waitpid $RRDpid,0; + return $? +} + +1; diff --git a/program/bindings/perl-piped/leaktest.pl b/program/bindings/perl-piped/leaktest.pl new file mode 100644 index 00000000..cebf1c7f --- /dev/null +++ b/program/bindings/perl-piped/leaktest.pl @@ -0,0 +1,16 @@ +#!/bin/perl -w +$ENV{PATH}="/usr/ucb"; +use strict; +use RRDp; +my $rrdfile='/tmp/test.rrd'; +RRDp::start '/home/oetiker/data/projects/AABN-rrdtool/src/rrdtool'; +print grep /rrdtool/,`ps au`; +print grep /rrdtool/,`ps au`; +my $i=0; +while ($i<1000) { + RRDp::cmd 'info /tmp/test.rrd'; + $_ = RRDp::read; + $i++; +} +$_ = RRDp::end; +print grep /rrdtool/,`ps au`; diff --git a/program/bindings/perl-piped/rrdpl.dsp b/program/bindings/perl-piped/rrdpl.dsp new file mode 100644 index 00000000..bf3a15d6 --- /dev/null +++ b/program/bindings/perl-piped/rrdpl.dsp @@ -0,0 +1,115 @@ +# Microsoft Developer Studio Project File - Name="rrd" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=rrd - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "rrdpl.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "rrdpl.mak" CFG="rrd - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "rrd - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "rrd - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "rrd - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x100c /d "NDEBUG" +# ADD RSC /l 0x100c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 + +!ELSEIF "$(CFG)" == "rrd - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "C:\perl\lib\site\auto\RRD\" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /W3 /I "C:\perl\lib\CORE" /D "WIN32" /D VERSION=\"0.02\" /D XS_VERSION=\"0.02\" /D "_DEBUG" /D "_CONSOLE" /FR -I../src/ -I../gd1.2 RRD.c /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x100c /d "_DEBUG" +# ADD RSC /l 0x100c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 c:\perl\lib\core\perl.lib ..\src\debug\rrd.lib ..\gd1.2\debug\gd.lib /dll /incremental:no /debug /machine:IX86 /out:"C:\perl\lib\site\auto\RRD\rrd.dll" +# SUBTRACT LINK32 /pdb:none + +!ENDIF + +# Begin Target + +# Name "rrd - Win32 Release" +# Name "rrd - Win32 Debug" +# Begin Source File + +SOURCE=.\RRD.c +# End Source File +# Begin Source File + +SOURCE=.\RRD.xs + +!IF "$(CFG)" == "rrd - Win32 Release" + +!ELSEIF "$(CFG)" == "rrd - Win32 Debug" + +# Begin Custom Build +InputPath=.\RRD.xs + +"rrd.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + C:\Perl\bin\perl -Ic:\perl\lib -Ic:\perl\lib C:\perl\lib\ExtUtils/xsubpp\ + -typemap C:\perl\lib\ExtUtils\typemap RRD.xs >RRD.tc && C:\Perl\bin\perl\ + -Ic:\perl\lib -Ic:\perl\lib -MExtUtils::Command -e mv RRD.tc RRD.c + +# End Custom Build + +!ENDIF + +# End Source File +# End Target +# End Project diff --git a/program/bindings/perl-piped/rrdpl.dsw b/program/bindings/perl-piped/rrdpl.dsw new file mode 100644 index 00000000..73296e1e --- /dev/null +++ b/program/bindings/perl-piped/rrdpl.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "rrd"=".\rrd.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/program/bindings/perl-piped/t/base.t b/program/bindings/perl-piped/t/base.t new file mode 100755 index 00000000..5f0b2aee --- /dev/null +++ b/program/bindings/perl-piped/t/base.t @@ -0,0 +1,42 @@ +#! /usr/bin/perl + +# this exercises just the perl module .. not RRDtool as such ... + +BEGIN { $| = 1; print "1..5\n"; } +END { + print "not ok 1\n" unless $loaded; + unlink "demo.rrd"; +} + +sub ok +{ + $ok_count++; + my($what, $result) = @_ ; + print "not " unless $result; + print "ok $ok_count $what\n"; +} + +use RRDp; + +$loaded = 1; +$ok_count = 1; + +print "ok 1 module load\n"; + +ok("RRDp::start", RRDp::start "../../src/rrdtool" > 0); + +$now=time(); +RRDp::cmd qw(create demo.rrd --start ), $now, qw(--step 100 ), + qw( DS:in:GAUGE:100:U:U RRA:AVERAGE:0.5:1:10 ); + +$answer = RRDp::read; +ok("RRDp::cmd", -s "demo.rrd" ); + +RRDp::cmd qw(last demo.rrd); +$answer = RRDp::read; + +ok("RRDp::read", $$answer =~ /$now/); + +$status = RRDp::end; + +ok("RRDp::end", $status == 0); diff --git a/program/bindings/perl-shared/MANIFEST b/program/bindings/perl-shared/MANIFEST new file mode 100644 index 00000000..0f30b7eb --- /dev/null +++ b/program/bindings/perl-shared/MANIFEST @@ -0,0 +1,7 @@ +ntmake-build +MANIFEST +README +Makefile.PL +RRDs.pm +RRDs.xs +t/base.t diff --git a/program/bindings/perl-shared/Makefile.PL b/program/bindings/perl-shared/Makefile.PL new file mode 100644 index 00000000..c4573070 --- /dev/null +++ b/program/bindings/perl-shared/Makefile.PL @@ -0,0 +1,47 @@ +use ExtUtils::MakeMaker; +use Config; +# See lib/ExtUtils/MakeMaker.pm for details of how to influence +# the contents of the Makefile that is written. + +# if the last argument when calling Makefile.PL is RPATH=/... and ... is the +# path to librrd.so then the Makefile will be written such that RRDs.so knows +# where to find librrd.so later on ... +my $R=""; +if ($ARGV[-1] =~ /RPATH=(\S+)/){ + pop @ARGV; + my $rp = $1; + for ($^O){ + /linux/ && do{ $R = "-Wl,--rpath -Wl,$rp"}; + /hpux/ && do{ $R = "+b$rp"}; + /solaris/ && do{ $R = "-R$rp"}; + /bsd/ && do{ $R = "-R$rp"}; + /aix/ && do{ $R = "-Wl,-blibpath:$rp"}; + } +} + +# darwin works without this because librrd contains its +# install_name which will includes the final location of the +# library after it is installed. This install_name gets transfered +# to the perl shared object. + +my $librrd; +if ($^O eq 'darwin'){ + $librrd = '-lrrd'; +} +else { + $librrd = "-L../../src/.libs/ $R -lrrd"; +} + +WriteMakefile( + 'NAME' => 'RRDs', + 'VERSION_FROM' => 'RRDs.pm', # finds $VERSION + 'DEFINE' => "-DPERLPATCHLEVEL=$Config{PATCHLEVEL}", + 'INC' => '-I../../src', + # Perl will figure out which one is valid + #'dynamic_lib' => {'OTHERLDFLAGS' => "$librrd -lm"}, + 'depend' => {'RRDs.c' => "../../src/librrd.la"}, + 'LDFROM' => '$(OBJECT) '.$librrd, + 'realclean' => {FILES => 't/demo?.rrd t/demo?.png' }, + ($^O eq 'darwin') ? ( 'LDDLFLAGS' => "-L../../src/.libs/ $Config{lddlflags}" ) : () +); + diff --git a/program/bindings/perl-shared/README b/program/bindings/perl-shared/README new file mode 100644 index 00000000..0918ecf0 --- /dev/null +++ b/program/bindings/perl-shared/README @@ -0,0 +1,12 @@ +These are the Perl bindings for rrdtool as a shared library. To compile do +the following: + +perl Makefile.PL +make test + +(win32 users try perl ntmake.pl) + +* if dynamic linking does not work, try + +perl Makefile.PL LINKTYPE=static +make test diff --git a/program/bindings/perl-shared/RRDs.pm b/program/bindings/perl-shared/RRDs.pm new file mode 100644 index 00000000..3da8ffdb --- /dev/null +++ b/program/bindings/perl-shared/RRDs.pm @@ -0,0 +1,152 @@ +package RRDs; + +use strict; +use vars qw(@ISA $VERSION); + +@ISA = qw(DynaLoader); + +require DynaLoader; + +$VERSION=1.4003; + +bootstrap RRDs $VERSION; + +1; +__END__ + +=head1 NAME + +RRDs - Access RRDtool as a shared module + +=head1 SYNOPSIS + + use RRDs; + RRDs::error + RRDs::last ... + RRDs::info ... + RRDs::create ... + RRDs::update ... + RRDs::updatev ... + RRDs::graph ... + RRDs::fetch ... + RRDs::tune ... + RRDs::times(start, end) + RRDs::dump ... + RRDs::restore ... + RRDs::flushcached ... + +=head1 DESCRIPTION + +=head2 Calling Sequence + +This module accesses RRDtool functionality directly from within Perl. The +arguments to the functions listed in the SYNOPSIS are explained in the regular +RRDtool documentation. The command line call + + rrdtool update mydemo.rrd --template in:out N:12:13 + +gets turned into + + RRDs::update ("mydemo.rrd", "--template", "in:out", "N:12:13"); + +Note that + + --template=in:out + +is also valid. + +The RRDs::times function takes two parameters: a "start" and "end" time. +These should be specified in the B format +used by RRDtool. See the B documentation for a detailed +explanation on how to specify time. + +=head2 Error Handling + +The RRD functions will not abort your program even when they can not make +sense out of the arguments you fed them. + +The function RRDs::error should be called to get the error status +after each function call. If RRDs::error does not return anything +then the previous function has completed its task successfully. + + use RRDs; + RRDs::update ("mydemo.rrd","N:12:13"); + my $ERR=RRDs::error; + die "ERROR while updating mydemo.rrd: $ERR\n" if $ERR; + +=head2 Return Values + +The functions RRDs::last, RRDs::graph, RRDs::info, RRDs::fetch and RRDs::times +return their findings. + +B returns a single INTEGER representing the last update time. + + $lastupdate = RRDs::last ... + +B returns an ARRAY containing the x-size and y-size of the +created image and a pointer to an array with the results of the PRINT arguments. + + ($result_arr,$xsize,$ysize) = RRDs::graph ... + print "Imagesize: ${xsize}x${ysize}\n"; + print "Averages: ", (join ", ", @$averages); + +B returns a pointer to a hash. The keys of the hash +represent the property names of the RRD and the values of the hash are +the values of the properties. + + $hash = RRDs::info "example.rrd"; + foreach my $key (keys %$hash){ + print "$key = $$hash{$key}\n"; + } + +B takes the same parameters as B but it returns a +pointer to hash. The hash returned contains meta information about the +graph. Like its size as well as the position of the graph area on the image. +When calling with and empty filename than the contents of the graph will be +returned in the hash as well (key 'image'). + +B also returns a pointer to hash. The keys of the hash +are concatenated strings of a timestamp, RRA index, and data source name for +each consolidated data point (CDP) written to disk as a result of the +current update call. The hash values are CDP values. + +B is the most complex of +the pack regarding return values. There are 4 values. Two normal +integers, a pointer to an array and a pointer to a array of pointers. + + my ($start,$step,$names,$data) = RRDs::fetch ... + print "Start: ", scalar localtime($start), " ($start)\n"; + print "Step size: $step seconds\n"; + print "DS names: ", join (", ", @$names)."\n"; + print "Data points: ", $#$data + 1, "\n"; + print "Data:\n"; + for my $line (@$data) { + print " ", scalar localtime($start), " ($start) "; + $start += $step; + for my $val (@$line) { + printf "%12.1f ", $val; + } + print "\n"; + } + +B returns two integers which are the number of seconds since +epoch (1970-01-01) for the supplied "start" and "end" arguments, respectively. + +See the examples directory for more ways to use this extension. + +=head1 NOTE + +If you are manipulating the TZ variable you should also call the POSIX +function L to initialize all internal state of the library for properly +operating in the timezone of your choice. + + use POSIX qw(tzset); + $ENV{TZ} = 'CET'; + POSIX::tzset(); + + +=head1 AUTHOR + +Tobias Oetiker Etobi@oetiker.chE + +=cut diff --git a/program/bindings/perl-shared/RRDs.ppd b/program/bindings/perl-shared/RRDs.ppd new file mode 100755 index 00000000..3a28cd9e --- /dev/null +++ b/program/bindings/perl-shared/RRDs.ppd @@ -0,0 +1,10 @@ + + RRDs + Round Robin Database Tool + Tobias Oetiker (tobi@oetiker.ch) + + + + + + diff --git a/program/bindings/perl-shared/RRDs.xs b/program/bindings/perl-shared/RRDs.xs new file mode 100644 index 00000000..029b3bee --- /dev/null +++ b/program/bindings/perl-shared/RRDs.xs @@ -0,0 +1,456 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#include "EXTERN.h" +#include "perl.h" +#include "XSUB.h" + +#ifdef __cplusplus +} +#endif + +/* + * rrd_tool.h includes config.h, but at least on Ubuntu Breezy Badger + * 5.10 with gcc 4.0.2, the C preprocessor picks up Perl's config.h + * which is included from the Perl includes and never reads rrdtool's + * config.h. Without including rrdtool's config.h, this module does + * not compile, so include it here with an explicit path. + * + * Because rrdtool's config.h redefines VERSION which is originally + * set via Perl's Makefile.PL and passed down to the C compiler's + * command line, save the original value and reset it after the + * includes. + */ +#define VERSION_SAVED VERSION +#undef VERSION +#include "../../rrd_config.h" +#include "../../src/rrd_tool.h" +#undef VERSION +#define VERSION VERSION_SAVED +#undef VERSION_SAVED + +/* perl 5.004 compatibility */ +#if PERLPATCHLEVEL < 5 +#define PL_sv_undef sv_undef +#endif + + +#define rrdcode(name) \ + argv = (char **) malloc((items+1)*sizeof(char *));\ + argv[0] = "dummy";\ + for (i = 0; i < items; i++) { \ + STRLEN len; \ + char *handle= SvPV(ST(i),len);\ + /* actually copy the data to make sure possible modifications \ + on the argv data does not backfire into perl */ \ + argv[i+1] = (char *) malloc((strlen(handle)+1)*sizeof(char)); \ + strcpy(argv[i+1],handle); \ + } \ + rrd_clear_error();\ + RETVAL=name(items+1,argv); \ + for (i=0; i < items; i++) {\ + free(argv[i+1]);\ + } \ + free(argv);\ + \ + if (rrd_test_error()) XSRETURN_UNDEF; + +#define hvs(VAL) hv_store_ent(hash, sv_2mortal(newSVpv(data->key,0)),VAL,0) + +#define rrdinfocode(name) \ + /* prepare argument list */ \ + argv = (char **) malloc((items+1)*sizeof(char *)); \ + argv[0] = "dummy"; \ + for (i = 0; i < items; i++) { \ + STRLEN len; \ + char *handle= SvPV(ST(i),len); \ + /* actually copy the data to make sure possible modifications \ + on the argv data does not backfire into perl */ \ + argv[i+1] = (char *) malloc((strlen(handle)+1)*sizeof(char)); \ + strcpy(argv[i+1],handle); \ + } \ + rrd_clear_error(); \ + data=name(items+1, argv); \ + for (i=0; i < items; i++) { \ + free(argv[i+1]); \ + } \ + free(argv); \ + if (rrd_test_error()) XSRETURN_UNDEF; \ + hash = newHV(); \ + save=data; \ + while (data) { \ + /* the newSV will get copied by hv so we create it as a mortal \ + to make sure it does not keep hanging round after the fact */ \ + switch (data->type) { \ + case RD_I_VAL: \ + if (isnan(data->value.u_val)) \ + hvs(&PL_sv_undef); \ + else \ + hvs(newSVnv(data->value.u_val)); \ + break; \ + case RD_I_INT: \ + hvs(newSViv(data->value.u_int)); \ + break; \ + case RD_I_CNT: \ + hvs(newSViv(data->value.u_cnt)); \ + break; \ + case RD_I_STR: \ + hvs(newSVpv(data->value.u_str,0)); \ + break; \ + case RD_I_BLO: \ + hvs(newSVpv(data->value.u_blo.ptr,data->value.u_blo.size)); \ + break; \ + } \ + data = data->next; \ + } \ + rrd_info_free(save); \ + RETVAL = newRV_noinc((SV*)hash); + +/* + * should not be needed if libc is linked (see ntmake.pl) +#ifdef WIN32 + #define free free + #define malloc malloc + #define realloc realloc +#endif +*/ + + +MODULE = RRDs PACKAGE = RRDs PREFIX = rrd_ + +BOOT: +#ifdef MUST_DISABLE_SIGFPE + signal(SIGFPE,SIG_IGN); +#endif +#ifdef MUST_DISABLE_FPMASK + fpsetmask(0); +#endif + + +SV* +rrd_error() + CODE: + if (! rrd_test_error()) XSRETURN_UNDEF; + RETVAL = newSVpv(rrd_get_error(),0); + OUTPUT: + RETVAL + + +int +rrd_last(...) + PROTOTYPE: @ + PREINIT: + int i; + char **argv; + CODE: + rrdcode(rrd_last); + OUTPUT: + RETVAL + +int +rrd_first(...) + PROTOTYPE: @ + PREINIT: + int i; + char **argv; + CODE: + rrdcode(rrd_first); + OUTPUT: + RETVAL + + +int +rrd_create(...) + PROTOTYPE: @ + PREINIT: + int i; + char **argv; + CODE: + rrdcode(rrd_create); + RETVAL = 1; + OUTPUT: + RETVAL + + +int +rrd_update(...) + PROTOTYPE: @ + PREINIT: + int i; + char **argv; + CODE: + rrdcode(rrd_update); + RETVAL = 1; + OUTPUT: + RETVAL + + +int +rrd_tune(...) + PROTOTYPE: @ + PREINIT: + int i; + char **argv; + CODE: + rrdcode(rrd_tune); + RETVAL = 1; + OUTPUT: + RETVAL + + +SV * +rrd_graph(...) + PROTOTYPE: @ + PREINIT: + char **calcpr=NULL; + int i,xsize,ysize; + double ymin,ymax; + char **argv; + AV *retar; + PPCODE: + argv = (char **) malloc((items+1)*sizeof(char *)); + argv[0] = "dummy"; + for (i = 0; i < items; i++) { + STRLEN len; + char *handle = SvPV(ST(i),len); + /* actually copy the data to make sure possible modifications + on the argv data does not backfire into perl */ + argv[i+1] = (char *) malloc((strlen(handle)+1)*sizeof(char)); + strcpy(argv[i+1],handle); + } + rrd_clear_error(); + rrd_graph(items+1,argv,&calcpr,&xsize,&ysize,NULL,&ymin,&ymax); + for (i=0; i < items; i++) { + free(argv[i+1]); + } + free(argv); + + if (rrd_test_error()) { + if(calcpr) + for(i=0;calcpr[i];i++) + rrd_freemem(calcpr[i]); + XSRETURN_UNDEF; + } + retar=newAV(); + if(calcpr){ + for(i=0;calcpr[i];i++){ + av_push(retar,newSVpv(calcpr[i],0)); + rrd_freemem(calcpr[i]); + } + rrd_freemem(calcpr); + } + EXTEND(sp,4); + PUSHs(sv_2mortal(newRV_noinc((SV*)retar))); + PUSHs(sv_2mortal(newSViv(xsize))); + PUSHs(sv_2mortal(newSViv(ysize))); + +SV * +rrd_fetch(...) + PROTOTYPE: @ + PREINIT: + time_t start,end; + unsigned long step, ds_cnt,i,ii; + rrd_value_t *data,*datai; + char **argv; + char **ds_namv; + AV *retar,*line,*names; + PPCODE: + argv = (char **) malloc((items+1)*sizeof(char *)); + argv[0] = "dummy"; + for (i = 0; i < items; i++) { + STRLEN len; + char *handle= SvPV(ST(i),len); + /* actually copy the data to make sure possible modifications + on the argv data does not backfire into perl */ + argv[i+1] = (char *) malloc((strlen(handle)+1)*sizeof(char)); + strcpy(argv[i+1],handle); + } + rrd_clear_error(); + rrd_fetch(items+1,argv,&start,&end,&step,&ds_cnt,&ds_namv,&data); + for (i=0; i < items; i++) { + free(argv[i+1]); + } + free(argv); + if (rrd_test_error()) XSRETURN_UNDEF; + /* convert the ds_namv into perl format */ + names=newAV(); + for (ii = 0; ii < ds_cnt; ii++){ + av_push(names,newSVpv(ds_namv[ii],0)); + rrd_freemem(ds_namv[ii]); + } + rrd_freemem(ds_namv); + /* convert the data array into perl format */ + datai=data; + retar=newAV(); + for (i = start+step; i <= end; i += step){ + line = newAV(); + for (ii = 0; ii < ds_cnt; ii++){ + av_push(line,(isnan(*datai) ? &PL_sv_undef : newSVnv(*datai))); + datai++; + } + av_push(retar,newRV_noinc((SV*)line)); + } + rrd_freemem(data); + EXTEND(sp,5); + PUSHs(sv_2mortal(newSViv(start+step))); + PUSHs(sv_2mortal(newSViv(step))); + PUSHs(sv_2mortal(newRV_noinc((SV*)names))); + PUSHs(sv_2mortal(newRV_noinc((SV*)retar))); + +SV * +rrd_times(start, end) + char *start + char *end + PREINIT: + rrd_time_value_t start_tv, end_tv; + char *parsetime_error = NULL; + time_t start_tmp, end_tmp; + PPCODE: + rrd_clear_error(); + if ((parsetime_error = rrd_parsetime(start, &start_tv))) { + rrd_set_error("start time: %s", parsetime_error); + XSRETURN_UNDEF; + } + if ((parsetime_error = rrd_parsetime(end, &end_tv))) { + rrd_set_error("end time: %s", parsetime_error); + XSRETURN_UNDEF; + } + if (rrd_proc_start_end(&start_tv, &end_tv, &start_tmp, &end_tmp) == -1) { + XSRETURN_UNDEF; + } + EXTEND(sp,2); + PUSHs(sv_2mortal(newSVuv(start_tmp))); + PUSHs(sv_2mortal(newSVuv(end_tmp))); + +int +rrd_xport(...) + PROTOTYPE: @ + PREINIT: + time_t start,end; + int xsize; + unsigned long step, col_cnt,row_cnt,i,ii; + rrd_value_t *data,*ptr; + char **argv,**legend_v; + AV *retar,*line,*names; + PPCODE: + argv = (char **) malloc((items+1)*sizeof(char *)); + argv[0] = "dummy"; + for (i = 0; i < items; i++) { + STRLEN len; + char *handle = SvPV(ST(i),len); + /* actually copy the data to make sure possible modifications + on the argv data does not backfire into perl */ + argv[i+1] = (char *) malloc((strlen(handle)+1)*sizeof(char)); + strcpy(argv[i+1],handle); + } + rrd_clear_error(); + rrd_xport(items+1,argv,&xsize,&start,&end,&step,&col_cnt,&legend_v,&data); + for (i=0; i < items; i++) { + free(argv[i+1]); + } + free(argv); + if (rrd_test_error()) XSRETURN_UNDEF; + + /* convert the legend_v into perl format */ + names=newAV(); + for (ii = 0; ii < col_cnt; ii++){ + av_push(names,newSVpv(legend_v[ii],0)); + rrd_freemem(legend_v[ii]); + } + rrd_freemem(legend_v); + + /* convert the data array into perl format */ + ptr=data; + retar=newAV(); + for (i = start+step; i <= end; i += step){ + line = newAV(); + for (ii = 0; ii < col_cnt; ii++){ + av_push(line,(isnan(*ptr) ? &PL_sv_undef : newSVnv(*ptr))); + ptr++; + } + av_push(retar,newRV_noinc((SV*)line)); + } + rrd_freemem(data); + + EXTEND(sp,7); + PUSHs(sv_2mortal(newSViv(start+step))); + PUSHs(sv_2mortal(newSViv(end))); + PUSHs(sv_2mortal(newSViv(step))); + PUSHs(sv_2mortal(newSViv(col_cnt))); + PUSHs(sv_2mortal(newRV_noinc((SV*)names))); + PUSHs(sv_2mortal(newRV_noinc((SV*)retar))); + +SV* +rrd_info(...) + PROTOTYPE: @ + PREINIT: + rrd_info_t *data,*save; + int i; + char **argv; + HV *hash; + CODE: + rrdinfocode(rrd_info); + OUTPUT: + RETVAL + +SV* +rrd_updatev(...) + PROTOTYPE: @ + PREINIT: + rrd_info_t *data,*save; + int i; + char **argv; + HV *hash; + CODE: + rrdinfocode(rrd_update_v); + OUTPUT: + RETVAL + +SV* +rrd_graphv(...) + PROTOTYPE: @ + PREINIT: + rrd_info_t *data,*save; + int i; + char **argv; + HV *hash; + CODE: + rrdinfocode(rrd_graph_v); + OUTPUT: + RETVAL + +int +rrd_dump(...) + PROTOTYPE: @ + PREINIT: + int i; + char **argv; + CODE: + rrdcode(rrd_dump); + RETVAL = 1; + OUTPUT: + RETVAL + +int +rrd_restore(...) + PROTOTYPE: @ + PREINIT: + int i; + char **argv; + CODE: + rrdcode(rrd_restore); + RETVAL = 1; + OUTPUT: + RETVAL + +int +rrd_flushcached(...) + PROTOTYPE: @ + PREINIT: + int i; + char **argv; + CODE: + rrdcode(rrd_flushcached); + OUTPUT: + RETVAL diff --git a/program/bindings/perl-shared/ntmake-build b/program/bindings/perl-shared/ntmake-build new file mode 100644 index 00000000..047b76f2 --- /dev/null +++ b/program/bindings/perl-shared/ntmake-build @@ -0,0 +1,27 @@ +use ExtUtils::MakeMaker; +use Config; +# See lib/ExtUtils/MakeMaker.pm for details of how to influence +# the contents of the Makefile that is written. +# Run VCVARS32.BAT before generating makefile/compiling. +WriteMakefile( + 'NAME' => 'RRDs', + 'VERSION_FROM' => 'RRDs.pm', +# 'DEFINE' => "-DPERLPATCHLEVEL=$Config{PATCHLEVEL}", +# keep compatible w/ ActiveState 5xx builds + 'DEFINE' => "-DPERLPATCHLEVEL=5", + + 'INC' => '-I../../src/ "-I/Program Files/GnuWin32/include"', +# Since we are now using GnuWin32 libraries dynamically (instead of static +# complile with code redistributed with rrdtool), use /MD instead of /MT. +# Yes, this means we need msvcrt.dll but GnuWin32 dlls already require it +# and it is available on most versions of Windows. + 'OPTIMIZE' => '-O2 -MD', + 'LIBS' => '../../src/release/rrd.lib "/Program Files/GnuWin32/lib/libart_lgpl.lib" "/Program Files/GnuWin32/lib/libz.lib" "/Program Files/GnuWin32/lib/libpng.lib" "/Program Files/GnuWin32/lib/libfreetype.lib"', + 'realclean' => {FILES => 't/demo?.rrd t/demo?.png' }, + ($] ge '5.005') ? ( + 'AUTHOR' => 'Tobias Oetiker (tobi@oetiker.ch)', + 'ABSTRACT' => 'Round Robin Database Tool', + ) : () + + +); diff --git a/program/bindings/perl-shared/t/base.t b/program/bindings/perl-shared/t/base.t new file mode 100755 index 00000000..7b6c016a --- /dev/null +++ b/program/bindings/perl-shared/t/base.t @@ -0,0 +1,171 @@ +#! /usr/bin/perl + +BEGIN { $| = 1; print "1..7\n"; } +END { + print "not ok 1\n" unless $loaded; + unlink "demo.rrd"; +} + +sub ok +{ + my($what, $result) = @_ ; + $ok_count++; + print "not " unless $result; + print "ok $ok_count $what\n"; +} + +use strict; +use vars qw(@ISA $loaded); + +use RRDs; +$loaded = 1; +my $ok_count = 1; + +ok("loading",1); + +######################### End of black magic. + +my $STEP = 100; +my $RUNS = 500; +my $GRUNS = 4; +my $RRD1 = "demo1.rrd"; +my $RRD2 = "demo2.rrd"; +my $PNG1 = "demo1.png"; +my $PNG2 = "demo2.png"; +my $time = 30*int(time/30); +my $START = $time-$RUNS*$STEP; + +my @options = ("-b", $START, "-s", $STEP, + "DS:a:GAUGE:2000:U:U", + "DS:b:GAUGE:200:U:U", + "DS:c:GAUGE:200:U:U", + "DS:d:GAUGE:200:U:U", + "DS:e:DERIVE:200:U:U", + "RRA:AVERAGE:0.5:1:5000", + "RRA:AVERAGE:0.5:10:500"); + +print "* Creating RRD $RRD1 starting at $time.\n\n"; +RRDs::create $RRD1, @options; + +my $ERROR = RRDs::error; +ok("create 1", !$ERROR); # 2 +if ($ERROR) { + die "$0: unable to create `$RRD1': $ERROR\n"; +} + +print "* Creating RRD $RRD2 starting at $time.\n\n"; +RRDs::create $RRD2, @options; + +$ERROR= RRDs::error; +ok("create 2",!$ERROR); # 3 +if ($ERROR) { + die "$0: unable to create `$RRD2': $ERROR\n"; +} + +my $last = RRDs::last $RRD1; +if ($ERROR = RRDs::error) { + die "$0: unable to get last `$RRD1': $ERROR\n"; +} +ok("last 1", $last == $START); # 4 + +$last = RRDs::last $RRD2; +if ($ERROR = RRDs::error) { + die "$0: unable to get last `$RRD2': $ERROR\n"; +} +ok("last 2", $last == $START); # 5 + +print "* Filling $RRD1 and $RRD2 with $RUNS*5 values. One moment please ...\n"; +print "* If you are running over NFS this will take *MUCH* longer\n\n"; + +srand(int($time / 100)); + +@options = (); + +my $counter = 1e7; +for (my $t=$START+1; + $t<$START+$STEP*$RUNS; + $t+=$STEP+int((rand()-0.5)*7)){ + $counter += int(2500*sin($t/2000)*$STEP); + my $data = (1000+500*sin($t/1000)).":". + (1000+900*sin($t/2330)).":". + (2000*cos($t/1550)).":". + (3220*sin($t/3420)).":$counter"; + push(@options, "$t:$data"); + RRDs::update $RRD1, "$t:$data"; + if ($ERROR = RRDs::error) { + warn "$0: unable to update `$RRD1': $ERROR\n"; + } +} + +ok("update 1",!$ERROR); # 3 + +RRDs::update $RRD2, @options; + +ok("update 2",!$ERROR); # 3 + +if ($ERROR = RRDs::error) { + die "$0: unable to update `$RRD2': $ERROR\n"; +} + +print "* Creating $GRUNS graphs: $PNG1 & $PNG2\n\n"; +my $now = $time; +for (my $i=0;$i<$GRUNS;$i++) { + my @rrd_pngs = ($RRD1, $PNG1, $RRD2, $PNG2); + while (@rrd_pngs) { + my $RRD = shift(@rrd_pngs); + my $PNG = shift(@rrd_pngs); + my ($graphret,$xs,$ys) = RRDs::graph $PNG, "--title", 'Test GRAPH', + "--vertical-label", 'Dummy Units', "--start", (-$RUNS*$STEP), + "DEF:alpha=$RRD:a:AVERAGE", + "DEF:beta=$RRD:b:AVERAGE", + "DEF:gamma=$RRD:c:AVERAGE", + "DEF:delta=$RRD:d:AVERAGE", + "DEF:epsilon=$RRD:e:AVERAGE", + "CDEF:calc=alpha,beta,+,2,/", + "AREA:alpha#0022e9:Short", + "STACK:beta#00b871:Demo Text", + "LINE1:gamma#ff0000:Line 1", + "LINE2:delta#888800:Line 2", + "LINE3:calc#00ff44:Line 3", + "LINE3:epsilon#000000:Line 4", + "HRULE:1500#ff8800:Horizontal Line at 1500", + "PRINT:alpha:AVERAGE:Average Alpha %1.2lf", + "PRINT:alpha:MIN:Min Alpha %1.2lf %s", + "PRINT:alpha:MIN:Min Alpha %1.2lf", + "PRINT:alpha:MAX:Max Alpha %1.2lf", + "GPRINT:calc:AVERAGE:Average calc %1.2lf %s", + "GPRINT:calc:AVERAGE:Average calc %1.2lf", + "GPRINT:calc:MAX:Max calc %1.2lf", + "GPRINT:calc:MIN:Min calc %1.2lf", + "VRULE:".($now-3600)."#008877:60 Minutes ago", + "VRULE:".($now-7200)."#008877:120 Minutes ago"; + + if ($ERROR = RRDs::error) { + print "ERROR: $ERROR\n"; + } else { + print "Image Size: ${xs}x${ys}\n"; + print "Graph Return:\n",(join "\n", @$graphret),"\n\n"; + } + } +} + + + +my ($start,$step,$names,$array) = RRDs::fetch $RRD1, "AVERAGE"; +$ERROR = RRDs::error; +print "ERROR: $ERROR\n" if $ERROR ; +print "start=$start, step=$step\n"; +print " "; +map {printf("%12s",$_)} @$names ; +foreach my $line (@$array){ + print "".localtime($start)," "; + $start += $step; + foreach my $val (@$line) { + if (not defined $val){ + printf "%12s", "UNKNOWN"; + } else { + printf "%12.1f", $val; + } + } + print "\n"; +} diff --git a/program/bindings/python/ACKNOWLEDGEMENT b/program/bindings/python/ACKNOWLEDGEMENT new file mode 100644 index 00000000..8cf36589 --- /dev/null +++ b/program/bindings/python/ACKNOWLEDGEMENT @@ -0,0 +1,7 @@ +ACKNOWLEDGMENT +============== + +This is a list of people who have made contributions to py-rrdtool. + +Matthew W. Samsonoff +Brian E. Gallew diff --git a/program/bindings/python/AUTHORS b/program/bindings/python/AUTHORS new file mode 100644 index 00000000..b3b5713d --- /dev/null +++ b/program/bindings/python/AUTHORS @@ -0,0 +1 @@ +Hye-Shik Chang diff --git a/program/bindings/python/COPYING b/program/bindings/python/COPYING new file mode 100644 index 00000000..b1e3f5a2 --- /dev/null +++ b/program/bindings/python/COPYING @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/program/bindings/python/README b/program/bindings/python/README new file mode 100644 index 00000000..c234a6bb --- /dev/null +++ b/program/bindings/python/README @@ -0,0 +1,34 @@ +Based on Python-RRDtool 0.2.1 +----------------------------- + +The python-rrdtool provides a interface to rrdtool, the wonderful +graphing and logging utility. This wrapper implementation has +worked from the scratch (without SWIG), and it's under LGPL. + +This module have not documented yet. Please refer pydoc. + + +Project +------- + +Homepage: http://www.nongnu.org/py-rrdtool/ + +Mailing Lists: + + CVS Checkins py-rrdtool-cvs@nongnu.org + Users & Hackers py-rrdtool-users@nongnu.org + + +Original Author +--------------- + +Hye-Shik Chang + +Any comments, suggestions, and/or patches are very welcome. +Thank you for using py-rrdtool! + + +CHANGES +------- +2008-05-19 - tobi +* rewrote the info method to conform to rrdtool info standard diff --git a/program/bindings/python/rrdtoolmodule.c b/program/bindings/python/rrdtoolmodule.c new file mode 100644 index 00000000..a2647b50 --- /dev/null +++ b/program/bindings/python/rrdtoolmodule.c @@ -0,0 +1,642 @@ +/* + * rrdtoolmodule.c + * + * RRDTool Python binding + * + * Author : Hye-Shik Chang + * Date : $Date: 2003/02/22 07:41:19 $ + * Created : 23 May 2002 + * + * $Revision: 1.14 $ + * + * ========================================================================== + * This file is part of py-rrdtool. + * + * py-rrdtool is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * py-rrdtool is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Foobar; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ifdef UNUSED +#elif defined(__GNUC__) +# define UNUSED(x) x __attribute__((unused)) +#elif defined(__LCLINT__) +# define UNUSED(x) /*@unused@*/ x +#else +# define UNUSED(x) x +#endif + + +#include "../../rrd_config.h" +static const char *__version__ = PACKAGE_VERSION; + +#include "Python.h" +#include "../../src/rrd_tool.h" +//#include "rrd.h" +//#include "rrd_extra.h" + +static PyObject *ErrorObject; +extern int optind; +extern int opterr; + +/* forward declaration to keep compiler happy */ +void initrrdtool( + void); + +static int create_args( + char *command, + PyObject * args, + int *argc, + char ***argv) +{ + PyObject *o, *lo; + int args_count, + argv_count, + element_count, + i, j; + + args_count = PyTuple_Size(args); + element_count = 0; + for (i = 0; i < args_count; i++) { + o = PyTuple_GET_ITEM(args, i); + if (PyString_Check(o)) + element_count++; + else if (PyList_CheckExact(o)) + element_count += PyList_Size(o); + else { + PyErr_Format(PyExc_TypeError, "argument %d must be string or list of strings", i); + return -1; + } + } + + *argv = PyMem_New(char *, + element_count + 1); + + if (*argv == NULL) + return -1; + + argv_count = 0; + for (i = 0; i < args_count; i++) { + o = PyTuple_GET_ITEM(args, i); + if (PyString_Check(o)) { + argv_count++; + (*argv)[argv_count] = PyString_AS_STRING(o); + } else if (PyList_CheckExact(o)) + for (j = 0; j < PyList_Size(o); j++) { + lo = PyList_GetItem(o, j); + if (PyString_Check(lo)) { + argv_count++; + (*argv)[argv_count] = PyString_AS_STRING(lo); + } else { + PyMem_Del(*argv); + PyErr_Format(PyExc_TypeError, "element %d in argument %d must be string", j, i); + return -1; + } + } + else { + PyMem_Del(*argv); + PyErr_Format(PyExc_TypeError, "argument %d must be string or list of strings", i); + return -1; + } + } + + (*argv)[0] = command; + *argc = element_count + 1; + + /* reset getopt state */ + opterr = optind = 0; + + return 0; +} + +static void destroy_args( + char ***argv) +{ + PyMem_Del(*argv); + *argv = NULL; +} + +static char PyRRD_create__doc__[] = + "create(args..): Set up a new Round Robin Database\n\ + create filename [--start|-b start time] \ +[--step|-s step] [DS:ds-name:DST:heartbeat:min:max] \ +[RRA:CF:xff:steps:rows]"; + +static PyObject *PyRRD_create( + PyObject UNUSED(*self), + PyObject * args) +{ + PyObject *r; + char **argv; + int argc; + + if (create_args("create", args, &argc, &argv) < 0) + return NULL; + + if (rrd_create(argc, argv) == -1) { + PyErr_SetString(ErrorObject, rrd_get_error()); + rrd_clear_error(); + r = NULL; + } else { + Py_INCREF(Py_None); + r = Py_None; + } + + destroy_args(&argv); + return r; +} + +static char PyRRD_update__doc__[] = + "update(args..): Store a new set of values into the rrd\n" + " update filename [--template|-t ds-name[:ds-name]...] " + "N|timestamp:value[:value...] [timestamp:value[:value...] ...]"; + +static PyObject *PyRRD_update( + PyObject UNUSED(*self), + PyObject * args) +{ + PyObject *r; + char **argv; + int argc; + + if (create_args("update", args, &argc, &argv) < 0) + return NULL; + + if (rrd_update(argc, argv) == -1) { + PyErr_SetString(ErrorObject, rrd_get_error()); + rrd_clear_error(); + r = NULL; + } else { + Py_INCREF(Py_None); + r = Py_None; + } + + destroy_args(&argv); + return r; +} + +static char PyRRD_fetch__doc__[] = + "fetch(args..): fetch data from an rrd.\n" + " fetch filename CF [--resolution|-r resolution] " + "[--start|-s start] [--end|-e end]"; + +static PyObject *PyRRD_fetch( + PyObject UNUSED(*self), + PyObject * args) +{ + PyObject *r; + rrd_value_t *data, *datai; + unsigned long step, ds_cnt; + time_t start, end; + int argc; + char **argv, **ds_namv; + + if (create_args("fetch", args, &argc, &argv) < 0) + return NULL; + + if (rrd_fetch(argc, argv, &start, &end, &step, + &ds_cnt, &ds_namv, &data) == -1) { + PyErr_SetString(ErrorObject, rrd_get_error()); + rrd_clear_error(); + r = NULL; + } else { + /* Return : + ((start, end, step), (name1, name2, ...), [(data1, data2, ..), ...]) */ + PyObject *range_tup, *dsnam_tup, *data_list, *t; + unsigned long i, j, row; + rrd_value_t dv; + + row = (end - start) / step; + + r = PyTuple_New(3); + range_tup = PyTuple_New(3); + dsnam_tup = PyTuple_New(ds_cnt); + data_list = PyList_New(row); + PyTuple_SET_ITEM(r, 0, range_tup); + PyTuple_SET_ITEM(r, 1, dsnam_tup); + PyTuple_SET_ITEM(r, 2, data_list); + + datai = data; + + PyTuple_SET_ITEM(range_tup, 0, PyInt_FromLong((long) start)); + PyTuple_SET_ITEM(range_tup, 1, PyInt_FromLong((long) end)); + PyTuple_SET_ITEM(range_tup, 2, PyInt_FromLong((long) step)); + + for (i = 0; i < ds_cnt; i++) + PyTuple_SET_ITEM(dsnam_tup, i, PyString_FromString(ds_namv[i])); + + for (i = 0; i < row; i++) { + t = PyTuple_New(ds_cnt); + PyList_SET_ITEM(data_list, i, t); + + for (j = 0; j < ds_cnt; j++) { + dv = *(datai++); + if (isnan(dv)) { + PyTuple_SET_ITEM(t, j, Py_None); + Py_INCREF(Py_None); + } else { + PyTuple_SET_ITEM(t, j, PyFloat_FromDouble((double) dv)); + } + } + } + + for (i = 0; i < ds_cnt; i++) + rrd_freemem(ds_namv[i]); + rrd_freemem(ds_namv); /* rrdtool don't use PyMem_Malloc :) */ + rrd_freemem(data); + } + + destroy_args(&argv); + return r; +} + +static char PyRRD_graph__doc__[] = + "graph(args..): Create a graph based on data from one or several RRD\n" + " graph filename [-s|--start seconds] " + "[-e|--end seconds] [-x|--x-grid x-axis grid and label] " + "[-y|--y-grid y-axis grid and label] [--alt-y-grid] [--alt-y-mrtg] " + "[--alt-autoscale] [--alt-autoscale-max] [--units-exponent] value " + "[-v|--vertical-label text] [-w|--width pixels] [-h|--height pixels] " + "[-i|--interlaced] " + "[-f|--imginfo formatstring] [-a|--imgformat GIF|PNG|GD] " + "[-B|--background value] [-O|--overlay value] " + "[-U|--unit value] [-z|--lazy] [-o|--logarithmic] " + "[-u|--upper-limit value] [-l|--lower-limit value] " + "[-g|--no-legend] [-r|--rigid] [--step value] " + "[-b|--base value] [-c|--color COLORTAG#rrggbb] " + "[-t|--title title] [DEF:vname=rrd:ds-name:CF] " + "[CDEF:vname=rpn-expression] [PRINT:vname:CF:format] " + "[GPRINT:vname:CF:format] [COMMENT:text] " + "[HRULE:value#rrggbb[:legend]] [VRULE:time#rrggbb[:legend]] " + "[LINE{1|2|3}:vname[#rrggbb[:legend]]] " + "[AREA:vname[#rrggbb[:legend]]] " "[STACK:vname[#rrggbb[:legend]]]"; + +static PyObject *PyRRD_graph( + PyObject UNUSED(*self), + PyObject * args) +{ + PyObject *r; + char **argv, **calcpr; + int argc, xsize, ysize, i; + double ymin, ymax; + + if (create_args("graph", args, &argc, &argv) < 0) + return NULL; + + if (rrd_graph(argc, argv, &calcpr, &xsize, &ysize, NULL, &ymin, &ymax) == + -1) { + PyErr_SetString(ErrorObject, rrd_get_error()); + rrd_clear_error(); + r = NULL; + } else { + r = PyTuple_New(3); + + PyTuple_SET_ITEM(r, 0, PyInt_FromLong((long) xsize)); + PyTuple_SET_ITEM(r, 1, PyInt_FromLong((long) ysize)); + + if (calcpr) { + PyObject *e, *t; + + e = PyList_New(0); + PyTuple_SET_ITEM(r, 2, e); + + for (i = 0; calcpr[i]; i++) { + t = PyString_FromString(calcpr[i]); + PyList_Append(e, t); + Py_DECREF(t); + rrd_freemem(calcpr[i]); + } + rrd_freemem(calcpr); + } else { + Py_INCREF(Py_None); + PyTuple_SET_ITEM(r, 2, Py_None); + } + } + + destroy_args(&argv); + return r; +} + +static char PyRRD_tune__doc__[] = + "tune(args...): Modify some basic properties of a Round Robin Database\n" + " tune filename [--heartbeat|-h ds-name:heartbeat] " + "[--minimum|-i ds-name:min] [--maximum|-a ds-name:max] " + "[--data-source-type|-d ds-name:DST] [--data-source-rename|-r old-name:new-name]"; + +static PyObject *PyRRD_tune( + PyObject UNUSED(*self), + PyObject * args) +{ + PyObject *r; + char **argv; + int argc; + + if (create_args("tune", args, &argc, &argv) < 0) + return NULL; + + if (rrd_tune(argc, argv) == -1) { + PyErr_SetString(ErrorObject, rrd_get_error()); + rrd_clear_error(); + r = NULL; + } else { + Py_INCREF(Py_None); + r = Py_None; + } + + destroy_args(&argv); + return r; +} + +static char PyRRD_first__doc__[] = + "first(filename): Return the timestamp of the first data sample in an RRD"; + +static PyObject *PyRRD_first( + PyObject UNUSED(*self), + PyObject * args) +{ + PyObject *r; + int argc, ts; + char **argv; + + if (create_args("first", args, &argc, &argv) < 0) + return NULL; + + if ((ts = rrd_first(argc, argv)) == -1) { + PyErr_SetString(ErrorObject, rrd_get_error()); + rrd_clear_error(); + r = NULL; + } else + r = PyInt_FromLong((long) ts); + + destroy_args(&argv); + return r; +} + +static char PyRRD_last__doc__[] = + "last(filename): Return the timestamp of the last data sample in an RRD"; + +static PyObject *PyRRD_last( + PyObject UNUSED(*self), + PyObject * args) +{ + PyObject *r; + int argc, ts; + char **argv; + + if (create_args("last", args, &argc, &argv) < 0) + return NULL; + + if ((ts = rrd_last(argc, argv)) == -1) { + PyErr_SetString(ErrorObject, rrd_get_error()); + rrd_clear_error(); + r = NULL; + } else + r = PyInt_FromLong((long) ts); + + destroy_args(&argv); + return r; +} + +static char PyRRD_resize__doc__[] = + "resize(args...): alters the size of an RRA.\n" + " resize filename rra-num GROW|SHRINK rows"; + +static PyObject *PyRRD_resize( + PyObject UNUSED(*self), + PyObject * args) +{ + PyObject *r; + char **argv; + int argc, ts; + + if (create_args("resize", args, &argc, &argv) < 0) + return NULL; + + if ((ts = rrd_resize(argc, argv)) == -1) { + PyErr_SetString(ErrorObject, rrd_get_error()); + rrd_clear_error(); + r = NULL; + } else { + Py_INCREF(Py_None); + r = Py_None; + } + + destroy_args(&argv); + return r; +} + +static PyObject *PyDict_FromInfo( + rrd_info_t * data) +{ + PyObject *r; + + r = PyDict_New(); + while (data) { + PyObject *val = NULL; + + switch (data->type) { + case RD_I_VAL: + val = isnan(data->value.u_val) + ? (Py_INCREF(Py_None), Py_None) + : PyFloat_FromDouble(data->value.u_val); + break; + case RD_I_CNT: + val = PyLong_FromUnsignedLong(data->value.u_cnt); + break; + case RD_I_INT: + val = PyLong_FromLong(data->value.u_int); + break; + case RD_I_STR: + val = PyString_FromString(data->value.u_str); + break; + case RD_I_BLO: + val = + PyString_FromStringAndSize((char *) data->value.u_blo.ptr, + data->value.u_blo.size); + break; + } + if (val) { + PyDict_SetItemString(r, data->key, val); + Py_DECREF(val); + } + data = data->next; + } + return r; +} + +static char PyRRD_info__doc__[] = + "info(filename): extract header information from an rrd"; + +static PyObject *PyRRD_info( + PyObject UNUSED(*self), + PyObject * args) +{ + PyObject *r; + int argc; + char **argv; + rrd_info_t *data; + + if (create_args("info", args, &argc, &argv) < 0) + return NULL; + + if ((data = rrd_info(argc, argv)) == NULL) { + PyErr_SetString(ErrorObject, rrd_get_error()); + rrd_clear_error(); + r = NULL; + } else { + r = PyDict_FromInfo(data); + rrd_info_free(data); + } + + destroy_args(&argv); + return r; +} + +static char PyRRD_graphv__doc__[] = + "graphv is called in the same manner as graph"; + +static PyObject *PyRRD_graphv( + PyObject UNUSED(*self), + PyObject * args) +{ + PyObject *r; + int argc; + char **argv; + rrd_info_t *data; + + if (create_args("graphv", args, &argc, &argv) < 0) + return NULL; + + if ((data = rrd_graph_v(argc, argv)) == NULL) { + PyErr_SetString(ErrorObject, rrd_get_error()); + rrd_clear_error(); + r = NULL; + } else { + r = PyDict_FromInfo(data); + rrd_info_free(data); + } + + destroy_args(&argv); + return r; +} + +static char PyRRD_updatev__doc__[] = + "updatev is called in the same manner as update"; + +static PyObject *PyRRD_updatev( + PyObject UNUSED(*self), + PyObject * args) +{ + PyObject *r; + int argc; + char **argv; + rrd_info_t *data; + + if (create_args("updatev", args, &argc, &argv) < 0) + return NULL; + + if ((data = rrd_update_v(argc, argv)) == NULL) { + PyErr_SetString(ErrorObject, rrd_get_error()); + rrd_clear_error(); + r = NULL; + } else { + r = PyDict_FromInfo(data); + rrd_info_free(data); + } + + destroy_args(&argv); + return r; +} + +static char PyRRD_flushcached__doc__[] = + "flush(args..): flush RRD files from memory\n" + " flush [--daemon address] file [file ...]"; + +static PyObject *PyRRD_flushcached( + PyObject UNUSED(*self), + PyObject * args) +{ + PyObject *r; + int argc; + char **argv; + + if (create_args("flushcached", args, &argc, &argv) < 0) + return NULL; + + if (rrd_flushcached(argc, argv) != 0) { + PyErr_SetString(ErrorObject, rrd_get_error()); + rrd_clear_error(); + r = NULL; + } else { + Py_INCREF(Py_None); + r = Py_None; + } + + destroy_args(&argv); + return r; +} + +/* List of methods defined in the module */ +#define meth(name, func, doc) {name, (PyCFunction)func, METH_VARARGS, doc} + +static PyMethodDef _rrdtool_methods[] = { + meth("create", PyRRD_create, PyRRD_create__doc__), + meth("update", PyRRD_update, PyRRD_update__doc__), + meth("fetch", PyRRD_fetch, PyRRD_fetch__doc__), + meth("graph", PyRRD_graph, PyRRD_graph__doc__), + meth("tune", PyRRD_tune, PyRRD_tune__doc__), + meth("first", PyRRD_first, PyRRD_first__doc__), + meth("last", PyRRD_last, PyRRD_last__doc__), + meth("resize", PyRRD_resize, PyRRD_resize__doc__), + meth("info", PyRRD_info, PyRRD_info__doc__), + meth("graphv", PyRRD_graphv, PyRRD_graphv__doc__), + meth("updatev", PyRRD_updatev, PyRRD_updatev__doc__), + meth("flushcached", PyRRD_flushcached, PyRRD_flushcached__doc__), + {NULL, NULL, 0, NULL} +}; + +#define SET_INTCONSTANT(dict, value) \ + t = PyInt_FromLong((long)value); \ + PyDict_SetItemString(dict, #value, t); \ + Py_DECREF(t); +#define SET_STRCONSTANT(dict, value) \ + t = PyString_FromString(value); \ + PyDict_SetItemString(dict, #value, t); \ + Py_DECREF(t); + +/* Initialization function for the module */ +void initrrdtool( + void) +{ + PyObject *m, *d, *t; + + /* Create the module and add the functions */ + m = Py_InitModule("rrdtool", _rrdtool_methods); + + /* Add some symbolic constants to the module */ + d = PyModule_GetDict(m); + + SET_STRCONSTANT(d, __version__); + ErrorObject = PyErr_NewException("rrdtool.error", NULL, NULL); + PyDict_SetItemString(d, "error", ErrorObject); + + /* Check for errors */ + if (PyErr_Occurred()) + Py_FatalError("can't initialize the rrdtool module"); +} + +/* + * $Id: _rrdtoolmodule.c,v 1.14 2003/02/22 07:41:19 perky Exp $ + * ex: ts=8 sts=4 et + */ diff --git a/program/bindings/python/setup.py b/program/bindings/python/setup.py new file mode 100644 index 00000000..83f35b6c --- /dev/null +++ b/program/bindings/python/setup.py @@ -0,0 +1,55 @@ +#! /usr/bin/env python +# +# setup.py +# +# py-rrdtool distutil setup +# +# Author : Hye-Shik Chang +# Date : $Date: 2003/02/14 02:38:16 $ +# Created : 24 May 2002 +# +# $Revision: 1.7 $ +# +# ========================================================================== +# This file is part of py-rrdtool. +# +# py-rrdtool is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published +# by the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# py-rrdtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with Foobar; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +from distutils.core import setup, Extension +import sys, os + +RRDBASE = os.environ.get('LOCALBASE', '../../src') +library_dir = os.environ.get('BUILDLIBDIR', os.path.join(RRDBASE, '.libs')) +include_dir = os.environ.get('INCDIR', RRDBASE) + +setup(name = "py-rrdtool", + version = "0.2.1", + description = "Python Interface to RRDTool", + author = "Hye-Shik Chang", + author_email = "perky@fallin.lv", + license = "LGPL", + url = "http://oss.oetiker.ch/rrdtool", + #packages = ['rrdtool'], + ext_modules = [ + Extension( + "rrdtoolmodule", + ["rrdtoolmodule.c"], + libraries=['rrd'], + library_dirs=[library_dir], + include_dirs=[include_dir], + ) + ] +) diff --git a/program/bindings/ruby/CHANGES b/program/bindings/ruby/CHANGES new file mode 100644 index 00000000..9e01ed52 --- /dev/null +++ b/program/bindings/ruby/CHANGES @@ -0,0 +1,7 @@ +2010-02-05 Pavel Pachkovskij (Azati corp.) + add rrd_xport + update test.rb with rrd_xport example + +2006-07-25 Loïs Lherbier + add y_min and y_max parameters to rrd_graph + update test.rb to send only strings to RRD.fetch diff --git a/program/bindings/ruby/README b/program/bindings/ruby/README new file mode 100644 index 00000000..888a0629 --- /dev/null +++ b/program/bindings/ruby/README @@ -0,0 +1,22 @@ +# +# ruby librrd bindings +# author: Miles Egan +# + +- Introduction + +This module provides ruby bindings for librrd, with functionality +comparable to the native perl bindings. See test.rb for a script that +exercises all ruby-librrd functionality. + +- Installation + +Installation is standard. Simply run: + +ruby extconf.rb +make +make install + +I hope this works for you. Please let me know if you have any +problems or suggestions. Someday when I'm feeling less lazy I'll +actually document this thing. Thanks to Tobi for rrdtool! diff --git a/program/bindings/ruby/extconf.rb b/program/bindings/ruby/extconf.rb new file mode 100644 index 00000000..2045e5a5 --- /dev/null +++ b/program/bindings/ruby/extconf.rb @@ -0,0 +1,18 @@ +# $Id: extconf.rb,v 1.2 2001/11/28 18:30:16 miles Exp $ +# Lost ticket pays maximum rate. + +require 'mkmf' + +if /linux/ =~ RUBY_PLATFORM + $LDFLAGS += '-Wl,--rpath -Wl,$(EPREFIX)/lib' +elsif /solaris/ =~ RUBY_PLATFORM + $LDFLAGS += '-R$(EPREFIX)/lib' +elsif /hpux/ =~ RUBY_PLATFORM + $LDFLAGS += '+b$(EPREFIX)/lib' +elsif /aix/ =~ RUBY_PLATFORM + $LDFLAGS += '-Wl,-blibpath:$(EPREFIX)/lib' +end + +dir_config("rrd","../../src","../../src/.libs") +have_library("rrd", "rrd_create") +create_makefile("RRD") diff --git a/program/bindings/ruby/main.c b/program/bindings/ruby/main.c new file mode 100644 index 00000000..64685828 --- /dev/null +++ b/program/bindings/ruby/main.c @@ -0,0 +1,390 @@ +/* $Id$ + * Substantial penalty for early withdrawal. + */ + +#include +#include +#include +#include "../../src/rrd_tool.h" + +typedef struct string_arr_t { + int len; + char **strings; +} string_arr; + +VALUE mRRD; +VALUE rb_eRRDError; + +typedef int ( + *RRDFUNC) ( + int argc, + char **argv); + +typedef rrd_info_t *( + *RRDINFOFUNC) ( + int argc, + char **argv); + +#define RRD_CHECK_ERROR \ + if (rrd_test_error()) \ + rb_raise(rb_eRRDError, rrd_get_error()); \ + rrd_clear_error(); + +string_arr string_arr_new( + VALUE rb_strings) +{ + string_arr a; + char buf[64]; + int i; + + Check_Type(rb_strings, T_ARRAY); + a.len = RARRAY_LEN(rb_strings) + 1; + + a.strings = malloc(a.len * sizeof(char *)); + a.strings[0] = "dummy"; /* first element is a dummy element */ + + for (i = 0; i < a.len - 1; i++) { + VALUE v = rb_ary_entry(rb_strings, i); + + switch (TYPE(v)) { + case T_STRING: + a.strings[i + 1] = strdup(STR2CSTR(v)); + break; + case T_FIXNUM: + snprintf(buf, 63, "%d", FIX2INT(v)); + a.strings[i + 1] = strdup(buf); + break; + default: + rb_raise(rb_eTypeError, + "invalid argument - %s, expected T_STRING or T_FIXNUM on index %d", + rb_class2name(CLASS_OF(v)), i); + break; + } + } + + return a; +} + +void string_arr_delete( + string_arr a) +{ + int i; + + /* skip dummy first entry */ + for (i = 1; i < a.len; i++) { + free(a.strings[i]); + } + + free(a.strings); +} + +void reset_rrd_state( + ) +{ + optind = 0; + opterr = 0; + rrd_clear_error(); +} + +/* Simple Calls */ + +VALUE rrd_call( + RRDFUNC func, + VALUE args) +{ + string_arr a; + + a = string_arr_new(args); + reset_rrd_state(); + func(a.len, a.strings); + string_arr_delete(a); + + RRD_CHECK_ERROR return Qnil; +} + +VALUE rb_rrd_create( + VALUE self, + VALUE args) +{ + return rrd_call(rrd_create, args); +} + +VALUE rb_rrd_dump( + VALUE self, + VALUE args) +{ + return rrd_call(rrd_dump, args); +} + +VALUE rb_rrd_resize( + VALUE self, + VALUE args) +{ + return rrd_call(rrd_resize, args); +} + +VALUE rb_rrd_restore( + VALUE self, + VALUE args) +{ + return rrd_call(rrd_restore, args); +} + +VALUE rb_rrd_tune( + VALUE self, + VALUE args) +{ + return rrd_call(rrd_tune, args); +} + +VALUE rb_rrd_update( + VALUE self, + VALUE args) +{ + return rrd_call(rrd_update, args); +} + +VALUE rb_rrd_flushcached( + VALUE self, + VALUE args) +{ + return rrd_call(rrd_flushcached, args); +} + + +/* Calls Returning Data via the Info Interface */ + +VALUE rb_rrd_infocall( + RRDINFOFUNC func, + VALUE args) +{ + string_arr a; + rrd_info_t *p, *data; + VALUE result; + + a = string_arr_new(args); + reset_rrd_state(); + data = func(a.len, a.strings); + string_arr_delete(a); + + RRD_CHECK_ERROR result = rb_hash_new(); + + p = data; + while (data) { + VALUE key = rb_str_new2(data->key); + + switch (data->type) { + case RD_I_VAL: + if (isnan(data->value.u_val)) { + rb_hash_aset(result, key, Qnil); + } else { + rb_hash_aset(result, key, rb_float_new(data->value.u_val)); + } + break; + case RD_I_CNT: + rb_hash_aset(result, key, INT2FIX(data->value.u_cnt)); + break; + case RD_I_STR: + rb_hash_aset(result, key, rb_str_new2(data->value.u_str)); + break; + case RD_I_INT: + rb_hash_aset(result, key, INT2FIX(data->value.u_int)); + break; + case RD_I_BLO: + rb_hash_aset(result, key, + rb_str_new((char *)data->value.u_blo.ptr, + data->value.u_blo.size)); + break; + } + data = data->next; + } + rrd_info_free(p); + return result; +} + +VALUE rb_rrd_info( + VALUE self, + VALUE args) +{ + return rb_rrd_infocall(rrd_info, args); +} + +VALUE rb_rrd_updatev( + VALUE self, + VALUE args) +{ + return rb_rrd_infocall(rrd_update_v, args); +} + +VALUE rb_rrd_graphv( + VALUE self, + VALUE args) +{ + return rb_rrd_infocall(rrd_graph_v, args); +} + + +/* Other Calls */ + +VALUE rb_rrd_fetch( + VALUE self, + VALUE args) +{ + string_arr a; + unsigned long i, j, k, step, ds_cnt; + rrd_value_t *raw_data; + char **raw_names; + VALUE data, names, result; + time_t start, end; + + a = string_arr_new(args); + reset_rrd_state(); + rrd_fetch(a.len, a.strings, &start, &end, &step, &ds_cnt, &raw_names, + &raw_data); + string_arr_delete(a); + + RRD_CHECK_ERROR names = rb_ary_new(); + + for (i = 0; i < ds_cnt; i++) { + rb_ary_push(names, rb_str_new2(raw_names[i])); + rrd_freemem(raw_names[i]); + } + rrd_freemem(raw_names); + + k = 0; + data = rb_ary_new(); + for (i = start; i <= end; i += step) { + VALUE line = rb_ary_new2(ds_cnt); + + for (j = 0; j < ds_cnt; j++) { + rb_ary_store(line, j, rb_float_new(raw_data[k])); + k++; + } + rb_ary_push(data, line); + } + rrd_freemem(raw_data); + + result = rb_ary_new2(5); + rb_ary_store(result, 0, INT2NUM(start)); + rb_ary_store(result, 1, INT2NUM(end)); + rb_ary_store(result, 2, names); + rb_ary_store(result, 3, data); + rb_ary_store(result, 4, INT2FIX(step)); + return result; +} + +VALUE rb_rrd_graph( + VALUE self, + VALUE args) +{ + string_arr a; + char **calcpr, **p; + VALUE result, print_results; + int xsize, ysize; + double ymin, ymax; + + a = string_arr_new(args); + reset_rrd_state(); + rrd_graph(a.len, a.strings, &calcpr, &xsize, &ysize, NULL, &ymin, &ymax); + string_arr_delete(a); + + RRD_CHECK_ERROR result = rb_ary_new2(3); + + print_results = rb_ary_new(); + p = calcpr; + for (p = calcpr; p && *p; p++) { + rb_ary_push(print_results, rb_str_new2(*p)); + rrd_freemem(*p); + } + rrd_freemem(calcpr); + rb_ary_store(result, 0, print_results); + rb_ary_store(result, 1, INT2FIX(xsize)); + rb_ary_store(result, 2, INT2FIX(ysize)); + return result; +} + + +VALUE rb_rrd_last( + VALUE self, + VALUE args) +{ + string_arr a; + time_t last; + + a = string_arr_new(args); + reset_rrd_state(); + last = rrd_last(a.len, a.strings); + string_arr_delete(a); + + RRD_CHECK_ERROR + return rb_funcall(rb_cTime, rb_intern("at"), 1, UINT2NUM(last)); +} + +VALUE rb_rrd_xport( + VALUE self, + VALUE args) +{ + string_arr a; + unsigned long i, j, k, step, col_cnt; + int xxsize; + rrd_value_t *data; + char **legend_v; + VALUE legend, result, rdata; + time_t start, end; + + a = string_arr_new(args); + rrd_xport(a.len, a.strings, &xxsize, &start, &end, &step, &col_cnt, &legend_v, &data); + string_arr_delete(a); + + RRD_CHECK_ERROR; + + legend = rb_ary_new(); + for (i = 0; i < col_cnt; i++) { + rb_ary_push(legend, rb_str_new2(legend_v[i])); + free(legend_v[i]); + } + free(legend_v); + + k = 0; + rdata = rb_ary_new(); + for (i = start; i <= end; i += step) { + VALUE line = rb_ary_new2(col_cnt); + for (j = 0; j < col_cnt; j++) { + rb_ary_store(line, j, rb_float_new(data[k])); + k++; + } + rb_ary_push(rdata, line); + } + free(data); + + result = rb_ary_new2(6); + rb_ary_store(result, 0, INT2FIX(start)); + rb_ary_store(result, 1, INT2FIX(end)); + rb_ary_store(result, 2, INT2FIX(step)); + rb_ary_store(result, 3, INT2FIX(col_cnt)); + rb_ary_store(result, 4, legend); + rb_ary_store(result, 5, rdata); + return result; +} + +void Init_RRD( + ) +{ + mRRD = rb_define_module("RRD"); + rb_eRRDError = rb_define_class("RRDError", rb_eStandardError); + + rb_define_module_function(mRRD, "create", rb_rrd_create, -2); + rb_define_module_function(mRRD, "dump", rb_rrd_dump, -2); + rb_define_module_function(mRRD, "fetch", rb_rrd_fetch, -2); + rb_define_module_function(mRRD, "graph", rb_rrd_graph, -2); + rb_define_module_function(mRRD, "last", rb_rrd_last, -2); + rb_define_module_function(mRRD, "resize", rb_rrd_resize, -2); + rb_define_module_function(mRRD, "restore", rb_rrd_restore, -2); + rb_define_module_function(mRRD, "tune", rb_rrd_tune, -2); + rb_define_module_function(mRRD, "update", rb_rrd_update, -2); + rb_define_module_function(mRRD, "flushcached", rb_rrd_flushcached, -2); + rb_define_module_function(mRRD, "info", rb_rrd_info, -2); + rb_define_module_function(mRRD, "updatev", rb_rrd_updatev, -2); + rb_define_module_function(mRRD, "graphv", rb_rrd_graphv, -2); + rb_define_module_function(mRRD, "xport", rb_rrd_xport, -2); +} diff --git a/program/bindings/ruby/test.rb b/program/bindings/ruby/test.rb new file mode 100755 index 00000000..2ca502de --- /dev/null +++ b/program/bindings/ruby/test.rb @@ -0,0 +1,72 @@ +#!/usr/bin/env ruby +# $Id: test.rb,v 1.2 2002/10/22 17:34:00 miles Exp $ +# Driver does not carry cash. + +$: << '/scratch/rrd12build/lib/ruby/1.8/i386-linux/' + +require "RRD" + +name = "test" +rrd = "#{name}.rrd" +start_time = Time.now.to_i +end_time = start_time.to_i + 300 * 300 + +puts "creating #{rrd}" +RRD.create( + rrd, + "--start", "#{start_time - 1}", + "--step", "300", + "DS:a:GAUGE:600:U:U", + "DS:b:GAUGE:600:U:U", + "RRA:AVERAGE:0.5:1:300") +puts + +puts "updating #{rrd}" +start_time.step(end_time, 300) { |i| + RRD.update(rrd, "#{i}:#{rand(100)}:#{Math.sin(i / 800) * 50 + 50}") +} +puts + +puts "fetching data from #{rrd}" +(fstart, fend, data) = RRD.fetch(rrd, "--start", start_time.to_s, "--end", end_time.to_s, "AVERAGE") +puts "got #{data.length} data points from #{fstart} to #{fend}" +puts + +puts "generating graph #{name}.png" +RRD.graph( + "#{name}.png", + "--title", " RubyRRD Demo", + "--start", "#{start_time+3600}", + "--end", "start + 1000 min", + "--interlace", + "--imgformat", "PNG", + "--width=450", + "DEF:a=#{rrd}:a:AVERAGE", + "DEF:b=#{rrd}:b:AVERAGE", + "CDEF:line=TIME,2400,%,300,LT,a,UNKN,IF", + "AREA:b#00b6e4:beta", + "AREA:line#0022e9:alpha", + "LINE3:line#ff0000") +puts + +# last method test +if end_time != RRD.last("#{rrd}").to_i + puts "last method expects #{Time.at(end_time)}." + puts " But #{RRD.last("#{rrd}")} returns." +end +puts + +# xport method test +puts "xporting data from #{rrd}" +(fstart,fend,step,col,legend,data)=RRD.xport( + "--start", start_time.to_s, + "--end", (start_time + 300 * 300).to_s, + "--step", 10.to_s, + "DEF:A=#{rrd}:a:AVERAGE", + "DEF:B=#{rrd}:b:AVERAGE", + "XPORT:A:a", + "XPORT:B:b") +puts "Xported #{col} columns(#{legend.join(", ")}) with #{data.length} rows from #{fstart} to #{fend} and step #{step}\n" + +print "This script has created #{name}.png in the current directory\n"; +print "This demonstrates the use of the TIME and % RPN operators\n"; diff --git a/program/bindings/tcl/Makefile.am b/program/bindings/tcl/Makefile.am new file mode 100644 index 00000000..c0e8b0ff --- /dev/null +++ b/program/bindings/tcl/Makefile.am @@ -0,0 +1,58 @@ + +EXTRA_DIST = README tclrrd.c + +VERSION = @VERSION@ + +AM_CFLAGS = @CFLAGS@ +### no including this by default @WERROR@ + +TCL_PREFIX = @TCL_PREFIX@ +TCL_SHLIB_LD = @TCL_SHLIB_LD@ +TCL_SHLIB_CFLAGS = @TCL_SHLIB_CFLAGS@ +TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@ +TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ +TCL_LD_SEARCH_FLAGS = @TCL_LD_SEARCH_FLAGS@ +TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@ +TCL_INCLUDE_SPEC = @TCL_INCLUDE_SPEC@ + +CLEANFILES = tclrrd.o tclrrd.so + +SRC_DIR = $(top_srcdir)/src +AM_CPPFLAGS = $(TCL_INCLUDE_SPEC) -I$(SRC_DIR) -DUSE_TCL_STUBS +LIBDIRS = -L$(top_builddir)/src/.libs -L$(top_builddir)/src -L$(libdir) +LIB_RUNTIME_DIR = $(libdir) + +if BUILD_TCL_SITE +tclpkgdir = @TCL_PACKAGE_DIR@ +tclpkg_DATA = pkgIndex.tcl +tclpkg_SCRIPTS = ifOctets.tcl +else +pkglib_DATA = pkgIndex.tcl +pkglib_SCRIPTS = ifOctets.tcl +endif + +# Automake doen't like `tclrrd$(VERSION)$(TCL_SHLIB_SUFFIX)' as +# library name. So we build and install this library `by hand'. +# +# We do, however, specify a lib_LIBRARIES target such that +# automake creates the directory (if neecessary). +# +TCL_RRD_LIB = tclrrd$(VERSION)$(TCL_SHLIB_SUFFIX) + +lib_LIBRARIES = + +all-local: $(TCL_RRD_LIB) + +$(TCL_RRD_LIB): tclrrd.o + $(TCL_SHLIB_LD) $(TCL_LD_SEARCH_FLAGS) $(LIBDIRS) $< -o $@ -lrrd_th -lm $(TCL_STUB_LIB_SPEC) $(LDFLAGS) $(LIBS) + +tclrrd.o: tclrrd.c + $(CC) $(AM_CFLAGS) $(CFLAGS) $(TCL_SHLIB_CFLAGS) $(AM_CPPFLAGS) -c tclrrd.c -DVERSION=\"$(VERSION)\" + +pkgIndex.tcl: + echo "package ifneeded Rrd $(VERSION) \"load $(libdir)/tclrrd$(VERSION)[info sharedlibextension]\"" > $@ + +install-exec-local: $(TCL_RRD_LIB) + @$(NORMAL_INSTALL) + $(INSTALL_PROGRAM) $(TCL_RRD_LIB) $(DESTDIR)$(libdir)/$(TCL_RRD_LIB) + diff --git a/program/bindings/tcl/README b/program/bindings/tcl/README new file mode 100644 index 00000000..065a03aa --- /dev/null +++ b/program/bindings/tcl/README @@ -0,0 +1,31 @@ +TCLRRD -- A TCL interpreter extension to access the RRD library, + contributed to Tobias Oetiker's RRD tools. + +Copyright (c) 1999,2000 Frank Strauss, Technical University of Braunschweig. + +See the file "COPYING" for information on usage and redistribution +of this file, and for a DISCLAIMER OF ALL WARRANTIES. + +TCLRRD adds a dynamically loadable package to the Tcl 8.x interpreter +to access all RRD functions as of RRDtool 1.0.13. All command names +and arguments are equal to those of RRDtool. They are assigned to the +namespace `Rrd', e.g. `Rrd::create'. Return values are a bit +different from plain RRDtool behavior to enable more native Tcl +usage. Errors are mapped to the TCL_ERROR return code together with +the RRD error strings. + +TCLRRD makes it easy to combine RRD use with advanced SNMP functionality +of scotty (http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/). E.g., it's easy +to use some scotty code to get the counters of some interfaces by their +interface name and then use Rrd::update to store the values. Furthermore, +data source types (see RRD::create documentation) and integer value ranges +could be easily retrieved from MIB information. + +TCLRRD has been written on a Linux system for use with Tcl 8.x. It should +work on many other platforms, although it has not been tested. There are +no fool proof installation procedures. Take a look at Makefile.am and +adapt it, if required. + +TCLRRD has been written for RRD 1.0.13. + + Frank Strauss , 09-Mar-2000 diff --git a/program/bindings/tcl/ifOctets.tcl.in b/program/bindings/tcl/ifOctets.tcl.in new file mode 100644 index 00000000..7a36397c --- /dev/null +++ b/program/bindings/tcl/ifOctets.tcl.in @@ -0,0 +1,45 @@ +#!/bin/sh +# the next line restarts using tclsh -*- tcl -*- \ +exec tclsh@TCL_VERSION@ "$0" "$@" + +#package require Tnm 3.0 +package require Rrd @VERSION@ + +set rrdfile "[lindex $argv 0]-[lindex $argv 1].rrd" + +# create rrdfile if not yet existent +if {[file exists $rrdfile] == 0} { + Rrd::create $rrdfile --step 5 \ + DS:inOctets:COUNTER:10:U:U DS:outOctets:COUNTER:10:U:U \ + RRA:AVERAGE:0.5:1:12 +} + +# get an snmp session context +set session [Tnm::snmp generator -address [lindex $argv 0]] + +# walk through the ifDescr column to find the right interface +$session walk descr IF-MIB!ifDescr { + + # is this the right interface? + if {"[Tnm::snmp value $descr 0]" == "[lindex $argv 1]"} { + + # get the instance part of this table row + set inst [lindex [Tnm::mib split [Tnm::snmp oid $descr 0]] 1] + + # get the two interface's octet counter values + set in [lindex [lindex [$session get IF-MIB!ifInOctets.$inst] 0] 2] + set out [lindex [lindex [$session get IF-MIB!ifOutOctets.$inst] 0] 2] + + # write the values to the rrd + puts "$in $out" + Rrd::update $rrdfile --template inOctets:outOctets N:$in:$out + + Rrd::graph gaga.png --title "gaga" \ + DEF:in=$rrdfile:inOctets:AVERAGE \ + DEF:out=$rrdfile:outOctets:AVERAGE \ + AREA:in#0000FF:inOctets \ + LINE2:out#00C000:outOctets + + #puts [Rrd::fetch $rrdfile AVERAGE] + } +} diff --git a/program/bindings/tcl/tclrrd.c b/program/bindings/tcl/tclrrd.c new file mode 100644 index 00000000..a98a2d7c --- /dev/null +++ b/program/bindings/tcl/tclrrd.c @@ -0,0 +1,762 @@ +/* + * tclrrd.c -- A TCL interpreter extension to access the RRD library. + * + * Copyright (c) 1999,2000 Frank Strauss, Technical University of Braunschweig. + * + * Thread-safe code copyright (c) 2005 Oleg Derevenetz, CenterTelecom Voronezh ISP. + * + * See the file "COPYING" for information on usage and redistribution + * of this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * $Id$ + */ + + + +#include +#include +#include +#include +#include +#include +#include "../../src/rrd_tool.h" +#include "../../src/rrd_format.h" + +/* support pre-8.4 tcl */ + +#ifndef CONST84 +# define CONST84 +#endif + +extern int Tclrrd_Init( + Tcl_Interp *interp); +extern int Tclrrd_SafeInit( + Tcl_Interp *interp); + + +/* + * some rrd_XXX() and new thread-safe versions of Rrd_XXX() + * functions might modify the argv strings passed to it. + * Hence, we need to do some preparation before + * calling the rrd library functions. + */ +static char **getopt_init( + int argc, + CONST84 char *argv[]) +{ + char **argv2; + int i; + + argv2 = calloc(argc, sizeof(char *)); + for (i = 0; i < argc; i++) { + argv2[i] = strdup(argv[i]); + } + return argv2; +} + +static void getopt_cleanup( + int argc, + char **argv2) +{ + int i; + + for (i = 0; i < argc; i++) { + if (argv2[i] != NULL) { + free(argv2[i]); + } + } + free(argv2); +} + +static void getopt_free_element( + char *argv2[], + int argn) +{ + if (argv2[argn] != NULL) { + free(argv2[argn]); + argv2[argn] = NULL; + } +} + +static void getopt_squieeze( + int *argc, + char *argv2[]) +{ + int i, null_i = 0, argc_tmp = *argc; + + for (i = 0; i < argc_tmp; i++) { + if (argv2[i] == NULL) { + (*argc)--; + } else { + argv2[null_i++] = argv2[i]; + } + } +} + + + +/* Thread-safe version */ +static int Rrd_Create( + ClientData __attribute__((unused)) clientData, + Tcl_Interp *interp, + int argc, + CONST84 char *argv[]) +{ + int argv_i; + char **argv2; + char *parsetime_error = NULL; + time_t last_up = time(NULL) - 10; + long int long_tmp; + unsigned long int pdp_step = 300; + rrd_time_value_t last_up_tv; + + argv2 = getopt_init(argc, argv); + + for (argv_i = 1; argv_i < argc; argv_i++) { + if (!strcmp(argv2[argv_i], "--start") || !strcmp(argv2[argv_i], "-b")) { + if (argv_i++ >= argc) { + Tcl_AppendResult(interp, "RRD Error: option '", + argv2[argv_i - 1], "' needs an argument", + (char *) NULL); + getopt_cleanup(argc, argv2); + return TCL_ERROR; + } + if ((parsetime_error = rrd_parsetime(argv2[argv_i], &last_up_tv))) { + Tcl_AppendResult(interp, "RRD Error: invalid time format: '", + argv2[argv_i], "'", (char *) NULL); + getopt_cleanup(argc, argv2); + return TCL_ERROR; + } + if (last_up_tv.type == RELATIVE_TO_END_TIME || + last_up_tv.type == RELATIVE_TO_START_TIME) { + Tcl_AppendResult(interp, + "RRD Error: specifying time relative to the 'start' ", + "or 'end' makes no sense here", + (char *) NULL); + getopt_cleanup(argc, argv2); + return TCL_ERROR; + } + last_up = mktime(&last_up_tv.tm) +last_up_tv.offset; + if (last_up < 3600 * 24 * 365 * 10) { + Tcl_AppendResult(interp, + "RRD Error: the first entry to the RRD should be after 1980", + (char *) NULL); + getopt_cleanup(argc, argv2); + return TCL_ERROR; + } + getopt_free_element(argv2, argv_i - 1); + getopt_free_element(argv2, argv_i); + } else if (!strcmp(argv2[argv_i], "--step") + || !strcmp(argv2[argv_i], "-s")) { + if (argv_i++ >= argc) { + Tcl_AppendResult(interp, "RRD Error: option '", + argv2[argv_i - 1], "' needs an argument", + (char *) NULL); + getopt_cleanup(argc, argv2); + return TCL_ERROR; + } + long_tmp = atol(argv2[argv_i]); + if (long_tmp < 1) { + Tcl_AppendResult(interp, + "RRD Error: step size should be no less than one second", + (char *) NULL); + getopt_cleanup(argc, argv2); + return TCL_ERROR; + } + pdp_step = long_tmp; + getopt_free_element(argv2, argv_i - 1); + getopt_free_element(argv2, argv_i); + } else if (!strcmp(argv2[argv_i], "--")) { + getopt_free_element(argv2, argv_i); + break; + } else if (argv2[argv_i][0] == '-') { + Tcl_AppendResult(interp, "RRD Error: unknown option '", + argv2[argv_i], "'", (char *) NULL); + getopt_cleanup(argc, argv2); + return TCL_ERROR; + } + } + + getopt_squieeze(&argc, argv2); + + if (argc < 2) { + Tcl_AppendResult(interp, "RRD Error: needs rrd filename", + (char *) NULL); + getopt_cleanup(argc, argv2); + return TCL_ERROR; + } + + rrd_create_r(argv2[1], pdp_step, last_up, argc - 2, + (const char **)argv2 + 2); + + getopt_cleanup(argc, argv2); + + if (rrd_test_error()) { + Tcl_AppendResult(interp, "RRD Error: ", + rrd_get_error(), (char *) NULL); + rrd_clear_error(); + return TCL_ERROR; + } + + return TCL_OK; +} + + + +/* Thread-safe version */ +static int Rrd_Dump( + ClientData __attribute__((unused)) clientData, + Tcl_Interp *interp, + int argc, + CONST84 char *argv[]) +{ + if (argc < 2) { + Tcl_AppendResult(interp, "RRD Error: needs rrd filename", + (char *) NULL); + return TCL_ERROR; + } + + rrd_dump_r(argv[1], NULL); + + /* NOTE: rrd_dump() writes to stdout. No interaction with TCL. */ + + if (rrd_test_error()) { + Tcl_AppendResult(interp, "RRD Error: ", + rrd_get_error(), (char *) NULL); + rrd_clear_error(); + return TCL_ERROR; + } + + return TCL_OK; +} + +/* Thread-safe version */ +static int Rrd_Flushcached( + ClientData __attribute__((unused)) clientData, + Tcl_Interp *interp, + int argc, + CONST84 char *argv[]) +{ + if (argc < 2) { + Tcl_AppendResult(interp, "RRD Error: needs rrd filename", + (char *) NULL); + return TCL_ERROR; + } + + rrd_flushcached(argc, (char**)argv); + + if (rrd_test_error()) { + Tcl_AppendResult(interp, "RRD Error: ", + rrd_get_error(), (char *) NULL); + rrd_clear_error(); + return TCL_ERROR; + } + + return TCL_OK; +} + + +/* Thread-safe version */ +static int Rrd_Last( + ClientData __attribute__((unused)) clientData, + Tcl_Interp *interp, + int argc, + CONST84 char *argv[]) +{ + time_t t; + + if (argc < 2) { + Tcl_AppendResult(interp, "RRD Error: needs rrd filename", + (char *) NULL); + return TCL_ERROR; + } + + t = rrd_last_r(argv[1]); + + if (rrd_test_error()) { + Tcl_AppendResult(interp, "RRD Error: ", + rrd_get_error(), (char *) NULL); + rrd_clear_error(); + return TCL_ERROR; + } + + Tcl_SetIntObj(Tcl_GetObjResult(interp), t); + + return TCL_OK; +} + + + +/* Thread-safe version */ +static int Rrd_Update( + ClientData __attribute__((unused)) clientData, + Tcl_Interp *interp, + int argc, + CONST84 char *argv[]) +{ + int argv_i; + char **argv2, *template = NULL; + + argv2 = getopt_init(argc, argv); + + for (argv_i = 1; argv_i < argc; argv_i++) { + if (!strcmp(argv2[argv_i], "--template") + || !strcmp(argv2[argv_i], "-t")) { + if (argv_i++ >= argc) { + Tcl_AppendResult(interp, "RRD Error: option '", + argv2[argv_i - 1], "' needs an argument", + (char *) NULL); + if (template != NULL) { + free(template); + } + getopt_cleanup(argc, argv2); + return TCL_ERROR; + } + if (template != NULL) { + free(template); + } + template = strdup(argv2[argv_i]); + getopt_free_element(argv2, argv_i - 1); + getopt_free_element(argv2, argv_i); + } else if (!strcmp(argv2[argv_i], "--")) { + getopt_free_element(argv2, argv_i); + break; + } else if (argv2[argv_i][0] == '-') { + Tcl_AppendResult(interp, "RRD Error: unknown option '", + argv2[argv_i], "'", (char *) NULL); + if (template != NULL) { + free(template); + } + getopt_cleanup(argc, argv2); + return TCL_ERROR; + } + } + + getopt_squieeze(&argc, argv2); + + if (argc < 2) { + Tcl_AppendResult(interp, "RRD Error: needs rrd filename", + (char *) NULL); + if (template != NULL) { + free(template); + } + getopt_cleanup(argc, argv2); + return TCL_ERROR; + } + + rrd_update_r(argv2[1], template, argc - 2, (const char **)argv2 + 2); + + if (template != NULL) { + free(template); + } + getopt_cleanup(argc, argv2); + + if (rrd_test_error()) { + Tcl_AppendResult(interp, "RRD Error: ", + rrd_get_error(), (char *) NULL); + rrd_clear_error(); + return TCL_ERROR; + } + + return TCL_OK; +} + +static int Rrd_Lastupdate( + ClientData __attribute__((unused)) clientData, + Tcl_Interp *interp, + int argc, + CONST84 char *argv[]) +{ + time_t last_update; + char **argv2; + char **ds_namv; + char **last_ds; + char s[30]; + Tcl_Obj *listPtr; + unsigned long ds_cnt, i; + + /* TODO: support for rrdcached */ + if (argc != 2) { + Tcl_AppendResult(interp, "RRD Error: needs a single rrd filename", + (char *) NULL); + return TCL_ERROR; + } + + argv2 = getopt_init(argc, argv); + if (rrd_lastupdate_r(argv2[1], &last_update, + &ds_cnt, &ds_namv, &last_ds) == 0) { + listPtr = Tcl_GetObjResult(interp); + for (i = 0; i < ds_cnt; i++) { + sprintf(s, " %28s", ds_namv[i]); + Tcl_ListObjAppendElement(interp, listPtr, + Tcl_NewStringObj(s, -1)); + sprintf(s, "\n\n%10lu:", last_update); + Tcl_ListObjAppendElement(interp, listPtr, + Tcl_NewStringObj(s, -1)); + for (i = 0; i < ds_cnt; i++) { + sprintf(s, " %s", last_ds[i]); + Tcl_ListObjAppendElement(interp, listPtr, + Tcl_NewStringObj(s, -1)); + free(last_ds[i]); + free(ds_namv[i]); + } + sprintf(s, "\n"); + Tcl_ListObjAppendElement(interp, listPtr, + Tcl_NewStringObj(s, -1)); + free(last_ds); + free(ds_namv); + } + } + return TCL_OK; +} + +static int Rrd_Fetch( + ClientData __attribute__((unused)) clientData, + Tcl_Interp *interp, + int argc, + CONST84 char *argv[]) +{ + time_t start, end, j; + unsigned long step, ds_cnt, i, ii; + rrd_value_t *data, *datai; + char **ds_namv; + Tcl_Obj *listPtr; + char s[30]; + char **argv2; + + argv2 = getopt_init(argc, argv); + if (rrd_fetch(argc, argv2, &start, &end, &step, + &ds_cnt, &ds_namv, &data) != -1) { + datai = data; + listPtr = Tcl_GetObjResult(interp); + for (j = start; j <= end; j += step) { + for (ii = 0; ii < ds_cnt; ii++) { + sprintf(s, "%.2f", *(datai++)); + Tcl_ListObjAppendElement(interp, listPtr, + Tcl_NewStringObj(s, -1)); + } + } + for (i = 0; i < ds_cnt; i++) + free(ds_namv[i]); + free(ds_namv); + free(data); + } + getopt_cleanup(argc, argv2); + + if (rrd_test_error()) { + Tcl_AppendResult(interp, "RRD Error: ", + rrd_get_error(), (char *) NULL); + rrd_clear_error(); + return TCL_ERROR; + } + + return TCL_OK; +} + + + +static int Rrd_Graph( + ClientData __attribute__((unused)) clientData, + Tcl_Interp *interp, + int argc, + CONST84 char *argv[]) +{ + Tcl_Channel channel; + int mode, fd2; + ClientData fd1; + FILE *stream = NULL; + char **calcpr = NULL; + int rc, xsize, ysize; + double ymin, ymax; + char dimensions[50]; + char **argv2; + CONST84 char *save; + + /* + * If the "filename" is a Tcl fileID, then arrange for rrd_graph() to write to + * that file descriptor. Will this work with windoze? I have no idea. + */ + if ((channel = Tcl_GetChannel(interp, argv[1], &mode)) != NULL) { + /* + * It >is< a Tcl fileID + */ + if (!(mode & TCL_WRITABLE)) { + Tcl_AppendResult(interp, "channel \"", argv[1], + "\" wasn't opened for writing", (char *) NULL); + return TCL_ERROR; + } + /* + * Must flush channel to make sure any buffered data is written before + * rrd_graph() writes to the stream + */ + if (Tcl_Flush(channel) != TCL_OK) { + Tcl_AppendResult(interp, "flush failed for \"", argv[1], "\": ", + strerror(Tcl_GetErrno()), (char *) NULL); + return TCL_ERROR; + } + if (Tcl_GetChannelHandle(channel, TCL_WRITABLE, &fd1) != TCL_OK) { + Tcl_AppendResult(interp, + "cannot get file descriptor associated with \"", + argv[1], "\"", (char *) NULL); + return TCL_ERROR; + } + /* + * Must dup() file descriptor so we can fclose(stream), otherwise the fclose() + * would close Tcl's file descriptor + */ + if ((fd2 = dup((int)fd1)) == -1) { + Tcl_AppendResult(interp, + "dup() failed for file descriptor associated with \"", + argv[1], "\": ", strerror(errno), (char *) NULL); + return TCL_ERROR; + } + /* + * rrd_graph() wants a FILE* + */ + if ((stream = fdopen(fd2, "wb")) == NULL) { + Tcl_AppendResult(interp, + "fdopen() failed for file descriptor associated with \"", + argv[1], "\": ", strerror(errno), (char *) NULL); + close(fd2); /* plug potential file descriptor leak */ + return TCL_ERROR; + } + + save = argv[1]; + argv[1] = "-"; + argv2 = getopt_init(argc, argv); + argv[1] = save; + } else { + Tcl_ResetResult(interp); /* clear error from Tcl_GetChannel() */ + argv2 = getopt_init(argc, argv); + } + + rc = rrd_graph(argc, argv2, &calcpr, &xsize, &ysize, stream, &ymin, + &ymax); + getopt_cleanup(argc, argv2); + + if (stream != NULL) + fclose(stream); /* plug potential malloc & file descriptor leak */ + + if (rc != -1) { + sprintf(dimensions, "%d %d", xsize, ysize); + Tcl_AppendResult(interp, dimensions, (char *) NULL); + if (calcpr) { +#if 0 + int i; + + for (i = 0; calcpr[i]; i++) { + printf("%s\n", calcpr[i]); + free(calcpr[i]); + } +#endif + free(calcpr); + } + } + + if (rrd_test_error()) { + Tcl_AppendResult(interp, "RRD Error: ", + rrd_get_error(), (char *) NULL); + rrd_clear_error(); + return TCL_ERROR; + } + + return TCL_OK; +} + + + +static int Rrd_Tune( + ClientData __attribute__((unused)) clientData, + Tcl_Interp *interp, + int argc, + CONST84 char *argv[]) +{ + char **argv2; + + argv2 = getopt_init(argc, argv); + rrd_tune(argc, argv2); + getopt_cleanup(argc, argv2); + + if (rrd_test_error()) { + Tcl_AppendResult(interp, "RRD Error: ", + rrd_get_error(), (char *) NULL); + rrd_clear_error(); + return TCL_ERROR; + } + + return TCL_OK; +} + + + +static int Rrd_Resize( + ClientData __attribute__((unused)) clientData, + Tcl_Interp *interp, + int argc, + CONST84 char *argv[]) +{ + char **argv2; + + argv2 = getopt_init(argc, argv); + rrd_resize(argc, argv2); + getopt_cleanup(argc, argv2); + + if (rrd_test_error()) { + Tcl_AppendResult(interp, "RRD Error: ", + rrd_get_error(), (char *) NULL); + rrd_clear_error(); + return TCL_ERROR; + } + + return TCL_OK; +} + + + +static int Rrd_Restore( + ClientData __attribute__((unused)) clientData, + Tcl_Interp *interp, + int argc, + CONST84 char *argv[]) +{ + char **argv2; + + argv2 = getopt_init(argc, argv); + rrd_restore(argc, argv2); + getopt_cleanup(argc, argv2); + + if (rrd_test_error()) { + Tcl_AppendResult(interp, "RRD Error: ", + rrd_get_error(), (char *) NULL); + rrd_clear_error(); + return TCL_ERROR; + } + + return TCL_OK; +} + + + +/* + * The following structure defines the commands in the Rrd extension. + */ + +typedef struct { + char *name; /* Name of the command. */ + Tcl_CmdProc *proc; /* Procedure for command. */ + int hide; /* Hide if safe interpreter */ +} CmdInfo; + +static CmdInfo rrdCmds[] = { + {"Rrd::create", Rrd_Create, 1}, /* Thread-safe version */ + {"Rrd::dump", Rrd_Dump, 0}, /* Thread-safe version */ + {"Rrd::flushcached", Rrd_Flushcached, 0}, + {"Rrd::last", Rrd_Last, 0}, /* Thread-safe version */ + {"Rrd::lastupdate", Rrd_Lastupdate, 0}, /* Thread-safe version */ + {"Rrd::update", Rrd_Update, 1}, /* Thread-safe version */ + {"Rrd::fetch", Rrd_Fetch, 0}, + {"Rrd::graph", Rrd_Graph, 1}, /* Due to RRD's API, a safe + interpreter cannot create + a graph since it writes to + a filename supplied by the + caller */ + {"Rrd::tune", Rrd_Tune, 1}, + {"Rrd::resize", Rrd_Resize, 1}, + {"Rrd::restore", Rrd_Restore, 1}, + {(char *) NULL, (Tcl_CmdProc *) NULL, 0} +}; + + + +static int init( + Tcl_Interp *interp, + int safe) +{ + CmdInfo *cmdInfoPtr; + Tcl_CmdInfo info; + + if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) + return TCL_ERROR; + + if (Tcl_PkgRequire(interp, "Tcl", TCL_VERSION, 1) == NULL) { + return TCL_ERROR; + } + + /* + * Why a global array? In keeping with the Rrd:: namespace, why + * not simply create a normal variable Rrd::version and set it? + */ + Tcl_SetVar2(interp, "rrd", "version", VERSION, TCL_GLOBAL_ONLY); + + for (cmdInfoPtr = rrdCmds; cmdInfoPtr->name != NULL; cmdInfoPtr++) { + /* + * Check if the command already exists and return an error + * to ensure we detect name clashes while loading the Rrd + * extension. + */ + if (Tcl_GetCommandInfo(interp, cmdInfoPtr->name, &info)) { + Tcl_AppendResult(interp, "command \"", cmdInfoPtr->name, + "\" already exists", (char *) NULL); + return TCL_ERROR; + } + if (safe && cmdInfoPtr->hide) { +#if 0 + /* + * Turns out the one cannot hide a command in a namespace + * due to a limitation of Tcl, one can only hide global + * commands. Thus, if we created the commands without + * the Rrd:: namespace in a safe interpreter, then the + * "unsafe" commands could be hidden -- which would allow + * an owning interpreter either un-hiding them or doing + * an "interp invokehidden". If the Rrd:: namespace is + * used, then it's still possible for the owning interpreter + * to fake out the missing commands: + * + * # Make all Rrd::* commands available in master interperter + * package require Rrd + * set safe [interp create -safe] + * # Make safe Rrd::* commands available in safe interperter + * interp invokehidden $safe -global load ./tclrrd1.2.11.so + * # Provide the safe interpreter with the missing commands + * $safe alias Rrd::update do_update $safe + * proc do_update {which_interp $args} { + * # Do some checking maybe... + * : + * return [eval Rrd::update $args] + * } + * + * Our solution for now is to just not create the "unsafe" + * commands in a safe interpreter. + */ + if (Tcl_HideCommand(interp, cmdInfoPtr->name, cmdInfoPtr->name) != + TCL_OK) + return TCL_ERROR; +#endif + } else + Tcl_CreateCommand(interp, cmdInfoPtr->name, cmdInfoPtr->proc, + (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); + } + + if (Tcl_PkgProvide(interp, "Rrd", VERSION) != TCL_OK) { + return TCL_ERROR; + } + + return TCL_OK; +} + +int Tclrrd_Init( + Tcl_Interp *interp) +{ + return init(interp, 0); +} + +/* + * See the comments above and note how few commands are considered "safe"... + * Using rrdtool in a safe interpreter has very limited functionality. It's + * tempting to just return TCL_ERROR and forget about it. + */ +int Tclrrd_SafeInit( + Tcl_Interp *interp) +{ + return init(interp, 1); +} diff --git a/program/configure.ac b/program/configure.ac new file mode 100644 index 00000000..eda5dca7 --- /dev/null +++ b/program/configure.ac @@ -0,0 +1,975 @@ +dnl RRDtool AutoConf script ... +dnl --------------------------- +dnl $Id$ +dnl +dnl Created by Jeff Allen, Tobi Oetiker, Blair Zajac +dnl +dnl Inspiration from http://autoconf-archive.cryp.to + +dnl tell automake the this script is for rrdtool + +dnl Minimum Autoconf version required. +AC_PREREQ(2.59) + +dnl the official version number is +dnl a.b.c +AC_INIT([rrdtool],[1.4.3]) + +dnl for testing a numberical version number comes handy +dnl the released version are +dnl a.bccc +dnl the devel versions will be something like +dnl a.b999yymmddhh +NUMVERS=1.4003 +AC_SUBST(NUMVERS) + +dnl for the linker to understand which versions the library are compatible with +dnl each other we must keep a separate library version cout of the format c:r:a. +dnl - if only implementation changed but all interfaces are kept, do r++ +dnl - if only functionality was added do c++,r=0,a++ +dnl - if any functionality was removed do c++,r=0,a=0. +dnl +dnl see http://sourceware.org/autobook/autobook/autobook_91.html +dnl +LIBVERS=5:3:1 +AC_SUBST(LIBVERS) + +AC_CANONICAL_TARGET +m4_version_prereq(2.60, [AC_USE_SYSTEM_EXTENSIONS], [#]) +AM_INIT_AUTOMAKE +AM_MAINTAINER_MODE +# Enable silent build rules by default, requires at least +# Automake-1.11. Disable by either passing --disable-silent-rules to +# configure or passing V=1 to make +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) +AC_CONFIG_HEADERS([rrd_config.h]) +AC_CONFIG_MACRO_DIR([m4]) + +dnl all our local stuff like install scripts and include files +dnl is in there + + +dnl determine the type of system we are running on + +AC_SUBST(VERSION) + +AC_PREFIX_DEFAULT( /opt/rrdtool-$PACKAGE_VERSION ) + +dnl At the TOP of the HEADER + +AH_TOP([ +#ifndef RRD_CONFIG_H +#define RRD_CONFIG_H + +/* IEEE can be prevented from raising signals with fpsetmask(0) */ +#undef MUST_DISABLE_FPMASK + +/* IEEE math only works if SIGFPE gets actively set to IGNORE */ +#undef MUST_DISABLE_SIGFPE + +/* realloc does not support NULL as argument */ +#undef NO_NULL_REALLOC + +/* lets enable madvise defines in NetBSD */ +#if defined(__NetBSD__) +# if !defined(_NETBSD_SOURCE) +# define _NETBSD_SOURCE +# endif +#endif + +]) + +AH_BOTTOM([ + +#ifdef MUST_HAVE_MALLOC_MALLOC_H +# include +#endif + +#include "src/rrd_config_bottom.h" + +#endif +]) + +dnl Process Special Options +dnl ----------------------------------- + +dnl How the vertical axis label is printed +AC_ARG_VAR(RRDGRAPH_YLEGEND_ANGLE, + [Vertical label angle: -90.0 (default) or 90.0]) +AC_DEFINE_UNQUOTED(RRDGRAPH_YLEGEND_ANGLE,${RRDGRAPH_YLEGEND_ANGLE:-90.0}, + [Vertical label angle: -90.0 (default) or 90.0]) + +AC_ARG_ENABLE(rrdcgi,AS_HELP_STRING([--disable-rrdcgi],[disable building of rrdcgi]), +[],[enable_rrdcgi=yes]) + +dnl Check if we run on a system that has fonts +AC_ARG_WITH(rrd-default-font, +[ --with-rrd-default-font=[OPTIONS] set the full path to your default font.], +[RRD_DEFAULT_FONT=$withval],[ + if test -d ${WINDIR:-nodir}/cour.ttf ; then + RRD_DEFAULT_FONT=`cd $WINDIR;pwd`/cour.ttf + else + RRD_DEFAULT_FONT='"DejaVu Sans Mono,Bitstream Vera Sans Mono,monospace,Courier"' + fi +]) + +dnl Use mmap in rrd_update instead of seek+write +AC_ARG_ENABLE([mmap], +AS_HELP_STRING([--disable-mmap],[disable mmap in rrd_update, use seek+write instead]), +[], +[enable_mmap=yes]) + +AC_ARG_ENABLE(pthread,AS_HELP_STRING([--disable-pthread],[disable multithread support]), +[],[enable_pthread=yes]) + +AC_ARG_ENABLE(static-programs, + AS_HELP_STRING([--enable-static-programs],[Build static programs]), + [case "${enableval}" in + yes) staticprogs=yes ;; + no) staticprogs=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-static-programs) ;; + esac],[staticprogs=no]) +AM_CONDITIONAL(STATIC_PROGRAMS,[test "x$staticprogs" = "xyes"]) + + +CONFIGURE_PART(Audit Compilation Environment) + + +dnl Check for the compiler and static/shared library creation. +AC_PROG_CPP +AC_PROG_CC +AM_PROG_CC_C_O +AC_PROG_LIBTOOL + +dnl Try to detect/use GNU features +CFLAGS="$CFLAGS -D_GNU_SOURCE" + +dnl check for -Werror separatly +dnl (quite a few autotool checks do not work with -Werror; also, the +dnl check for -Werror fails after checking and adding the other flags) +AC_CACHE_CHECK([if gcc likes the -Werror flag], rd_cv_gcc_flag__Werror, + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[]], [[return 0 ]])], + [rd_cv_gcc_flag__Werror="yes"], + [rd_cv_gcc_flag__Werror="no"])]) +if test "x$rd_cv_gcc_flag__Werror" = "xyes"; then + WERROR="-Werror" +else + WERROR="" +fi +AC_SUBST(WERROR) + +dnl which flags does the compiler support? +if test "x$GCC" = "xyes"; then + for flag in -fno-strict-aliasing -Wall -std=c99 -pedantic -Wundef -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wold-style-definition -W; do + oCFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $flag" + cachename=rd_cv_gcc_flag_`echo $flag|sed 's/[[^A-Za-z]]/_/g'` + AC_CACHE_CHECK([if gcc likes the $flag flag], $cachename, + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[return 0 ]])],[eval $cachename=yes],[eval $cachename=no])]) + if eval test \$$cachename = no; then + CFLAGS="$oCFLAGS" + fi + done +fi + + + +AC_SUBST(RRD_DEFAULT_FONT) + +CONFIGURE_PART(Checking for Header Files) + +dnl Checks for header files. +AC_HEADER_STDC +AC_HEADER_DIRENT +AC_CHECK_HEADERS(langinfo.h stdint.h inttypes.h libgen.h features.h sys/stat.h sys/types.h fcntl.h fp_class.h malloc.h unistd.h ieeefp.h math.h sys/times.h sys/param.h sys/resource.h signal.h float.h stdio.h stdlib.h errno.h string.h ctype.h) + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_HEADER_TIME +AC_STRUCT_TM + +CONFIGURE_PART(Test Library Functions) + +dnl Checks for libraries. +AC_CHECK_FUNC(acos, , AC_CHECK_LIB(m, acos)) + + +dnl add pic flag in any case this makes sure all our code is relocatable +eval `./libtool --config | grep pic_flag` +CFLAGS="$CFLAGS $pic_flag" + + +dnl Checks for library functions. +AC_FUNC_STRFTIME +AC_FUNC_VPRINTF + +AC_C_BIGENDIAN + +dnl for each function found we get a definition in config.h +dnl of the form HAVE_FUNCTION + +AC_CHECK_FUNCS(nl_langinfo tzset fsync mbstowcs opendir readdir chdir chroot getuid strerror snprintf vsnprintf vasprintf fpclass class fp_class isnan memmove strchr mktime getrusage gettimeofday) + +AC_FUNC_STRERROR_R + +CONFIGURE_PART(Map/Fadvis/Madvise checking) + +dnl Could use these to know if we need to provide a prototype +dnl AC_CHECK_DECLS(fdatasync, [], [], [#include ]) + +dnl check for fdatasync. Solaris has fdatasync in the librt + +AC_CHECK_FUNCS(fdatasync, [], AC_CHECK_LIB(rt, fdatasync, [LIBS="${LIBS} -lrt"; AC_DEFINE(HAVE_FDATASYNC)],[])) +dnl if there is no fdatasync we may get lucky with fsync +AC_CHECK_FUNCS(fsync) + +dnl check for socket and nsl solaris again ... we need this for the new rrd_daemon stuff + +AC_CHECK_FUNCS(socket, [], AC_CHECK_LIB(socket, socket, [LIBS="${LIBS} -lsocket"; AC_DEFINE(HAVE_SOCKET)],[])) +AC_CHECK_FUNCS(getaddrinfo, [], AC_CHECK_LIB(nsl, getaddrinfo, [LIBS="${LIBS} -lnsl"; AC_DEFINE(HAVE_GETADDRINFO)],[])) + + + +dnl XXX: dunno about windows.. add AC_CHECK_FUNCS(munmap) there too? +if test "x$enable_mmap" = "xyes"; then + case "$host" in + *cygwin*) + # the normal mmap test does not work in cygwin + AC_CHECK_FUNCS(mmap) + if test "x$ac_cv_func_mmap" = "xyes"; then + ac_cv_func_mmap_fixed_mapped=yes + fi + ;; + *) + AC_CHECK_HEADERS(sys/mman.h) + AC_FUNC_MMAP + AC_CHECK_FUNCS(mmap munmap msync) + AC_CHECK_DECLS(madvise, [], [], [#ifdef HAVE_SYS_MMAN_H + # include + #endif]) + if test "x$ac_cv_have_decl_madvise" = "xyes"; + then + AC_CHECK_FUNCS(madvise) + else + AC_CHECK_FUNCS(posix_madvise) + if test "x$ac_cv_func_posix_madvise" != "xyes"; then + AC_MSG_WARN([madvise() nor posix_madvise() found.]) + fi + fi + ;; + esac + if test "x$ac_cv_func_mmap" != "xyes"; + then + AC_MSG_ERROR([--enable-mmap requested but mmap() was not detected]) +dnl enable_mmap="no" + fi +fi + +dnl can we use posix_fadvise +AC_CHECK_DECLS(posix_fadvise, [], [], [#define _XOPEN_SOURCE 600 +#include ]) +AC_CHECK_FUNCS(posix_fadvise) + +CONFIGURE_PART(Libintl Processing) + +AM_GNU_GETTEXT_VERSION(0.17) +AM_GNU_GETTEXT() + +CONFIGURE_PART(IEEE Math Checks) + + +dnl actual code to check if this works +AC_CHECK_FUNCS(fpclassify, , + [AC_MSG_CHECKING(for fpclassify with ) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include +volatile int x;volatile float f; ]], [[x = fpclassify(f)]])],[AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_FPCLASSIFY)],[AC_MSG_RESULT(no)])]) + +AC_CHECK_FUNCS(isinf, , + [AC_MSG_CHECKING(for isinf with ) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include +volatile int x;volatile float f; ]], [[x = isinf(f)]])],[AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_ISINF)],[AC_MSG_RESULT(no)])]) + +dnl finite is BSD, isfinite is C99, so prefer the latter +AC_CACHE_CHECK([whether isfinite is broken],[ac_cv_have_broken_isfinite],[ +AC_TRY_RUN([ +#ifdef HAVE_MATH_H +#include +#endif +#ifdef HAVE_FLOAT_H +#include +#endif +int main () +{ +#ifdef isfinite +#ifdef LDBL_MAX + if (!isfinite(LDBL_MAX)) return 1; +#endif +#ifdef DBL_MAX + if (!isfinite(DBL_MAX)) return 1; +#endif +#endif +return 0; +}],[ac_cv_have_broken_isfinite=no],[ac_cv_have_broken_isfinite=yes],[ +case "${target}" in + hppa*-*-hpux*) ac_cv_have_broken_isfinite=yes ;; + *-solaris2.8) ac_cv_have_broken_isfinite=yes ;; + *-solaris2.9) ac_cv_have_broken_isfinite=yes ;; + *) ac_cv_have_broken_isfinite=no ;; +esac]) +]) + +dnl the test does not seem to work on solaris 2.8 +dnl so lets fix this by hand +case "${target}" in + *-solaris2.8) ac_cv_have_broken_isfinite=yes ;; + *-solaris2.9) ac_cv_have_broken_isfinite=yes ;; +esac + +if test "x$ac_cv_have_broken_isfinite" = "xno"; then + AC_DEFINE(HAVE_ISFINITE) +else + AC_CHECK_FUNCS(finite,[], + [AC_CHECK_FUNCS(isfinite,[], + [AC_MSG_CHECKING(for isfinite with ) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include +volatile int x;volatile float f; ]],[[x = isfinite(f)]])],[AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_ISFINITE)],[AC_MSG_RESULT(no)])])]) +fi + +AC_FULL_IEEE + +CONFIGURE_PART(Resolve Portability Issues) + +CHECK_FOR_WORKING_MS_ASYNC + +dnl do we have nl_langinfo(_NL_TIME_WEEK_1STDAY) +AC_CHECK_FUNCS(_NL_TIME_WEEK_1STDAY, , + [AC_MSG_CHECKING([for nl_langinfo(_NL_TIME_WEEK_1STDAY) with langinfo.h]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[nl_langinfo(_NL_TIME_WEEK_1STDAY)]])],[AC_MSG_RESULT(yes) + AC_DEFINE(HAVE__NL_TIME_WEEK_1STDAY)],[AC_MSG_RESULT(no)])]) + +dnl Do we need getopt_long + +dnl even when including our own getopt implementation +dnl we may want to make sure we use the external +dnl defined by libc to not run into linker resolve trouble + +AC_CACHE_CHECK([for opterr], rd_cv_var_int_opterr, +[AC_TRY_LINK([#include ], + [extern int opterr; opterr = 1;], + [rd_cv_var_int_opterr=yes], + [rd_cv_var_int_opterr=no])]) +if test x"$rd_cv_var_int_opterr" = x"yes"; then + AC_DEFINE(HAVE_INT_OPTERR, 1, [Define to 1 if you have the global variable 'int opterr'.]) +fi + +build_getopt=no +RRD_GETOPT_LONG="LIBC_HAS_GETOPT_LONG" +AC_CHECK_FUNC(getopt_long,[],[ +RRD_GETOPT_LONG="getopt_long" +build_getopt=yes +]) +AC_SUBST(RRD_GETOPT_LONG) +AM_CONDITIONAL(BUILD_GETOPT,[test $build_getopt = yes]) + +dnl what does realloc do if it gets called with a NULL pointer + +AC_CACHE_CHECK([if realloc can deal with NULL], rd_cv_null_realloc, +[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include + int main(void){ + char *x = NULL; + x = realloc (x,10); + if (x==NULL) return 1; + return 0; + }]])],[rd_cv_null_realloc=yes],[rd_cv_null_realloc=nope],[:])]) + +if test x"$rd_cv_null_realloc" = xnope; then +AC_DEFINE(NO_NULL_REALLOC) +fi + +AC_LANG_PUSH(C) +dnl solaris has some odd defines it needs in order to propperly compile ctime_r +AC_MSG_CHECKING([if ctime_r need special care to act posixly correct]) +AC_LINK_IFELSE( + AC_LANG_PROGRAM( + [[#include ]], + [[ctime_r(NULL,NULL,0)]] + ), + [ CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS" + AC_LINK_IFELSE( + AC_LANG_PROGRAM( + [[#include ]], + [[ctime_r(NULL,NULL)]] + ), + [AC_MSG_RESULT([yes, this seems to be solaris style])], + [AC_MSG_ERROR([Can't figure how to compile ctime_r])] + ) + ], + [ AC_LINK_IFELSE( + AC_LANG_PROGRAM( + [[#include ]], + [[ctime_r(NULL,NULL)]] + ), + [AC_MSG_RESULT(no)], + [AC_MSG_ERROR([Can't figure how to compile ctime_r])] + ) + ] +) +AC_LANG_POP(C) + +dnl Check for pthreads +dnl http://autoconf-archive.cryp.to/acx_pthread.m4 + +AC_SUBST(MULTITHREAD_CFLAGS) +AC_SUBST(MULTITHREAD_LDFLAGS) + +if test $enable_pthread != no; then + ACX_PTHREAD([ + MULTITHREAD_CFLAGS=$PTHREAD_CFLAGS + MULTITHREAD_LDFLAGS=$PTHREAD_LIBS + ], + []) +fi + +dnl since we use lots of *_r functions all over the code we better +dnl make sure they are known + +if test "x$x_rflag" != "xno"; then + CPPFLAGS="$CPPFLAGS $x_rflag" +fi + +AM_CONDITIONAL(BUILD_MULTITHREAD,[test $enable_pthread != no]) + +AC_LANG_PUSH(C) +dnl see if we have to include malloc/malloc.h +AC_MSG_CHECKING([do we need malloc/malloc.h]) +AC_LINK_IFELSE( + AC_LANG_PROGRAM( + [[#include ]], + [[malloc(1)]] + ), + [ AC_MSG_RESULT([nope, works out of the box]) ], + [ AC_LINK_IFELSE( + AC_LANG_PROGRAM( + [[#include + #include ]], + [[malloc(1)]] + ),[ + AC_DEFINE([MUST_HAVE_MALLOC_MALLOC_H]) + AC_MSG_RESULT([yes we do])], + [AC_MSG_ERROR([Can not figure how to compile malloc])] + ) + ] +) + +dnl is time_t 32 of 64 bit ? +AC_DEFINE([TIME_T_IS_32BIT], [], [time_t is 32bit]) +AC_DEFINE([TIME_T_IS_64BIT], [], [time_t is 64bit]) +AC_MSG_CHECKING([the type of time_t]) +AC_RUN_IFELSE( + AC_LANG_PROGRAM( + [[#include ]], + [[if (sizeof(time_t) != 4) return 1; ]] + ), + [ AC_MSG_RESULT([time_t is 32 bit]) + AC_DEFINE([TIME_T_IS_32BIT]) + ], + [ AC_RUN_IFELSE( + AC_LANG_PROGRAM( + [[#include ]], + [[if (sizeof(time_t) != 8) return 1; ]] + ), + [ + AC_MSG_RESULT([time_t is 64 bit]) + AC_DEFINE([TIME_T_IS_64BIT]) + ], + [AC_MSG_ERROR([can not figure type of time_t])] + ) + ] +) + +AC_LANG_POP(C) + +CONFIGURE_PART(Find 3rd-Party Libraries) + +AC_ARG_ENABLE(libdbi,AS_HELP_STRING([--disable-libdbi],[do not build in support for libdbi]),[have_libdbi=no],[ + XXX=$LIBS + LIBS="$LIBS -ldbi -ldl" + AC_MSG_CHECKING(for libdbi) + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[#include ]], + [[dbi_initialize(NULL)]] + ) + ],[AC_DEFINE(HAVE_LIBDBI,[1],[have got libdbi installed]) + AC_MSG_RESULT([yes]) + have_libdbi=yes + ],[LIBS=$XXX + AC_MSG_RESULT([no]) + have_libdbi=no + ] + ) +]) +AM_CONDITIONAL(BUILD_LIBDBI,[test $have_libdbi != no]) + +AM_CONDITIONAL(BUILD_RRDCGI,[test $enable_rrdcgi != no]) + + +CORE_LIBS="$LIBS" + +dnl EX_CHECK_ALL(z, zlibVersion, zlib.h, zlib, 1.2.3, http://www.gzip.org/zlib/, "") +dnl EX_CHECK_ALL(png, png_access_version_number, png.h, libpng, 1.2.10, http://prdownloads.sourceforge.net/libpng/, "") +dnl EX_CHECK_ALL(freetype, FT_Init_FreeType, ft2build.h, freetype2, 2.1.10, http://prdownloads.sourceforge.net/freetype/, /usr/include/freetype2) +dnl EX_CHECK_ALL(fontconfig, FcInit, fontconfig.h, fontconfig, 2.3.1, http://fontconfig.org/release/, /usr/include) +EX_CHECK_ALL(cairo, cairo_font_options_create, cairo.h, cairo-png, 1.4.6, http://cairographics.org/releases/, "") +EX_CHECK_ALL(cairo, cairo_svg_surface_create, cairo-svg.h, cairo-svg, 1.4.6, http://cairographics.org/releases/, "") +EX_CHECK_ALL(cairo, cairo_pdf_surface_create, cairo-pdf.h, cairo-pdf, 1.4.6, http://cairographics.org/releases/, "") +EX_CHECK_ALL(cairo, cairo_ps_surface_create, cairo-ps.h, cairo-ps, 1.4.6, http://cairographics.org/releases/, "") +EX_CHECK_ALL(glib-2.0, glib_check_version, glib.h, glib-2.0, 2.12.12, ftp://ftp.gtk.org/pub/glib/2.12/, "") +EX_CHECK_ALL(pango-1.0, pango_cairo_context_set_font_options, pango/pango.h, pangocairo, 1.17, http://ftp.gnome.org/pub/GNOME/sources/pango/1.17, "") +EX_CHECK_ALL(xml2, xmlParseFile, libxml/parser.h, libxml-2.0, 2.6.31, http://xmlsoft.org/downloads.html, /usr/include/libxml2) + +if test "$EX_CHECK_ALL_ERR" = "YES"; then + AC_MSG_ERROR([Please fix the library issues listed above and try again.]) +fi + +ALL_LIBS="$LIBS" +LIBS= + +AC_SUBST(CORE_LIBS) +AC_SUBST(ALL_LIBS) + +CONFIGURE_PART(Prep for Building Language Bindings) + +dnl Check for Perl and friends +PATH=$PATH:/usr/perl5/bin +export PATH +AC_PATH_PROG(PERL, perl, no) +AC_PATH_PROG(POD2MAN, pod2man, no) +AC_PATH_PROG(POD2HTML, pod2html, no) + + +AC_ARG_ENABLE(perl,AS_HELP_STRING([--disable-perl],[do not build the perl modules]), +[],[enable_perl=yes]) + + +AC_ARG_VAR(PERLCC, [C compiler for Perl modules]) +AC_ARG_VAR(PERLCCFLAGS, [CC flags for Perl modules]) +AC_ARG_VAR(PERLLD, [Linker for Perl modules]) +AC_ARG_VAR(PERLLDFLAGS, [LD flags for Perl modules]) + +if test "x$PERL" = "xno" -o x$enable_perl = xno; then + COMP_PERL= +else + COMP_PERL="perl_piped perl_shared" + AC_MSG_CHECKING(for the perl version you are running) + PERL_VERSION=`$PERL -MConfig -e 'print $Config{version}'` + AC_MSG_RESULT($PERL_VERSION) + if test -z "$PERLCC"; then + AC_MSG_CHECKING(for the C compiler perl wants to use to build its modules) + perlcc=`$PERL -MConfig -e 'print $Config{cc}'` + AC_MSG_RESULT($perlcc) + if test ! -x "$perlcc"; then + AC_PATH_PROG(PERL_CC, ${perlcc}, no) + if test "$PERL_CC" = "no"; then + AC_MSG_WARN([ +I would not find the Compiler ($perlcc) that was originally used to compile +your perl binary. You should either make sure that this compiler is +available on your system, pick an other compiler and set PERLCC +appropriately, or use a different perl setup that was compiled locally. + +I will disable the compilation of the RRDs perl module for now. +]) + COMP_PERL="perl_piped" + fi + fi + fi +fi + +AC_MSG_CHECKING(Perl Modules to build) +AC_MSG_RESULT(${COMP_PERL:-No Perl Modules will be built}) + +# Options to pass when configuring perl module +langpref=$prefix +test "$langpref" = '$(DESTDIR)NONE' && langpref='$(DESTDIR)'$ac_default_prefix +test "$langpref" = "NONE" && langpref=$ac_default_prefix + +PERL_MAKE_OPTIONS="PREFIX=$langpref LIB=$langpref/lib/perl/$PERL_VERSION" + +dnl pass additional perl options when generating Makefile from Makefile.PL +AC_ARG_ENABLE(perl-site-install, +AS_HELP_STRING([--enable-perl-site-install],[by default the rrdtool perl modules are installed together with rrdtool in $prefix/lib/perl. You have to put a 'use lib qw($prefix/lib/perl)' into your scripts when you want to use them. When you set this option the perl modules will get installed wherever your perl setup thinks it is best.]), +[PERL_MAKE_OPTIONS=],[]) + +if test ! -z "$PERLCC"; then + PERL_MAKE_OPTIONS="$PERL_MAKE_OPTIONS CC=$PERLCC" + + if test ! -z "$PERLCCFLAGS"; then + PERL_MAKE_OPTIONS="$PERL_MAKE_OPTIONS CCFLAGS=$PERLCCFLAGS" + fi + + if test -z "$PERLLD"; then + PERLLD=$PERLCC + fi + PERL_MAKE_OPTIONS="$PERL_MAKE_OPTIONS LD=$PERLLD" + + if test ! -z "$PERLLDFLAGS"; then + PERL_MAKE_OPTIONS="$PERL_MAKE_OPTIONS LDFLAGS=$PERLLDFLAGS" + fi +fi + +AC_ARG_WITH(perl-options, +[ --with-perl-options=[OPTIONS] options to pass on command-line when + generating Makefile from Makefile.PL. If you set this + option, interesting things may happen unless you know + what you are doing!], +[PERL_MAKE_OPTIONS=$withval]) + +AC_SUBST(PERL_MAKE_OPTIONS) +AC_SUBST(PERL) +AC_SUBST(COMP_PERL) +AC_SUBST(PERL_VERSION) + +dnl Check for Ruby. +AC_PATH_PROG(RUBY, ruby, no) + +AC_ARG_ENABLE(ruby,AS_HELP_STRING([--disable-ruby],[do not build the ruby modules]), +[],[enable_ruby=yes]) + +AC_MSG_CHECKING(if ruby modules can be built) + +if test "x$RUBY" = "xno" -o x$enable_ruby = xno; then + COMP_RUBY= + AC_MSG_RESULT(No .. Ruby not found or disabled) +else + if $RUBY -e 'require "mkmf"' >/dev/null 2>&1; then + COMP_RUBY="ruby" + AC_MSG_RESULT(YES) + else + COMP_RUBY= + AC_MSG_RESULT(Ruby found but mkmf is missing! Install the -dev package) + fi +fi + +dnl pass additional ruby options when generating Makefile from Makefile.PL +AC_ARG_ENABLE(ruby-site-install, +AS_HELP_STRING([--enable-ruby-site-install],[by default the rrdtool ruby modules are installed together with rrdtool in $prefix/lib/ruby. You have to add $prefix/lib/ruby/$ruby_version/$sitearch to your $: variable for ruby to find the RRD.so file.]), +[RUBY_MAKE_OPTIONS=],[RUBY_MAKE_OPTIONS="sitedir=$langpref/lib/ruby"]) + + +AC_ARG_WITH(ruby-options, +[ --with-ruby-options=[OPTIONS] options to pass on command-line when + generating Makefile from extconf.rb. If you set this + option, interesting things may happen unless you know + what you are doing!], +[RUBY_MAKE_OPTIONS=$withval]) + +AC_SUBST(RUBY_MAKE_OPTIONS) +AC_SUBST(RUBY) +AC_SUBST(COMP_RUBY) + +dnl Check for Lua. +AC_PATH_PROG(LUA, lua, no) + +AC_ARG_ENABLE(lua,AS_HELP_STRING([--disable-lua],[do not build the lua modules]), +[],[enable_lua=yes]) + +COMP_LUA= +if test "$LUA" = "no" -o "$enable_lua" = "no"; then + enable_lua=no +else + AC_MSG_CHECKING(for lua >= 5.0) + read LUA_MAJOR LUA_MINOR LUA_POINT <&1 | cut -f2 -d' ' | sed -e 's/\./ /g') +LUA_EOF + if test 0$LUA_MAJOR -lt 5; then + AC_MSG_RESULT([no, version found is $LUA_MAJOR.$LUA_MINOR]) + else + AC_MSG_RESULT([$LUA_MAJOR.$LUA_MINOR found]) + lua_vdot=$LUA_MAJOR.$LUA_MINOR + lua_vndot=$LUA_MAJOR$LUA_MINOR + lua_version=$LUA_MAJOR.$LUA_MINOR.$LUA_POINT + AC_CHECK_HEADERS(lua$lua_vndot/lua.h, + [AC_CHECK_HEADERS(lua$lua_vndot/lualib.h, + [AC_CHECK_HEADER(lua$lua_vndot/lauxlib.h, + [lua_headerdir=lua$lua_vndot], + [])], + [])], + [AC_CHECK_HEADERS(lua$lua_vdot/lua.h, + [AC_CHECK_HEADERS(lua$lua_vdot/lualib.h, + [AC_CHECK_HEADER(lua$lua_vdot/lauxlib.h, + [lua_headerdir=lua$lua_vdot], + [])], + [])], + [AC_CHECK_HEADERS(lua.h, + [AC_CHECK_HEADERS(lualib.h, + [AC_CHECK_HEADER(lauxlib.h, + [lua_headerdir=""], + [lua_headerdir="no"])], + [])], + [])])]) + + if test "$lua_headerdir" = "no"; then + enable_lua=no + else + COMP_LUA=lua + fi + + if test "$COMP_LUA" != "lua"; then + enable_lua=no + AC_MSG_WARN([Lua $lua_vdot found but not lua.h, lualib.h and lauxlib.h! Please install the -dev packages for Lua $lua_vdot]) + else + # OK, headers found, let's check the libraries (LIBS is not used) + LIBS= + lua_havelib=no + LUA_HAVE_COMPAT51=DONT_HAVE_COMPAT51 + AC_SEARCH_LIBS(lua_call, lua$lua_vdot lua$lua_vndot lua, + [AC_SEARCH_LIBS(luaL_register, lua$lua_vdot lua$lua_vndot lua, + [lua_havelib=LUA$lua_vndot], + [AC_SEARCH_LIBS(luaL_module, lualib$lua_vndot lualib$lua_vdot lualib, + [lua_havelib=$lua_vndot; $LUA -l compat-5.1 2>/dev/null; + test "$?" = "0" && LUA_HAVE_COMPAT51=HAVE_COMPAT51], + [AC_SEARCH_LIBS(luaL_openlib, lualib$lua_vdot lualib$lua_vndot lualib, + [lua_havelib=$lua_vndot], + [COMP_LUA=], [-lm])], [-lm])], [-lm])], + [COMP_LUA=], [-lm]) + lua_libs=$LIBS + LIBS= + + # Options to pass when configuring Lua module + if test "$lua_havelib" != "no"; then + # OK, headers and libs found. Try to set lua flags + # and modules installation dirs with pkg-config + if test "$PKGCONFIG" != "no"; then + if test "$lua_vndot" = "50"; then + lua_pkg_prefix=lualib + else + lua_pkg_prefix=lua + fi + # try with dot, without dot and finally without version + for f in $lua_pkg_prefix$lua_vdot $lua_pkg_prefix$lua_vndot $lua_pkg_prefix; do + lua_exec_prefix=`$PKGCONFIG --variable=prefix $f 2>/dev/null` + # same binaries? + if test "$lua_exec_prefix/bin/lua" = "$LUA"; then + # OK, found CFLAGS. Get Lua LFLAGS and modules install dir + LUA_CFLAGS=`$PKGCONFIG --cflags $f 2>/dev/null` + LUA_LFLAGS=`$PKGCONFIG --libs $f 2>/dev/null` + LUA_INSTALL_CMOD=`$PKGCONFIG --variable=INSTALL_CMOD $f 2>/dev/null` + LUA_INSTALL_LMOD=`$PKGCONFIG --variable=INSTALL_LMOD $f 2>/dev/null` + break + fi + done + fi + + LUA_RRD_LIBDIR="$langpref/lib/lua/$lua_vdot" + # if lua 5.0 can't find compat-5.1, force installation of + # compat-5.1.lua together with RRDtool. + if test "$lua_vdot" = "5.0" -a "$LUA_HAVE_COMPAT51" != "HAVE_COMPAT51"; then + lua_need_compat51=1 + LUA_INSTALL_LMOD="$LUA_RRD_LIBDIR" + fi + + # if not set with pkg-config, use default values in src packages compat-5.1, lua 5.1 + if test "$LUA_CFLAGS" = ""; then + AC_MSG_WARN(Setting Lua include and lib flags to defaults in compat-5.1 and lua 5.1 sources) + LUA_CFLAGS="-I/usr/local/include -I/usr/local/include/lua -I/usr/local/include/lua/$lua_vdot" + LUA_LFLAGS="-L/usr/local/lib -L/usr/local/lib/lua -L/usr/local/lib/lua/$lua_vdot $lua_libs" + LUA_INSTALL_CMOD="/usr/local/lib/lua/$lua_vdot" + fi + + dnl pass additional lua options + dnl if lua-site-install is not set, overwrite LUA_INSTALL_CMOD already + dnl found and install together with RRDtool, under $langpref. + AC_ARG_ENABLE(lua-site-install, + AS_HELP_STRING([--enable-lua-site-install],[by default the lua module is installed together with rrdtool in $prefix/lib/lua/$lua_version. You have to add $prefix/lib/lua/$lua_version/?.so to package.cpath for lua to find 'rrd.so'. For lua 5.0 you may also need to change LUA_PATH to the same dir, to require 'compat-5.1'. When you set this option the lua modules will get installed wherever your Lua setup thinks it is best. WARNING: if you set this option, system lua modules compat-5.1.lua and rrd.so, if any, may be overwritten.]), + [], + [LUA_INSTALL_CMOD="$LUA_RRD_LIBDIR"; LUA_INSTALL_LMOD="$LUA_RRD_LIBDIR"]) + + LUA_DEFINES="-DLUA$lua_vndot -D$LUA_HAVE_COMPAT51" + AC_SUBST(LUA) + AC_SUBST(COMP_LUA) + AC_SUBST(LUA_INSTALL_CMOD) + AC_SUBST(LUA_INSTALL_LMOD) + AC_SUBST(LUA_CFLAGS) + AC_SUBST(LUA_LFLAGS) + AC_SUBST(LUA_DEFINES) + else + enable_lua=no + AC_MSG_RESULT([Lua headers found but not the libraries! Please reinstall the dev packages for Lua $LUA_MAJOR.$LUA_MINOR]) + fi + fi + fi +fi +dnl If Lua 5.0, we need compat-5.1. Add ours unless already +dnl integrated as in Debian/Ubuntu 5.0 -dev packages. +AM_CONDITIONAL(LUA_NEED_OUR_COMPAT51, + [test "$lua_vdot" = "5.0" -a "$LUA_HAVE_COMPAT51" != "HAVE_COMPAT51"]) +AM_CONDITIONAL(LUA_SITE_CINSTALL, [test "$LUA_INSTALL_CMOD" != "$LUA_RRD_LIBDIR"]) +AM_CONDITIONAL(LUA_SITE_LINSTALL, [test "$LUA_INSTALL_LMOD" != "$LUA_RRD_LIBDIR"]) +AM_CONDITIONAL(LUA50, [test "$lua_vndot" = "50"]) +AM_CONDITIONAL(BUILD_LUA, [test "$enable_lua" = "yes"]) + +enable_tcl_site=no + +AC_ARG_ENABLE(tcl,AS_HELP_STRING([--disable-tcl],[do not build the tcl modules]), +[],[enable_tcl=yes]) + +if test "$enable_tcl" = "yes"; then + dnl Check for Tcl. + withval="" + AC_ARG_WITH(tcllib,[ --with-tcllib=DIR location of the tclConfig.sh]) + enable_tcl=no + for dir in $withval /usr/lib /usr/local/lib /usr/lib/tcl8.4 /usr/lib/tcl8.3 ; do + AC_MSG_CHECKING(for tclConfig.sh in $dir) + if test -f "$dir/tclConfig.sh" ; then + tcl_config=$dir/tclConfig.sh + enable_tcl=yes + AC_MSG_RESULT(yes) + break + else + AC_MSG_RESULT(no) + fi + done + + if test "$enable_tcl" = "no"; then + AC_MSG_WARN([tclConfig.sh not found - Tcl interface will not be built]) + else + . $tcl_config + TCL_PACKAGE_DIR="$TCL_PACKAGE_PATH/tclrrd$VERSION" + if test -n "$TCL_INC_DIR"; then + TCL_INCLUDE_SPEC="$TCL_INCLUDE_SPEC -I$TCL_INC_DIR" + fi + fi + AC_ARG_ENABLE(tcl,AS_HELP_STRING([--enable-tcl-site],[install the tcl extension in the tcl tree]), + [],[enable_tcl_site=yes]) + +fi + +AM_CONDITIONAL(BUILD_TCL, test "$enable_tcl" = "yes" ) +AM_CONDITIONAL(BUILD_TCL_SITE, test "$enable_tcl_site" = "yes" ) + + +AC_SUBST(TCL_PREFIX) +AC_SUBST(TCL_SHLIB_CFLAGS) +AC_SUBST(TCL_SHLIB_LD) +AC_SUBST(TCL_SHLIB_SUFFIX) +AC_SUBST(TCL_PACKAGE_PATH) +AC_SUBST(TCL_LD_SEARCH_FLAGS) +AC_SUBST(TCL_STUB_LIB_SPEC) +AC_SUBST(TCL_VERSION) +AC_SUBST(TCL_PACKAGE_DIR) +AC_SUBST(TCL_INCLUDE_SPEC) + +AC_ARG_ENABLE(python,AS_HELP_STRING([--disable-python],[do not build the python modules]), +[],[enable_python=yes]) + +if test "$enable_python" = "yes"; then +dnl Check for python +AM_PATH_PYTHON(2.3,[],[enable_python=no]) +AM_CHECK_PYTHON_HEADERS(,[enable_python=no;AC_MSG_WARN(could not find Python headers)]) +fi + +if test x$enable_python = xno; then + COMP_PYTHON= +else + COMP_PYTHON="python" +fi + +AC_SUBST(COMP_PYTHON) + +dnl Check for nroff +AC_PATH_PROGS(NROFF, gnroff nroff) +AC_PATH_PROGS(TROFF, groff troff) + +AC_ARG_VAR(RRDDOCDIR, [[DATADIR/doc/PACKAGE-VERSION] Documentation directory]) +if test -z "$RRDDOCDIR"; then + RRDDOCDIR='${datadir}/doc/${PACKAGE}-${VERSION}'; fi + + +CONFIGURE_PART(Apply Configuration Information) + +AC_CONFIG_FILES([examples/shared-demo.pl]) +AC_CONFIG_FILES([examples/piped-demo.pl]) +AC_CONFIG_FILES([examples/stripes.pl]) +AC_CONFIG_FILES([examples/bigtops.pl]) +AC_CONFIG_FILES([examples/minmax.pl]) +AC_CONFIG_FILES([examples/4charts.pl]) +AC_CONFIG_FILES([examples/perftest.pl]) +AC_CONFIG_FILES([examples/Makefile]) +AC_CONFIG_FILES([examples/rrdcached/Makefile]) +AC_CONFIG_FILES([doc/Makefile]) +AC_CONFIG_FILES([po/Makefile.in]) +AC_CONFIG_FILES([intl/Makefile]) +AC_CONFIG_FILES([src/Makefile]) +AC_CONFIG_FILES([src/librrd.sym.in]) +AC_CONFIG_FILES([src/librrd.pc]) +AC_CONFIG_FILES([bindings/Makefile]) +AC_CONFIG_FILES([bindings/tcl/Makefile]) +AC_CONFIG_FILES([bindings/tcl/ifOctets.tcl]) +AC_CONFIG_FILES([Makefile]) +AC_CONFIG_FILES([bindings/lua/Makefile]) + +AC_CONFIG_COMMANDS([default],[[ chmod +x examples/*.pl]],[[]]) + +dnl intl requires our config to be called config.h. indulge it. +AC_CONFIG_COMMANDS_POST([ test -f config.h || ln -s rrd_config.h config.h ]) + +AC_OUTPUT + +AC_MSG_CHECKING(in) +AC_MSG_RESULT(and out again) + +echo $ECHO_N "ordering CD from http://tobi.oetiker.ch/wish $ECHO_C" 1>&6 +sleep 1 +echo $ECHO_N ".$ECHO_C" 1>&6 +sleep 1 +echo $ECHO_N ".$ECHO_C" 1>&6 +sleep 1 +echo $ECHO_N ".$ECHO_C" 1>&6 +sleep 1 +echo $ECHO_N ".$ECHO_C" 1>&6 +sleep 1 +AC_MSG_RESULT([ just kidding ;-)]) +echo +echo "----------------------------------------------------------------" +echo "Config is DONE!" +echo +echo " With MMAP IO: $enable_mmap" +echo " Build rrd_getopt: $build_getopt" +echo " Static programs: $staticprogs" +echo " Perl Modules: $COMP_PERL" +echo " Perl Binary: $PERL" +echo " Perl Version: $PERL_VERSION" +echo " Perl Options: $PERL_MAKE_OPTIONS" +echo " Ruby Modules: $COMP_RUBY" +echo " Ruby Binary: $RUBY" +echo " Ruby Options: $RUBY_MAKE_OPTIONS" +echo " Build Lua Bindings: $enable_lua" +if test "$enable_lua" = "yes"; then +echo " Lua Binary: $LUA" +echo " Lua Version: $lua_version" +echo " Lua C-modules dir: $LUA_INSTALL_CMOD" +if test "$lua_need_compat51" = "1"; then +echo " Lua Lua-modules dir: $LUA_INSTALL_LMOD" +fi +fi +echo " Build Tcl Bindings: $enable_tcl" +echo " Build Python Bindings: $enable_python" +echo " Build rrdcgi: $enable_rrdcgi" +echo " Build librrd MT: $enable_pthread" +echo " Use gettext: $USE_NLS" +echo " With libDBI: $have_libdbi" +echo +echo " Libraries: $ALL_LIBS" +echo +echo "Type 'make' to compile the software and use 'make install' to " +echo "install everything to: $prefix." +echo +echo " ... that wishlist is NO JOKE. If you find RRDtool useful" +echo "make me happy. Go to http://tobi.oetiker.ch/wish and" +echo "place an order." +echo +echo " -- Tobi Oetiker " +echo "----------------------------------------------------------------" diff --git a/program/debian/README b/program/debian/README new file mode 100644 index 00000000..0c2c5a01 --- /dev/null +++ b/program/debian/README @@ -0,0 +1,3 @@ +Find the latest debian packaging files at +git://git.snow-crash.org/pkg-rrdtool.git and mirrored at +git://git.tokkee.org/pkg-rrdtool.git diff --git a/program/doc/Makefile.am b/program/doc/Makefile.am new file mode 100644 index 00000000..c8057405 --- /dev/null +++ b/program/doc/Makefile.am @@ -0,0 +1,87 @@ +## Process this file with automake to produce Makefile.in + +SUFFIXES = .pod .pl .1 .3 .man .html .txt .pm .pdf .inc + +AUTOMAKE_OPTIONS = foreign + +#ACLOCAL_M4 = $(top_srcdir)/config/aclocal.m4 + +CLEANFILES = *.1 *.3 *.html *.txt *-dircache RRD?.pod *.pdf *~ core *itemcache *.rej *.orig *.tmp + +POD = bin_dec_hex.pod rrddump.pod rrdgraph_examples.pod rrdrestore.pod rrdupdate.pod \ + cdeftutorial.pod rrdfetch.pod rrdgraph_graph.pod rrdthreads.pod rrdxport.pod \ + rpntutorial.pod rrdfirst.pod rrdgraph_rpn.pod rrdtool.pod rrdcached.pod \ + rrd-beginners.pod rrdinfo.pod rrdtune.pod rrdbuild.pod rrdflushcached.pod \ + rrdcgi.pod rrdgraph.pod rrdlast.pod rrdlastupdate.pod \ + rrdcreate.pod rrdgraph_data.pod rrdresize.pod rrdtutorial.pod + +if BUILD_LIBDBI + POD += rrdgraph_libdbi.pod +endif + +if BUILD_LUA + POD += rrdlua.pod +endif + +POD3 = librrd.pod + +PMP = RRDs.pod RRDp.pod + +MAN = $(POD:.pod=.1) +MAN3 = $(POD3:.pod=.3) +TXT = $(MAN:.1=.txt) $(MAN3:.3=.txt) +HTML = $(POD:.pod=.html) $(POD3:.pod=.html) $(PMP:.pod=.html) +PDF = $(MAN:.1=.pdf) $(MAN3:.3=.pdf) + +# what should go into the distribution +EXTRA_DIST= $(POD) $(POD3) $(HTML) $(MAN) $(MAN3) $(TXT) rrdtool-dump.dtd rrdtool-xport.dtd rrdgraph_libdbi.pod rrdlua.pod + +idocdir = $(RRDDOCDIR)/txt +idoc_DATA = $(POD) $(TXT) +ihtmldir = $(RRDDOCDIR)/html +ihtml_DATA = $(HTML) +imandir = $(mandir)/man1 +iman_DATA = $(MAN) +iman3dir = $(mandir)/man3 +iman3_DATA = $(MAN3) + +all-local: link man txt html-local + +.src.pod: + perl -n -e 'if (/^=include\s+(\S+)/){open F,"$$1.inc" || die $$?;print ; close F} else {print}' $< > $@ + +.pod.1 .pm.1 .pl.1: + $(AM_V_GEN)@POD2MAN@ --release=$(VERSION) --center=rrdtool $< > $@ + +.pod.3: + $(AM_V_GEN)@POD2MAN@ --release=$(VERSION) --center=rrdtool --section=3 $< > $@ + +.1.txt .3.txt: + $(AM_V_GEN)GROFF_NO_SGR=1 @NROFF@ -man -Tlp $< > $@ + +.1.pdf .3.pdf: + $(AM_V_GEN)@TROFF@ -man $< | ps2pdf - $@ + +.pm.html .pod.html .pl.html: + $(AM_V_GEN)@POD2HTML@ --infile=$< --outfile=$@ --noindex --htmlroot=. --podpath=. --title=$* + +RRDs.pod: + $(AM_V_GEN)$(LN_S) $(top_srcdir)/bindings/perl-shared/RRDs.pm RRDs.pod + +RRDp.pod: + $(AM_V_GEN)$(LN_S) $(top_srcdir)/bindings/perl-piped/RRDp.pm RRDp.pod + +link: RRDp.pod RRDs.pod + +man: $(MAN) $(MAN3) + +html-local: $(HTML) + +txt: $(TXT) + +pdf-local: $(PDF) + +pod: $(POD) $(POD3) + +install-data-hook: + $(AM_V_GEN)cd $(DESTDIR)$(ihtmldir) && rm -f index.html && $(LN_S) rrdtool.html index.html diff --git a/program/doc/RRDp.pod b/program/doc/RRDp.pod new file mode 120000 index 00000000..11703f76 --- /dev/null +++ b/program/doc/RRDp.pod @@ -0,0 +1 @@ +../bindings/perl-piped/RRDp.pm \ No newline at end of file diff --git a/program/doc/RRDs.pod b/program/doc/RRDs.pod new file mode 120000 index 00000000..30a99d2c --- /dev/null +++ b/program/doc/RRDs.pod @@ -0,0 +1 @@ +../bindings/perl-shared/RRDs.pm \ No newline at end of file diff --git a/program/doc/bin_dec_hex.pod b/program/doc/bin_dec_hex.pod new file mode 100644 index 00000000..e52f200f --- /dev/null +++ b/program/doc/bin_dec_hex.pod @@ -0,0 +1,370 @@ +=head1 NAME + +bin_dec_hex - How to use binary, decimal, and hexadecimal notation. + +=head1 DESCRIPTION + +Most people use the decimal numbering system. This system uses ten +symbols to represent numbers. When those ten symbols are used up, they +start all over again and increment the position to the left. The +digit 0 is only shown if it is the only symbol in the sequence, or if +it is not the first one. + +If this sounds cryptic to you, this is what I've just said in numbers: + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + +and so on. + +Each time the digit nine is incremented, it is reset to 0 and the +position before (to the left) is incremented (from 0 to 1). Then +number 9 can be seen as "00009" and when we should increment 9, we +reset it to zero and increment the digit just before the 9 so the +number becomes "00010". Leading zeros we don't write except if it is +the only digit (number 0). And of course, we write zeros if they occur +anywhere inside or at the end of a number: + + "00010" -> " 0010" -> " 010" -> " 10", but not " 1 ". + +This was pretty basic, you already knew this. Why did I tell it? +Well, computers usually do not represent numbers with 10 different +digits. They only use two different symbols, namely "0" and "1". Apply +the same rules to this set of digits and you get the binary numbering +system: + + 0 + 1 + 10 + 11 + 100 + 101 + 110 + 111 + 1000 + 1001 + 1010 + 1011 + 1100 + 1101 + +and so on. + +If you count the number of rows, you'll see that these are again 14 +different numbers. The numbers are the same and mean the same as in +the first list, we just used a different representation. This means +that you have to know the representation used, or as it is called the +numbering system or base. Normally, if we do not explicitly specify +the numbering system used, we implicitly use the decimal system. If we +want to use any other numbering system, we'll have to make that +clear. There are a few widely adopted methods to do so. One common +form is to write 1010(2) which means that you wrote down a number in +its binary representation. It is the number ten. If you would write +1010 without specifying the base, the number is interpreted as one +thousand and ten using base 10. + +In books, another form is common. It uses subscripts (little +characters, more or less in between two rows). You can leave out the +parentheses in that case and write down the number in normal +characters followed by a little two just behind it. + +As the numbering system used is also called the base, we talk of the +number 1100 base 2, the number 12 base 10. + +Within the binary system, it is common to write leading zeros. The +numbers are written down in series of four, eight or sixteen depending +on the context. + +We can use the binary form when talking to computers +(...programming...), but the numbers will have large +representations. The number 65'535 (often in the decimal system a ' is +used to separate blocks of three digits for readability) would be +written down as 1111111111111111(2) which is 16 times the digit 1. +This is difficult and prone to errors. Therefore, we usually would use +another base, called hexadecimal. It uses 16 different symbols. First +the symbols from the decimal system are used, thereafter we continue +with alphabetic characters. We get 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, +A, B, C, D, E and F. This system is chosen because the hexadecimal +form can be converted into the binary system very easily (and back). + +There is yet another system in use, called the octal system. This was +more common in the old days, but is not used very often anymore. As +you might find it in use sometimes, you should get used to it and +we'll show it below. It's the same story as with the other +representations, but with eight different symbols. + + Binary (2) + Octal (8) + Decimal (10) + Hexadecimal (16) + + (2) (8) (10) (16) + 00000 0 0 0 + 00001 1 1 1 + 00010 2 2 2 + 00011 3 3 3 + 00100 4 4 4 + 00101 5 5 5 + 00110 6 6 6 + 00111 7 7 7 + 01000 10 8 8 + 01001 11 9 9 + 01010 12 10 A + 01011 13 11 B + 01100 14 12 C + 01101 15 13 D + 01110 16 14 E + 01111 17 15 F + 10000 20 16 10 + 10001 21 17 11 + 10010 22 18 12 + 10011 23 19 13 + 10100 24 20 14 + 10101 25 21 15 + +Most computers used nowadays are using bytes of eight bits. This means +that they store eight bits at a time. You can see why the octal system +is not the most practical for that: You'd need three digits to represent +the eight bits and this means that you'd have to use one complete digit +to represent only two bits (2+3+3=8). This is a waste. For hexadecimal +digits, you need only two digits which are used completely: + + (2) (8) (10) (16) + 11111111 377 255 FF + +You can see why binary and hexadecimal can be converted quickly: For +each hexadecimal digit there are exactly four binary digits. Take a +binary number: take four digits from the right and make a hexadecimal +digit from it (see the table above). Repeat this until there are no +more digits. And the other way around: Take a hexadecimal number. For +each digit, write down its binary equivalent. + +Computers (or rather the parsers running on them) would have a hard +time converting a number like 1234(16). Therefore hexadecimal numbers +are specified with a prefix. This prefix depends on the language +you're writing in. Some of the prefixes are "0x" for C, "$" for +Pascal, "#" for HTML. It is common to assume that if a number starts +with a zero, it is octal. It does not matter what is used as long as +you know what it is. I will use "0x" for hexadecimal, "%" for binary +and "0" for octal. The following numbers are all the same, just their +representation (base) is different: 021 0x11 17 %00010001 + +To do arithmetics and conversions you need to understand one more thing. +It is something you already know but perhaps you do not "see" it yet: + +If you write down 1234, (no prefix, so it is decimal) you are talking +about the number one thousand, two hundred and thirty four. In sort of +a formula: + + 1 * 1000 = 1000 + 2 * 100 = 200 + 3 * 10 = 30 + 4 * 1 = 4 + +This can also be written as: + + 1 * 10^3 + 2 * 10^2 + 3 * 10^1 + 4 * 10^0 + +where ^ means "to the power of". + +We are using the base 10, and the positions 0,1,2 and 3. +The right-most position should NOT be multiplied with 10. The second +from the right should be multiplied one time with 10. The third from +the right is multiplied with 10 two times. This continues for whatever +positions are used. + +It is the same in all other representations: + +0x1234 will be + + 1 * 16^3 + 2 * 16^2 + 3 * 16^1 + 4 * 16^0 + +01234 would be + + 1 * 8^3 + 2 * 8^2 + 3 * 8^1 + 4 * 8^0 + +This example can not be done for binary as that system only uses two +symbols. Another example: + +%1010 would be + + 1 * 2^3 + 0 * 2^2 + 1 * 2^1 + 0 * 2^0 + +It would have been easier to convert it to its hexadecimal form and +just translate %1010 into 0xA. After a while you get used to it. You will +not need to do any calculations anymore, but just know that 0xA means 10. + +To convert a decimal number into a hexadecimal you could use the next +method. It will take some time to be able to do the estimates, but it +will be easier when you use the system more frequently. We'll look at +yet another way afterwards. + +First you need to know how many positions will be used in the other +system. To do so, you need to know the maximum numbers you'll be +using. Well, that's not as hard as it looks. In decimal, the maximum +number that you can form with two digits is "99". The maximum for +three: "999". The next number would need an extra position. Reverse +this idea and you will see that the number can be found by taking 10^3 +(10*10*10 is 1000) minus 1 or 10^2 minus one. + +This can be done for hexadecimal as well: + + 16^4 = 0x10000 = 65536 + 16^3 = 0x1000 = 4096 + 16^2 = 0x100 = 256 + 16^1 = 0x10 = 16 + +If a number is smaller than 65'536 it will fit in four positions. +If the number is bigger than 4'095, you must use position 4. +How many times you can subtract 4'096 from the number without going below +zero is the first digit you write down. This will always be a number +from 1 to 15 (0x1 to 0xF). Do the same for the other positions. + +Let's try with 41'029. It is smaller than 16^4 but bigger than 16^3-1. This +means that we have to use four positions. +We can subtract 16^3 from 41'029 ten times without going below zero. +The left-most digit will therefore be "A", so we have 0xA????. +The number is reduced to 41'029 - 10*4'096 = 41'029-40'960 = 69. +69 is smaller than 16^3 but not bigger than 16^2-1. The second digit +is therefore "0" and we now have 0xA0??. +69 is smaller than 16^2 and bigger than 16^1-1. We can subtract 16^1 +(which is just plain 16) four times and write down "4" to get 0xA04?. +Subtract 64 from 69 (69 - 4*16) and the last digit is 5 --> 0xA045. + +The other method builds up the number from the right. Let's try 41'029 +again. Divide by 16 and do not use fractions (only whole numbers). + + 41'029 / 16 is 2'564 with a remainder of 5. Write down 5. + 2'564 / 16 is 160 with a remainder of 4. Write the 4 before the 5. + 160 / 16 is 10 with no remainder. Prepend 45 with 0. + 10 / 16 is below one. End here and prepend 0xA. End up with 0xA045. + +Which method to use is up to you. Use whatever works for you. I use +them both without being able to tell what method I use in each case, +it just depends on the number, I think. Fact is, some numbers will +occur frequently while programming. If the number is close to one I am +familiar with, then I will use the first method (like 32'770 which is +into 32'768 + 2 and I just know that it is 0x8000 + 0x2 = 0x8002). + +For binary the same approach can be used. The base is 2 and not 16, +and the number of positions will grow rapidly. Using the second method +has the advantage that you can see very easily if you should write down +a zero or a one: if you divide by two the remainder will be zero if it +is an even number and one if it is an odd number: + + 41029 / 2 = 20514 remainder 1 + 20514 / 2 = 10257 remainder 0 + 10257 / 2 = 5128 remainder 1 + 5128 / 2 = 2564 remainder 0 + 2564 / 2 = 1282 remainder 0 + 1282 / 2 = 641 remainder 0 + 641 / 2 = 320 remainder 1 + 320 / 2 = 160 remainder 0 + 160 / 2 = 80 remainder 0 + 80 / 2 = 40 remainder 0 + 40 / 2 = 20 remainder 0 + 20 / 2 = 10 remainder 0 + 10 / 2 = 5 remainder 0 + 5 / 2 = 2 remainder 1 + 2 / 2 = 1 remainder 0 + 1 / 2 below 0 remainder 1 + +Write down the results from right to left: %1010000001000101 + +Group by four: + + %1010000001000101 + %101000000100 0101 + %10100000 0100 0101 + %1010 0000 0100 0101 + +Convert into hexadecimal: 0xA045 + +Group %1010000001000101 by three and convert into octal: + + %1010000001000101 + %1010000001000 101 + %1010000001 000 101 + %1010000 001 000 101 + %1010 000 001 000 101 + %1 010 000 001 000 101 + %001 010 000 001 000 101 + 1 2 0 1 0 5 --> 0120105 + + So: %1010000001000101 = 0120105 = 0xA045 = 41029 + Or: 1010000001000101(2) = 120105(8) = A045(16) = 41029(10) + Or: 1010000001000101(2) = 120105(8) = A045(16) = 41029 + + +At first while adding numbers, you'll convert them to their decimal +form and then back into their original form after doing the addition. +If you use the other numbering system often, you will see that you'll +be able to do arithmetics directly in the base that is used. +In any representation it is the same, add the numbers on the right, +write down the right-most digit from the result, remember the other +digits and use them in the next round. Continue with the second digit +from the right and so on: + + %1010 + %0111 --> 10 + 7 --> 17 --> %00010001 + +will become + + %1010 + %0111 + + |||| + |||+-- add 0 + 1, result is 1, nothing to remember + ||+--- add 1 + 1, result is %10, write down 0 and remember 1 + |+---- add 0 + 1 + 1(remembered), result = 0, remember 1 + +----- add 1 + 0 + 1(remembered), result = 0, remember 1 + nothing to add, 1 remembered, result = 1 + -------- + %10001 is the result, I like to write it as %00010001 + +For low values, try to do the calculations yourself, then check them with +a calculator. The more you do the calculations yourself, the more you'll +find that you didn't make mistakes. In the end, you'll do calculi in +other bases as easily as you do them in decimal. + +When the numbers get bigger, you'll have to realize that a computer is +not called a computer just to have a nice name. There are many +different calculators available, use them. For Unix you could use "bc" +which is short for Binary Calculator. It calculates not only in +decimal, but in all bases you'll ever want to use (among them Binary). + +For people on Windows: +Start the calculator (start->programs->accessories->calculator) +and if necessary click view->scientific. You now have a scientific +calculator and can compute in binary or hexadecimal. + +=head1 AUTHOR + +I hope you enjoyed the examples and their descriptions. If you do, help +other people by pointing them to this document when they are asking +basic questions. They will not only get their answer, but at the same +time learn a whole lot more. + +Alex van den Bogaerdt Ealex@vandenbogaerdt.nlE diff --git a/program/doc/cdeftutorial.pod b/program/doc/cdeftutorial.pod new file mode 100644 index 00000000..1c17046c --- /dev/null +++ b/program/doc/cdeftutorial.pod @@ -0,0 +1,889 @@ +=head1 NAME + +cdeftutorial - Alex van den Bogaerdt's CDEF tutorial + +=head1 DESCRIPTION + +Intention of this document: to provide some examples of the commonly +used parts of RRDtool's CDEF language. + +If you think some important feature is not explained properly, and if +adding it to this document would benefit most users, please do ask me +to add it. I will then try to provide an answer in the next release +of this tutorial. No feedback equals no changes! Additions to +this document are also welcome. -- Alex van den Bogaerdt +Ealex@vandenbogaerdt.nlE + +=head2 Why this tutorial? + +One of the powerful parts of RRDtool is its ability to do all sorts +of calculations on the data retrieved from its databases. However, +RRDtool's many options and syntax make it difficult for the average +user to understand. The manuals are good at explaining what these +options do; however they do not (and should not) explain in detail +why they are useful. As with my RRDtool tutorial: if you want a +simple document in simple language you should read this tutorial. +If you are happy with the official documentation, you may find this +document too simple or even boring. If you do choose to read this +tutorial, I also expect you to have read and fully understand my +other tutorial. + +=head2 More reading + +If you have difficulties with the way I try to explain it please read +Steve Rader's L. It may help you understand how this all works. + +=head1 What are CDEFs? + +When retrieving data from an RRD, you are using a "DEF" to work with +that data. Think of it as a variable that changes over time (where +time is the x-axis). The value of this variable is what is found in +the database at that particular time and you can't do any +modifications on it. This is what CDEFs are for: they takes values +from DEFs and perform calculations on them. + +=head1 Syntax + + DEF:var_name_1=some.rrd:ds_name:CF + CDEF:var_name_2=RPN_expression + +You first define "var_name_1" to be data collected from data source +"ds_name" found in RRD "some.rrd" with consolidation function "CF". + +Assume the ifInOctets SNMP counter is saved in mrtg.rrd as the DS "in". +Then the following DEF defines a variable for the average of that +data source: + + DEF:inbytes=mrtg.rrd:in:AVERAGE + +Say you want to display bits per second (instead of bytes per second +as stored in the database.) You have to define a calculation +(hence "CDEF") on variable "inbytes" and use that variable (inbits) +instead of the original: + + CDEF:inbits=inbytes,8,* + +This tells RRDtool to multiply inbytes by eight to get inbits. I'll +explain later how this works. In the graphing or printing functions, +you can now use inbits where you would use inbytes otherwise. + +Note that the variable name used in the CDEF (inbits) must not be the +same as the variable named in the DEF (inbytes)! + +=head1 RPN-expressions + +RPN is short-hand for Reverse Polish Notation. It works as follows. +You put the variables or numbers on a stack. You also put operations +(things-to-do) on the stack and this stack is then processed. The result +will be placed on the stack. At the end, there should be exactly one +number left: the outcome of the series of operations. If there is not +exactly one number left, RRDtool will complain loudly. + +Above multiplication by eight will look like: + +=over 4 + +=item 1. + +Start with an empty stack + +=item 2. + +Put the content of variable inbytes on the stack + +=item 3. + +Put the number eight on the stack + +=item 4. + +Put the operation multiply on the stack + +=item 5. + +Process the stack + +=item 6. + +Retrieve the value from the stack and put it in variable inbits + +=back + +We will now do an example with real numbers. Suppose the variable +inbytes would have value 10, the stack would be: + +=over 4 + +=item 1. + +|| + +=item 2. + +|10| + +=item 3. + +|10|8| + +=item 4. + +|10|8|*| + +=item 5. + +|80| + +=item 6. + +|| + +=back + +Processing the stack (step 5) will retrieve one value from the stack +(from the right at step 4). This is the operation multiply and this +takes two values off the stack as input. The result is put back on the +stack (the value 80 in this case). For multiplication the order doesn't +matter, but for other operations like subtraction and division it does. +Generally speaking you have the following order: + + y = A - B --> y=minus(A,B) --> CDEF:y=A,B,- + +This is not very intuitive (at least most people don't think so). For +the function f(A,B) you reverse the position of "f", but you do not +reverse the order of the variables. + +=head1 Converting your wishes to RPN + +First, get a clear picture of what you want to do. Break down the problem +in smaller portions until they cannot be split anymore. Then it is rather +simple to convert your ideas into RPN. + +Suppose you have several RRDs and would like to add up some counters in +them. These could be, for instance, the counters for every WAN link you +are monitoring. + +You have: + + router1.rrd with link1in link2in + router2.rrd with link1in link2in + router3.rrd with link1in link2in + +Suppose you would like to add up all these counters, except for link2in +inside router2.rrd. You need to do: + +(in this example, "router1.rrd:link1in" means the DS link1in inside the +RRD router1.rrd) + + router1.rrd:link1in + router1.rrd:link2in + router2.rrd:link1in + router3.rrd:link1in + router3.rrd:link2in + -------------------- + + (outcome of the sum) + +As a mathematical function, this could be written: + +C + +With RRDtool and RPN, first, define the inputs: + + DEF:a=router1.rrd:link1in:AVERAGE + DEF:b=router1.rrd:link2in:AVERAGE + DEF:c=router2.rrd:link1in:AVERAGE + DEF:d=router3.rrd:link1in:AVERAGE + DEF:e=router3.rrd:link2in:AVERAGE + +Now, the mathematical function becomes: C + +In RPN, there's no operator that sums more than two values so you need +to do several additions. You add a and b, add c to the result, add d +to the result and add e to the result. + + push a: a stack contains the value of a + push b and add: b,+ stack contains the result of a+b + push c and add: c,+ stack contains the result of a+b+c + push d and add: d,+ stack contains the result of a+b+c+d + push e and add: e,+ stack contains the result of a+b+c+d+e + +What was calculated here would be written down as: + + ( ( ( (a+b) + c) + d) + e) > + +This is in RPN: C + +This is correct but it can be made more clear to humans. It does +not matter if you add a to b and then add c to the result or first +add b to c and then add a to the result. This makes it possible to +rewrite the RPN into C which is +evaluated differently: + + push value of variable a on the stack: a + push value of variable b on the stack: a b + push value of variable c on the stack: a b c + push value of variable d on the stack: a b c d + push value of variable e on the stack: a b c d e + push operator + on the stack: a b c d e + + and process it: a b c P (where P == d+e) + push operator + on the stack: a b c P + + and process it: a b Q (where Q == c+P) + push operator + on the stack: a b Q + + and process it: a R (where R == b+Q) + push operator + on the stack: a R + + and process it: S (where S == a+R) + +As you can see the RPN expression C will evaluate in +C<((((d+e)+c)+b)+a)> and it has the same outcome as C. +This is called the commutative law of addition, +but you may forget this right away, as long as you remember what it +means. + +Now look at an expression that contains a multiplication: + +First in normal math: C. In this case you can't +choose the order yourself, you have to start with the multiplication +and then add a to it. You may alter the position of b and c, you must +not alter the position of a and b. + +You have to take this in consideration when converting this expression +into RPN. Read it as: "Add the outcome of b*c to a" and then it is +easy to write the RPN expression: C +Another expression that would return the same: C + +In normal math, you may encounter something like "a*(b+c)" and this +can also be converted into RPN. The parenthesis just tell you to first +add b and c, and then multiply a with the result. Again, now it is +easy to write it in RPN: C. Note that this is very +similar to one of the expressions in the previous paragraph, only the +multiplication and the addition changed places. + +When you have problems with RPN or when RRDtool is complaining, it's +usually a good thing to write down the stack on a piece of paper +and see what happens. Have the manual ready and pretend to be RRDtool. +Just do all the math by hand to see what happens, I'm sure this will +solve most, if not all, problems you encounter. + +=head1 Some special numbers + +=head2 The unknown value + +Sometimes collecting your data will fail. This can be very common, +especially when querying over busy links. RRDtool can be configured +to allow for one (or even more) unknown value(s) and calculate the missing +update. You can, for instance, query your device every minute. This is +creating one so called PDP or primary data point per minute. If you +defined your RRD to contain an RRA that stores 5-minute values, you need +five of those PDPs to create one CDP (consolidated data point). +These PDPs can become unknown in two cases: + +=over 4 + +=item 1. + +The updates are too far apart. This is tuned using the "heartbeat" setting. + +=item 2. + +The update was set to unknown on purpose by inserting no value (using the +template option) or by using "U" as the value to insert. + +=back + +When a CDP is calculated, another mechanism determines if this CDP is valid +or not. If there are too many PDPs unknown, the CDP is unknown as well. +This is determined by the xff factor. Please note that one unknown counter +update can result in two unknown PDPs! If you only allow for one unknown +PDP per CDP, this makes the CDP go unknown! + +Suppose the counter increments with one per second and you retrieve it +every minute: + + counter value resulting rate + 10'000 + 10'060 1; (10'060-10'000)/60 == 1 + 10'120 1; (10'120-10'060)/60 == 1 + unknown unknown; you don't know the last value + 10'240 unknown; you don't know the previous value + 10'300 1; (10'300-10'240)/60 == 1 + +If the CDP was to be calculated from the last five updates, it would get +two unknown PDPs and three known PDPs. If xff would have been set to 0.5 +which by the way is a commonly used factor, the CDP would have a known +value of 1. If xff would have been set to 0.2 then the resulting CDP +would be unknown. + +You have to decide the proper values for heartbeat, number of PDPs per +CDP and the xff factor. As you can see from the previous text they define +the behavior of your RRA. + +=head2 Working with unknown data in your database + +As you have read in the previous chapter, entries in an RRA can be +set to the unknown value. If you do calculations with this type of +value, the result has to be unknown too. This means that an expression +such as C will be unknown if either a or b is unknown. +It would be wrong to just ignore the unknown value and return the value +of the other parameter. By doing so, you would assume "unknown" means "zero" +and this is not true. + +There has been a case where somebody was collecting data for over a year. +A new piece of equipment was installed, a new RRD was created and the +scripts were changed to add a counter from the old database and a counter +from the new database. The result was disappointing, a large part of +the statistics seemed to have vanished mysteriously ... +They of course didn't, values from the old database (known values) were +added to values from the new database (unknown values) and the result was +unknown. + +In this case, it is fairly reasonable to use a CDEF that alters unknown +data into zero. The counters of the device were unknown (after all, it +wasn't installed yet!) but you know that the data rate through the device +had to be zero (because of the same reason: it was not installed). + +There are some examples below that make this change. + +=head2 Infinity + +Infinite data is another form of a special number. It cannot be +graphed because by definition you would never reach the infinite +value. You can think of positive and negative infinity depending on +the position relative to zero. + +RRDtool is capable of representing (-not- graphing!) infinity by stopping +at its current maximum (for positive infinity) or minimum (for negative +infinity) without knowing this maximum (minimum). + +Infinity in RRDtool is mostly used to draw an AREA without knowing its +vertical dimensions. You can think of it as drawing an AREA with an +infinite height and displaying only the part that is visible in the +current graph. This is probably a good way to approximate infinity +and it sure allows for some neat tricks. See below for examples. + +=head2 Working with unknown data and infinity + +Sometimes you would like to discard unknown data and pretend it is zero +(or any other value for that matter) and sometimes you would like to +pretend that known data is unknown (to discard known-to-be-wrong data). +This is why CDEFs have support for unknown data. There are also examples +available that show unknown data by using infinity. + +=head1 Some examples + +=head2 Example: using a recently created RRD + +You are keeping statistics on your router for over a year now. Recently +you installed an extra router and you would like to show the combined +throughput for these two devices. + +If you just add up the counters from router.rrd and router2.rrd, you +will add known data (from router.rrd) to unknown data (from router2.rrd) for +the bigger part of your stats. You could solve this in a few ways: + +=over 4 + +=item * + +While creating the new database, fill it with zeros from the start to now. +You have to make the database start at or before the least recent time in +the other database. + +=item * + +Alternatively, you could use CDEF and alter unknown data to zero. + +=back + +Both methods have their pros and cons. The first method is troublesome and +if you want to do that you have to figure it out yourself. It is not +possible to create a database filled with zeros, you have to put them in +manually. Implementing the second method is described next: + +What we want is: "if the value is unknown, replace it with zero". This +could be written in pseudo-code as: if (value is unknown) then (zero) +else (value). When reading the L manual you notice the "UN" +function that returns zero or one. You also notice the "IF" function +that takes zero or one as input. + +First look at the "IF" function. It takes three values from the stack, +the first value is the decision point, the second value is returned to +the stack if the evaluation is "true" and if not, the third value is +returned to the stack. We want the "UN" function to decide what happens +so we combine those two functions in one CDEF. + +Lets write down the two possible paths for the "IF" function: + + if true return a + if false return b + +In RPN: C where "x" is either true or false. + +Now we have to fill in "x", this should be the "(value is unknown)" part +and this is in RPN: C + +We now combine them: C and when we fill in the +appropriate things for "a" and "b" we're finished: + +C + +You may want to read Steve Rader's RPN guide if you have difficulties +with the way I explained this last example. + +If you want to check this RPN expression, just mimic RRDtool behavior: + + For any known value, the expression evaluates as follows: + CDEF:result=value,UN,0,value,IF (value,UN) is not true so it becomes 0 + CDEF:result=0,0,value,IF "IF" will return the 3rd value + CDEF:result=value The known value is returned + + For the unknown value, this happens: + CDEF:result=value,UN,0,value,IF (value,UN) is true so it becomes 1 + CDEF:result=1,0,value,IF "IF" sees 1 and returns the 2nd value + CDEF:result=0 Zero is returned + +Of course, if you would like to see another value instead of zero, you +can use that other value. + +Eventually, when all unknown data is removed from the RRD, you may want +to remove this rule so that unknown data is properly displayed. + +=head2 Example: better handling of unknown data, by using time + +The above example has one drawback. If you do log unknown data in +your database after installing your new equipment, it will also be +translated into zero and therefore you won't see that there was a +problem. This is not good and what you really want to do is: + +=over 4 + +=item * + +If there is unknown data, look at the time that this sample was taken. + +=item * + +If the unknown value is before time xxx, make it zero. + +=item * + +If it is after time xxx, leave it as unknown data. + +=back + +This is doable: you can compare the time that the sample was taken +to some known time. Assuming you started to monitor your device on +Friday September 17, 1999, 00:35:57 MET DST. Translate this time in seconds +since 1970-01-01 and it becomes 937'521'357. If you process unknown values +that were received after this time, you want to leave them unknown and +if they were "received" before this time, you want to translate them +into zero (so you can effectively ignore them while adding them to your +other routers counters). + +Translating Friday September 17, 1999, 00:35:57 MET DST into 937'521'357 can +be done by, for instance, using gnu date: + + date -d "19990917 00:35:57" +%s + +You could also dump the database and see where the data starts to be +known. There are several other ways of doing this, just pick one. + +Now we have to create the magic that allows us to process unknown +values different depending on the time that the sample was taken. +This is a three step process: + +=over 4 + +=item 1. + +If the timestamp of the value is after 937'521'357, leave it as is. + +=item 2. + +If the value is a known value, leave it as is. + +=item 3. + +Change the unknown value into zero. + +=back + +Lets look at part one: + + if (true) return the original value + +We rewrite this: + + if (true) return "a" + if (false) return "b" + +We need to calculate true or false from step 1. There is a function +available that returns the timestamp for the current sample. It is +called, how surprisingly, "TIME". This time has to be compared to +a constant number, we need "GT". The output of "GT" is true or false +and this is good input to "IF". We want "if (time > 937521357) then +(return a) else (return b)". + +This process was already described thoroughly in the previous chapter +so lets do it quick: + + if (x) then a else b + where x represents "time>937521357" + where a represents the original value + where b represents the outcome of the previous example + + time>937521357 --> TIME,937521357,GT + + if (x) then a else b --> x,a,b,IF + substitute x --> TIME,937521357,GT,a,b,IF + substitute a --> TIME,937521357,GT,value,b,IF + substitute b --> TIME,937521357,GT,value,value,UN,0,value,IF,IF + +We end up with: +C + +This looks very complex, however, as you can see, it was not too hard to +come up with. + +=head2 Example: Pretending weird data isn't there + +Suppose you have a problem that shows up as huge spikes in your graph. +You know this happens and why, so you decide to work around the problem. +Perhaps you're using your network to do a backup at night and by doing +so you get almost 10mb/s while the rest of your network activity does +not produce numbers higher than 100kb/s. + +There are two options: + +=over 4 + +=item 1. + +If the number exceeds 100kb/s it is wrong and you want it masked out +by changing it into unknown. + +=item 2. + +You don't want the graph to show more than 100kb/s. + +=back + +Pseudo code: if (number > 100) then unknown else number +or +Pseudo code: if (number > 100) then 100 else number. + +The second "problem" may also be solved by using the rigid option of +RRDtool graph, however this has not the same result. In this example +you can end up with a graph that does autoscaling. Also, if you use +the numbers to display maxima they will be set to 100kb/s. + +We use "IF" and "GT" again. "if (x) then (y) else (z)" is written +down as "CDEF:result=x,y,z,IF"; now fill in x, y and z. +For x you fill in "number greater than 100kb/s" becoming +"number,100000,GT" (kilo is 1'000 and b/s is what we measure!). +The "z" part is "number" in both cases and the "y" part is either +"UNKN" for unknown or "100000" for 100kb/s. + +The two CDEF expressions would be: + + CDEF:result=number,100000,GT,UNKN,number,IF + CDEF:result=number,100000,GT,100000,number,IF + +=head2 Example: working on a certain time span + +If you want a graph that spans a few weeks, but would only want to +see some routers' data for one week, you need to "hide" the rest of +the time frame. Don't ask me when this would be useful, it's just +here for the example :) + +We need to compare the time stamp to a begin date and an end date. +Comparing isn't difficult: + + TIME,begintime,GE + TIME,endtime,LE + +These two parts of the CDEF produce either 0 for false or 1 for true. +We can now check if they are both 0 (or 1) using a few IF statements +but, as Wataru Satoh pointed out, we can use the "*" or "+" functions +as logical AND and logical OR. + +For "*", the result will be zero (false) if either one of the two +operators is zero. For "+", the result will only be false (0) when +two false (0) operators will be added. Warning: *any* number not +equal to 0 will be considered "true". This means that, for instance, +"-1,1,+" (which should be "true or true") will become FALSE ... +In other words, use "+" only if you know for sure that you have positive +numbers (or zero) only. + +Let's compile the complete CDEF: + + DEF:ds0=router1.rrd:AVERAGE + CDEF:ds0modified=TIME,begintime,GT,TIME,endtime,LE,*,ds0,UNKN,IF + +This will return the value of ds0 if both comparisons return true. You +could also do it the other way around: + + DEF:ds0=router1.rrd:AVERAGE + CDEF:ds0modified=TIME,begintime,LT,TIME,endtime,GT,+,UNKN,ds0,IF + +This will return an UNKNOWN if either comparison returns true. + +=head2 Example: You suspect to have problems and want to see unknown data. + +Suppose you add up the number of active users on several terminal servers. +If one of them doesn't give an answer (or an incorrect one) you get "NaN" +in the database ("Not a Number") and NaN is evaluated as Unknown. + +In this case, you would like to be alerted to it and the sum of the +remaining values is of no value to you. + +It would be something like: + + DEF:users1=location1.rrd:onlineTS1:LAST + DEF:users2=location1.rrd:onlineTS2:LAST + DEF:users3=location2.rrd:onlineTS1:LAST + DEF:users4=location2.rrd:onlineTS2:LAST + CDEF:allusers=users1,users2,users3,users4,+,+,+ + +If you now plot allusers, unknown data in one of users1..users4 will +show up as a gap in your graph. You want to modify this to show a +bright red line, not a gap. + +Define an extra CDEF that is unknown if all is okay and is infinite if +there is an unknown value: + + CDEF:wrongdata=allusers,UN,INF,UNKN,IF + +"allusers,UN" will evaluate to either true or false, it is the (x) part +of the "IF" function and it checks if allusers is unknown. +The (y) part of the "IF" function is set to "INF" (which means infinity) +and the (z) part of the function returns "UNKN". + +The logic is: if (allusers == unknown) then return INF else return UNKN. + +You can now use AREA to display this "wrongdata" in bright red. If it +is unknown (because allusers is known) then the red AREA won't show up. +If the value is INF (because allusers is unknown) then the red AREA will +be filled in on the graph at that particular time. + + AREA:allusers#0000FF:combined user count + AREA:wrongdata#FF0000:unknown data + +=head2 Same example useful with STACKed data: + +If you use stack in the previous example (as I would do) then you don't +add up the values. Therefore, there is no relationship between the +four values and you don't get a single value to test. +Suppose users3 would be unknown at one point in time: users1 is plotted, +users2 is stacked on top of users1, users3 is unknown and therefore +nothing happens, users4 is stacked on top of users2. +Add the extra CDEFs anyway and use them to overlay the "normal" graph: + + DEF:users1=location1.rrd:onlineTS1:LAST + DEF:users2=location1.rrd:onlineTS2:LAST + DEF:users3=location2.rrd:onlineTS1:LAST + DEF:users4=location2.rrd:onlineTS2:LAST + CDEF:allusers=users1,users2,users3,users4,+,+,+ + CDEF:wrongdata=allusers,UN,INF,UNKN,IF + AREA:users1#0000FF:users at ts1 + STACK:users2#00FF00:users at ts2 + STACK:users3#00FFFF:users at ts3 + STACK:users4#FFFF00:users at ts4 + AREA:wrongdata#FF0000:unknown data + +If there is unknown data in one of users1..users4, the "wrongdata" AREA +will be drawn and because it starts at the X-axis and has infinite height +it will effectively overwrite the STACKed parts. + +You could combine the two CDEF lines into one (we don't use "allusers") +if you like. But there are good reasons for writing two CDEFS: + +=over 4 + +=item * + +It improves the readability of the script. + +=item * + +It can be used inside GPRINT to display the total number of users. + +=back + +If you choose to combine them, you can substitute the "allusers" in the +second CDEF with the part after the equal sign from the first line: + + CDEF:wrongdata=users1,users2,users3,users4,+,+,+,UN,INF,UNKN,IF + +If you do so, you won't be able to use these next GPRINTs: + + COMMENT:"Total number of users seen" + GPRINT:allusers:MAX:"Maximum: %6.0lf" + GPRINT:allusers:MIN:"Minimum: %6.0lf" + GPRINT:allusers:AVERAGE:"Average: %6.0lf" + GPRINT:allusers:LAST:"Current: %6.0lf\n" + +=head1 The examples from the RRD graph manual page + +=head2 Degrees Celsius vs. Degrees Fahrenheit + +To convert Celsius into Fahrenheit use the formula +F=9/5*C+32 + + rrdtool graph demo.png --title="Demo Graph" \ + DEF:cel=demo.rrd:exhaust:AVERAGE \ + CDEF:far=9,5,/,cel,*,32,+ \ + LINE2:cel#00a000:"D. Celsius" \ + LINE2:far#ff0000:"D. Fahrenheit\c" + +This example gets the DS called "exhaust" from database "demo.rrd" +and puts the values in variable "cel". The CDEF used is evaluated +as follows: + + CDEF:far=9,5,/,cel,*,32,+ + 1. push 9, push 5 + 2. push function "divide" and process it + the stack now contains 9/5 + 3. push variable "cel" + 4. push function "multiply" and process it + the stack now contains 9/5*cel + 5. push 32 + 6. push function "plus" and process it + the stack contains now the temperature in Fahrenheit + +=head2 Changing unknown into zero + + rrdtool graph demo.png --title="Demo Graph" \ + DEF:idat1=interface1.rrd:ds0:AVERAGE \ + DEF:idat2=interface2.rrd:ds0:AVERAGE \ + DEF:odat1=interface1.rrd:ds1:AVERAGE \ + DEF:odat2=interface2.rrd:ds1:AVERAGE \ + CDEF:agginput=idat1,UN,0,idat1,IF,idat2,UN,0,idat2,IF,+,8,* \ + CDEF:aggoutput=odat1,UN,0,odat1,IF,odat2,UN,0,odat2,IF,+,8,* \ + AREA:agginput#00cc00:Input Aggregate \ + LINE1:aggoutput#0000FF:Output Aggregate + +These two CDEFs are built from several functions. It helps to split +them when viewing what they do. Starting with the first CDEF we would +get: + + idat1,UN --> a + 0 --> b + idat1 --> c + if (a) then (b) else (c) + +The result is therefore "0" if it is true that "idat1" equals "UN". +If not, the original value of "idat1" is put back on the stack. +Lets call this answer "d". The process is repeated for the next +five items on the stack, it is done the same and will return answer +"h". The resulting stack is therefore "d,h". +The expression has been simplified to "d,h,+,8,*" and it will now be +easy to see that we add "d" and "h", and multiply the result with eight. + +The end result is that we have added "idat1" and "idat2" and in the +process we effectively ignored unknown values. The result is multiplied +by eight, most likely to convert bytes/s to bits/s. + +=head2 Infinity demo + + rrdtool graph example.png --title="INF demo" \ + DEF:val1=some.rrd:ds0:AVERAGE \ + DEF:val2=some.rrd:ds1:AVERAGE \ + DEF:val3=some.rrd:ds2:AVERAGE \ + DEF:val4=other.rrd:ds0:AVERAGE \ + CDEF:background=val4,POP,TIME,7200,%,3600,LE,INF,UNKN,IF \ + CDEF:wipeout=val1,val2,val3,val4,+,+,+,UN,INF,UNKN,IF \ + AREA:background#F0F0F0 \ + AREA:val1#0000FF:Value1 \ + STACK:val2#00C000:Value2 \ + STACK:val3#FFFF00:Value3 \ + STACK:val4#FFC000:Value4 \ + AREA:whipeout#FF0000:Unknown + +This demo demonstrates two ways to use infinity. It is a bit tricky +to see what happens in the "background" CDEF. + + "val4,POP,TIME,7200,%,3600,LE,INF,UNKN,IF" + +This RPN takes the value of "val4" as input and then immediately +removes it from the stack using "POP". The stack is now empty but +as a side effect we now know the time that this sample was taken. +This time is put on the stack by the "TIME" function. + +"TIME,7200,%" takes the modulo of time and 7'200 (which is two hours). +The resulting value on the stack will be a number in the range from +0 to 7199. + +For people who don't know the modulo function: it is the remainder +after an integer division. If you divide 16 by 3, the answer would +be 5 and the remainder would be 1. So, "16,3,%" returns 1. + +We have the result of "TIME,7200,%" on the stack, lets call this +"a". The start of the RPN has become "a,3600,LE" and this checks +if "a" is less or equal than "3600". It is true half of the time. +We now have to process the rest of the RPN and this is only a simple +"IF" function that returns either "INF" or "UNKN" depending on the +time. This is returned to variable "background". + +The second CDEF has been discussed earlier in this document so we +won't do that here. + +Now you can draw the different layers. Start with the background +that is either unknown (nothing to see) or infinite (the whole +positive part of the graph gets filled). + +Next you draw the data on top of this background, it will overlay +the background. Suppose one of val1..val4 would be unknown, in that +case you end up with only three bars stacked on top of each other. +You don't want to see this because the data is only valid when all +four variables are valid. This is why you use the second CDEF, it +will overlay the data with an AREA so the data cannot be seen anymore. + +If your data can also have negative values you also need to overwrite +the other half of your graph. This can be done in a relatively simple +way: what you need is the "wipeout" variable and place a negative +sign before it: "CDEF:wipeout2=wipeout,-1,*" + +=head2 Filtering data + +You may do some complex data filtering: + + MEDIAN FILTER: filters shot noise + + DEF:var=database.rrd:traffic:AVERAGE + CDEF:prev1=PREV(var) + CDEF:prev2=PREV(prev1) + CDEF:prev3=PREV(prev2) + CDEF:median=prev1,prev2,prev3,+,+,3,/ + LINE3:median#000077:filtered + LINE1:prev2#007700:'raw data' + + + DERIVATE: + + DEF:var=database.rrd:traffic:AVERAGE + CDEF:prev1=PREV(var) + CDEF:time=TIME + CDEF:prevtime=PREV(time) + CDEF:derivate=var,prev1,-,time,prevtime,-,/ + LINE3:derivate#000077:derivate + LINE1:var#007700:'raw data' + + +=head1 Out of ideas for now + +This document was created from questions asked by either myself or by +other people on the RRDtool mailing list. Please let me know if you +find errors in it or if you have trouble understanding it. If you +think there should be an addition, mail me: +Ealex@vandenbogaerdt.nlE + +Remember: B + +=head1 SEE ALSO + +The RRDtool manpages + +=head1 AUTHOR + +Alex van den Bogaerdt +Ealex@vandenbogaerdt.nlE diff --git a/program/doc/librrd.pod b/program/doc/librrd.pod new file mode 100644 index 00000000..dfe6f29c --- /dev/null +++ b/program/doc/librrd.pod @@ -0,0 +1,136 @@ +=pod + +=head1 NAME + +librrd - RRD library functions + +=head1 DESCRIPTION + +B contains most of the functionality in B. The command +line utilities and language bindings are often just wrappers around the +code contained in B. + +This manual page documents the B API. + +B This document is a work in progress, and should be considered +incomplete as long as this warning persists. For more information about +the B functions, always consult the source code. + +=head1 CORE FUNCTIONS + +=over 4 + +=item B + +In some situations it is necessary to get the output of C without +writing it to a file or the standard output. In such cases an application +can ask B to call an user-defined function each time there +is output to be stored somewhere. This can be used, to e.g. directly feed +an XML parser with the dumped output or transfer the resulting string +in memory. + +The arguments for B are the same as for B +except that the output filename parameter is replaced by the user-defined +callback function and an additional parameter for the callback function +that is passed untouched, i.e. to store information about the callback state +needed for the user-defined callback to function properly. + +Recent versions of B internally use this callback mechanism +to write their output to the file provided by the user. + + size_t rrd_dump_opt_cb_fileout( + const void *data, + size_t len, + void *user) + { + return fwrite(data, 1, len, (FILE *)user); + } + +The associated call for B looks like + + res = rrd_dump_cb_r(filename, opt_header, + rrd_dump_opt_cb_fileout, (void *)out_file); + +where the last parameter specifies the file handle B +should write to. There's no specific condition for the callback to detect +when it is called for the first time, nor for the last time. If you require +this for initialization and cleanup you should do those tasks before and +after calling B respectively. + +=back + +=head1 UTILITY FUNCTIONS + +=over 4 + +=item B + +Generates random numbers just like random(). This further ensures that +the random number generator is seeded exactly once per process. + +=item B + +Dynamically resize the array pointed to by C. C is a +pointer to the current size of C. Upon successful realloc(), the +C is incremented by 1 and the C pointer is stored at the +end of the new C. Returns 1 on success, 0 on failure. + + type **arr = NULL; + type *elem = "whatever"; + size_t arr_size = 0; + if (!rrd_add_ptr(&arr, &arr_size, elem)) + handle_failure(); + +=item B + +Like C, except adds a C of the source string. + + char **arr = NULL; + size_t arr_size = NULL; + char *str = "example text"; + if (!rrd_add_strdup(&arr, &arr_size, str)) + handle_failure(); + +=item B + +Free an array of pointers allocated by C or +C. Also frees the array pointer itself. On return, the +source pointer will be NULL and the count will be zero. + + /* created as above */ + rrd_free_ptrs(&arr, &arr_size); + /* here, arr == NULL && arr_size == 0 */ + +=item B + +Create the directory named C including all of its parent +directories (similar to C on the command line - see L for +more information). The argument C specifies the permissions to use. It +is modified by the process's C. See L for more details. + +The function returns 0 on success, a negative value else. In case of an error, +C is set accordingly. Aside from the errors documented in L, +the function may fail with the following errors: + +=over 4 + +=item B + +C is C or the empty string. + +=item B + +Insufficient memory was available. + +=item B> + +=back + +In contrast to L, the function does B fail if C +already exists and is a directory. + +=back + +=head1 AUTHOR + +RRD Contributors diff --git a/program/doc/name.inc b/program/doc/name.inc new file mode 100644 index 00000000..dffcae4e --- /dev/null +++ b/program/doc/name.inc @@ -0,0 +1,11 @@ +=head1 NAME + +=cut + +WARNING: DO NOT EDIT THE POD FILES. THEY ARE AUTO-GENERATED + +=pod + +rrdtool graph - Round Robin Database tool grapher functions + +Documentation for version 1.2.0 diff --git a/program/doc/rpntutorial.pod b/program/doc/rpntutorial.pod new file mode 100644 index 00000000..0ab31317 --- /dev/null +++ b/program/doc/rpntutorial.pod @@ -0,0 +1,197 @@ +=head1 NAME + +rpntutorial - Reading RRDtool RPN Expressions by Steve Rader + +=head1 DESCRIPTION + +This tutorial should help you get to grips with RRDtool RPN expressions +as seen in CDEF arguments of RRDtool graph. + +=head1 Reading Comparison Operators + +The LT, LE, GT, GE and EQ RPN logic operators are not as tricky as +they appear. These operators act on the two values on the stack +preceding them (to the left). Read these two values on the stack +from left to right inserting the operator in the middle. If the +resulting statement is true, then replace the three values from the +stack with "1". If the statement if false, replace the three values +with "0". + +For example, think about "2,1,GT". This RPN expression could be +read as "is two greater than one?" The answer to that question is +"true". So the three values should be replaced with "1". Thus the +RPN expression 2,1,GT evaluates to 1. + +Now consider "2,1,LE". This RPN expression could be read as "is +two less than or equal to one?". The natural response is "no" +and thus the RPN expression 2,1,LE evaluates to 0. + +=head1 Reading the IF Operator + +The IF RPN logic operator can be straightforward also. The key +to reading IF operators is to understand that the condition part +of the traditional "if X than Y else Z" notation has *already* +been evaluated. So the IF operator acts on only one value on the +stack: the third value to the left of the IF value. The second +value to the left of the IF corresponds to the true ("Y") branch. +And the first value to the left of the IF corresponds to the false +("Z") branch. Read the RPN expression "X,Y,Z,IF" from left to +right like so: "if X then Y else Z". + +For example, consider "1,10,100,IF". It looks bizarre to me. +But when I read "if 1 then 10 else 100" it's crystal clear: 1 is true +so the answer is 10. Note that only zero is false; all other values +are true. "2,20,200,IF" ("if 2 then 20 else 200") evaluates to 20. +And "0,1,2,IF" ("if 0 then 1 else 2) evaluates to 2. + + +Notice that none of the above examples really simulate the whole +"if X then Y else Z" statement. This is because computer programmers +read this statement as "if Some Condition then Y else Z". So it's +important to be able to read IF operators along with the LT, LE, +GT, GE and EQ operators. + +=head1 Some Examples + +While compound expressions can look overly complex, they can be +considered elegantly simple. To quickly comprehend RPN expressions, +you must know the algorithm for evaluating RPN expressions: +iterate searches from the left to the right looking for an operator. +When it's found, apply that operator by popping the operator and some +number of values (and by definition, not operators) off the stack. + +For example, the stack "1,2,3,+,+" gets "2,3,+" evaluated (as "2+3") +during the first iteration and is replaced by 5. This results in +the stack "1,5,+". Finally, "1,5,+" is evaluated resulting in the +answer 6. For convenience, it's useful to write this set of +operations as: + + 1) 1,2,3,+,+ eval is 2,3,+ = 5 result is 1,5,+ + 2) 1,5,+ eval is 1,5,+ = 6 result is 6 + 3) 6 + +Let's use that notation to conveniently solve some complex RPN expressions +with multiple logic operators: + + 1) 20,10,GT,10,20,IF eval is 20,10,GT = 1 result is 1,10,20,IF + +read the eval as pop "20 is greater than 10" so push 1 + + 2) 1,10,20,IF eval is 1,10,20,IF = 10 result is 10 + +read pop "if 1 then 10 else 20" so push 10. Only 10 is left so +10 is the answer. + +Let's read a complex RPN expression that also has the traditional +multiplication operator: + + 1) 128,8,*,7000,GT,7000,128,8,*,IF eval 128,8,* result is 1024 + 2) 1024 ,7000,GT,7000,128,8,*,IF eval 1024,7000,GT result is 0 + 3) 0, 7000,128,8,*,IF eval 128,8,* result is 1024 + 4) 0, 7000,1024, IF result is 1024 + +Now let's go back to the first example of multiple logic operators, +but replace the value 20 with the variable "input": + + 1) input,10,GT,10,input,IF eval is input,10,GT ( lets call this A ) + +Read eval as "if input > 10 then true" and replace "input,10,GT" +with "A": + + 2) A,10,input,IF eval is A,10,input,IF + +read "if A then 10 else input". Now replace A with it's verbose +description again and--voila!--you have an easily readable description +of the expression: + + if input > 10 then 10 else input + +Finally, let's go back to the first most complex example and replace +the value 128 with "input": + + 1) input,8,*,7000,GT,7000,input,8,*,IF eval input,8,* result is A + +where A is "input * 8" + + 2) A,7000,GT,7000,input,8,*,IF eval is A,7000,GT result is B + +where B is "if ((input * 8) > 7000) then true" + + 3) B,7000,input,8,*,IF eval is input,8,* result is C + +where C is "input * 8" + + 4) B,7000,C,IF + +At last we have a readable decoding of the complex RPN expression with +a variable: + + if ((input * 8) > 7000) then 7000 else (input * 8) + +=head1 Exercises + +Exercise 1: + +Compute "3,2,*,1,+ and "3,2,1,+,*" by hand. Rewrite them in +traditional notation. Explain why they have different answers. + +Answer 1: + + 3*2+1 = 7 and 3*(2+1) = 9. These expressions have + different answers because the altering of the plus and + times operators alter the order of their evaluation. + + +Exercise 2: + +One may be tempted to shorten the expression + + input,8,*,56000,GT,56000,input,*,8,IF + +by removing the redundant use of "input,8,*" like so: + + input,56000,GT,56000,input,IF,8,* + +Use traditional notation to show these expressions are not the same. +Write an expression that's equivalent to the first expression, but +uses the LE and DIV operators. + +Answer 2: + + if (input <= 56000/8 ) { input*8 } else { 56000 } + input,56000,8,DIV,LT,input,8,*,56000,IF + + +Exercise 3: + +Briefly explain why traditional mathematic notation requires the +use of parentheses. Explain why RPN notation does not require +the use of parentheses. + +Answer 3: + + Traditional mathematic expressions are evaluated by + doing multiplication and division first, then addition and + subtraction. Parentheses are used to force the evaluation of + addition before multiplication (etc). RPN does not require + parentheses because the ordering of objects on the stack + can force the evaluation of addition before multiplication. + + +Exercise 4: + +Explain why it was desirable for the RRDtool developers to implement +RPN notation instead of traditional mathematical notation. + +Answer 4: + + The algorithm that implements traditional mathematical + notation is more complex then algorithm used for RPN. + So implementing RPN allowed Tobias Oetiker to write less + code! (The code is also less complex and therefore less + likely to have bugs.) + + +=head1 AUTHOR + +Steve Rader Erader@wiscnet.netE diff --git a/program/doc/rrd-beginners.pod b/program/doc/rrd-beginners.pod new file mode 100644 index 00000000..f3c209bf --- /dev/null +++ b/program/doc/rrd-beginners.pod @@ -0,0 +1,326 @@ +=head1 NAME + +rrd-beginners - RRDtool Beginners' Guide + +=head1 SYNOPSIS + +Helping new RRDtool users to understand the basics of RRDtool + +=head1 DESCRIPTION + +This manual is an attempt to assist beginners in understanding the concepts +of RRDtool. It sheds a light on differences between RRDtool and other +databases. With help of an example, it explains the structure of RRDtool +database. This is followed by an overview of the "graph" feature of RRDtool. +At the end, it has sample scripts that illustrate the +usage/wrapping of RRDtool within Shell or Perl scripts. + +=head2 What makes RRDtool so special? + +RRDtool is GNU licensed software developed by Tobias Oetiker, a system +manager at the Swiss Federal Institute of Technology. Though it is a +database, there are distinct differences between RRDtool databases and other +databases as listed below: + +=over + +=item * + +RRDtool stores data; that makes it a back-end tool. The RRDtool command set +allows the creation of graphs; that makes it a front-end tool as well. Other +databases just store data and can not create graphs. + +=item * + +In case of linear databases, new data gets appended at the bottom of +the database table. Thus its size keeps on increasing, whereas the size of +an RRDtool database is determined at creation time. Imagine an RRDtool +database as the perimeter of a circle. Data is added along the +perimeter. When new data reaches the starting point, it overwrites +existing data. This way, the size of an RRDtool database always +remains constant. The name "Round Robin" stems from this behavior. + +=item * + +Other databases store the values as supplied. RRDtool can be configured to +calculate the rate of change from the previous to the current value and +store this information instead. + +=item * + +Other databases get updated when values are supplied. The RRDtool database +is structured in such a way that it needs data at predefined time +intervals. If it does not get a new value during the interval, it stores an +UNKNOWN value for that interval. So, when using the RRDtool database, it is +imperative to use scripts that run at regular intervals to ensure a constant +data flow to update the RRDtool database. + +=back + +RRDtool is designed to store time series of data. With every data +update, an associated time stamp is stored. Time is always expressed +in seconds passed since epoch (01-01-1970). RRDtool can be installed +on Unix as well as Windows. It comes with a command set to carry out +various operations on RRD databases. This command set can be accessed +from the command line, as well as from Shell or Perl scripts. The +scripts act as wrappers for accessing data stored in RRDtool +databases. + +=head2 Understanding by an example + +The structure of an RRD database is different than other linear databases. +Other databases define tables with columns, and many other parameters. These +definitions sometimes are very complex, especially in large databases. +RRDtool databases are primarily used for monitoring purposes and +hence are very simple in structure. The parameters +that need to be defined are variables that hold values and archives of those +values. Being time sensitive, a couple of time related parameters are also +defined. Because of its structure, the definition of an RRDtool database also +includes a provision to specify specific actions to take in the absence of +update values. Data Source (DS), heartbeat, Date Source Type (DST), Round +Robin Archive (RRA), and Consolidation Function (CF) are some of the +terminologies related to RRDtool databases. + +The structure of a database and the terminology associated with it can be +best explained with an example. + + rrdtool create target.rrd \ + --start 1023654125 \ + --step 300 \ + DS:mem:GAUGE:600:0:671744 \ + RRA:AVERAGE:0.5:12:24 \ + RRA:AVERAGE:0.5:288:31 + +This example creates a database named F. Start time +(1'023'654'125) is specified in total number of seconds since epoch +(time in seconds since 01-01-1970). While updating the database, the +update time is also specified. This update time MUST be large (later) +then start time and MUST be in seconds since epoch. + +The step of 300 seconds indicates that database expects new values every +300 seconds. The wrapper script should be scheduled to run every B +seconds so that it updates the database every B seconds. + +DS (Data Source) is the actual variable which relates to the parameter on +the device that is monitored. Its syntax is + + DS:variable_name:DST:heartbeat:min:max + +B is a key word. C is a name under which the parameter is +saved in the database. There can be as many DSs in a database as needed. After +every step interval, a new value of DS is supplied to update the database. +This value is also called Primary Data Point B<(PDP)>. In our example +mentioned above, a new PDP is generated every 300 seconds. + +Note, that if you do NOT supply new data points exactly every 300 seconds, +this is not a problem, RRDtool will interpolate the data accordingly. + +B (Data Source Type) defines the type of the DS. It can be +COUNTER, DERIVE, ABSOLUTE, GAUGE. A DS declared as COUNTER will save +the rate of change of the value over a step period. This assumes that +the value is always increasing (the difference between the current and +the previous value is greater than 0). Traffic counters on a router +are an ideal candidate for using COUNTER as DST. DERIVE is the same as +COUNTER, but it allows negative values as well. If you want to see the +rate of I in free disk space on your server, then you might +want to use the DERIVE data type. ABSOLUTE also saves the rate of +change, but it assumes that the previous value is set to 0. The +difference between the current and the previous value is always equal +to the current value. Thus it just stores the current value divided by +the step interval (300 seconds in our example). GAUGE does not save +the rate of change. It saves the actual value itself. There are no +divisions or calculations. Memory consumption in a server is a typical +example of gauge. The difference between the different types DSTs can be +explained better with the following example: + + Values = 300, 600, 900, 1200 + Step = 300 seconds + COUNTER DS = 1, 1, 1, 1 + DERIVE DS = 1, 1, 1, 1 + ABSOLUTE DS = 1, 2, 3, 4 + GAUGE DS = 300, 600, 900, 1200 + +The next parameter is B. In our example, heartbeat is 600 +seconds. If the database does not get a new PDP within 300 seconds, it +will wait for another 300 seconds (total 600 seconds). If it doesn't +receive any PDP within 600 seconds, it will save an UNKNOWN value into +the database. This UNKNOWN value is a special feature of RRDtool - it +is much better than to assume a missing value was 0 (zero) or any +other number which might also be a valid data value. For example, the +traffic flow counter on a router keeps increasing. Lets say, a value +is missed for an interval and 0 is stored instead of UNKNOWN. Now when +the next value becomes available, it will calculate the difference +between the current value and the previous value (0) which is not +correct. So, inserting the value UNKNOWN makes much more sense here. + +The next two parameters are the minimum and maximum value, +respectively. If the variable to be stored has predictable maximum and +minimum values, this should be specified here. Any update value +falling out of this range will be stored as UNKNOWN. + +The next line declares a round robin archive (RRA). The syntax for +declaring an RRA is + + RRA:CF:xff:step:rows + +RRA is the keyword to declare RRAs. The consolidation function (CF) +can be AVERAGE, MINIMUM, MAXIMUM, and LAST. The concept of the +consolidated data point (CDP) comes into the picture here. A CDP is +CFed (averaged, maximum/minimum value or last value) from I +number of PDPs. This RRA will hold I CDPs. + +Lets have a look at the example above. For the first RRA, 12 (steps) +PDPs (DS variables) are AVERAGEed (CF) to form one CDP. 24 (rows) of +theses CDPs are archived. Each PDP occurs at 300 seconds. 12 PDPs +represent 12 times 300 seconds which is 1 hour. It means 1 CDP (which +is equal to 12 PDPs) represents data worth 1 hour. 24 such CDPs +represent 1 day (1 hour times 24 CDPs). This means, this RRA is an +archive for one day. After 24 CDPs, CDP number 25 will replace the 1st +CDP. The second RRA saves 31 CDPs; each CPD represents an AVERAGE +value for a day (288 PDPs, each covering 300 seconds = 24 +hours). Therefore this RRA is an archive for one month. A single +database can have many RRAs. If there are multiple DSs, each +individual RRA will save data for all the DSs in the database. For +example, if a database has 3 DSs and daily, weekly, monthly, and +yearly RRAs are declared, then each RRA will hold data from all 3 data +sources. + +=head2 Graphical Magic + +Another important feature of RRDtool is its ability to create +graphs. The "graph" command uses the "fetch" command internally to +retrieve values from the database. With the retrieved values it draws +graphs as defined by the parameters supplied on the command line. A +single graph can show different DS (Data Sources) from a database. It +is also possible to show the values from more than one database in a +single graph. Often, it is necessary to perform some math on the +values retrieved from the database before plotting them. For example, +in SNMP replies, memory consumption values are usually specified in +KBytes and traffic flow on interfaces is specified in Bytes. Graphs +for these values will be more meaningful if values are represented in +MBytes and mbps. The RRDtool graph command allows to define such +conversions. Apart from mathematical calculations, it is also possible +to perform logical operations such as greater than, less than, and +if/then/else. If a database contains more than one RRA archive, then a +question may arise - how does RRDtool decide which RRA archive to use +for retrieving the values? RRDtool looks at several things when making +its choice. First it makes sure that the RRA covers as much of the +graphing time frame as possible. Second it looks at the resolution of +the RRA compared to the resolution of the graph. It tries to find one +which has the same or higher better resolution. With the "-r" option +you can force RRDtool to assume a different resolution than the one +calculated from the pixel width of the graph. + +Values of different variables can be presented in 5 different shapes +in a graph - AREA, LINE1, LINE2, LINE3, and STACK. AREA is represented +by a solid colored area with values as the boundary of this +area. LINE1/2/3 (increasing width) are just plain lines representing +the values. STACK is also an area but it is "stack"ed on top AREA or +LINE1/2/3. Another important thing to note is that variables are +plotted in the order they are defined in the graph command. Therefore +care must be taken to define STACK only after defining AREA/LINE. It +is also possible to put formatted comments within the graph. Detailed +instructions can be found in the graph manual. + +=head2 Wrapping RRDtool within Shell/Perl script + +After understanding RRDtool it is now a time to actually use RRDtool +in scripts. Tasks involved in network management are data collection, +data storage, and data retrieval. In the following example, the +previously created target.rrd database is used. Data collection and +data storage is done using Shell scripts. Data retrieval and report +generation is done using Perl scripts. These scripts are shown below: + +=head3 Shell script (collects data, updates database) + + #!/bin/sh + a=0 + while [ "$a" == 0 ]; do + snmpwalk -c public 192.168.1.250 hrSWRunPerfMem > snmp_reply + total_mem=`awk 'BEGIN {tot_mem=0} + { if ($NF == "KBytes") + {tot_mem=tot_mem+$(NF-1)} + } + END {print tot_mem}' snmp_reply` + # I can use N as a replacement for the current time + rrdtool update target.rrd N:$total_mem + # sleep until the next 300 seconds are full + perl -e 'sleep 300 - time % 300' + done # end of while loop + +=head3 Perl script (retrieves data from database and generates graphs and statistics) + + #!/usr/bin/perl -w + # This script fetches data from target.rrd, creates a graph of memory + # consumption on the target (Dual P3 Processor 1 GHz, 656 MB RAM) + + # call the RRD perl module + use lib qw( /usr/local/rrdtool-1.0.41/lib/perl ../lib/perl ); + use RRDs; + my $cur_time = time(); # set current time + my $end_time = $cur_time - 86400; # set end time to 24 hours ago + my $start_time = $end_time - 2592000; # set start 30 days in the past + + # fetch average values from the RRD database between start and end time + my ($start,$step,$ds_names,$data) = + RRDs::fetch("target.rrd", "AVERAGE", + "-r", "600", "-s", "$start_time", "-e", "$end_time"); + # save fetched values in a 2-dimensional array + my $rows = 0; + my $columns = 0; + my $time_variable = $start; + foreach $line (@$data) { + $vals[$rows][$columns] = $time_variable; + $time_variable = $time_variable + $step; + foreach $val (@$line) { + $vals[$rows][++$columns] = $val;} + $rows++; + $columns = 0; + } + my $tot_time = 0; + my $count = 0; + # save the values from the 2-dimensional into a 1-dimensional array + for $i ( 0 .. $#vals ) { + $tot_mem[$count] = $vals[$i][1]; + $count++; + } + my $tot_mem_sum = 0; + # calculate the total of all values + for $i ( 0 .. ($count-1) ) { + $tot_mem_sum = $tot_mem_sum + $tot_mem[$i]; + } + # calculate the average of the array + my $tot_mem_ave = $tot_mem_sum/($count); + # create the graph + RRDs::graph ("/images/mem_$count.png", + "--title= Memory Usage", + "--vertical-label=Memory Consumption (MB)", + "--start=$start_time", + "--end=$end_time", + "--color=BACK#CCCCCC", + "--color=CANVAS#CCFFFF", + "--color=SHADEB#9999CC", + "--height=125", + "--upper-limit=656", + "--lower-limit=0", + "--rigid", + "--base=1024", + "DEF:tot_mem=target.rrd:mem:AVERAGE", + "CDEF:tot_mem_cor=tot_mem,0,671744,LIMIT,UN,0,tot_mem,IF,1024,/", + "CDEF:machine_mem=tot_mem,656,+,tot_mem,-", + "COMMENT:Memory Consumption between $start_time", + "COMMENT: and $end_time ", + "HRULE:656#000000:Maximum Available Memory - 656 MB", + "AREA:machine_mem#CCFFFF:Memory Unused", + "AREA:tot_mem_cor#6699CC:Total memory consumed in MB"); + my $err=RRDs::error; + if ($err) {print "problem generating the graph: $err\n";} + # print the output + print "Average memory consumption is "; + printf "%5.2f",$tot_mem_ave/1024; + print " MB. Graphical representation can be found at /images/mem_$count.png."; + +=head1 AUTHOR + +Ketan Patel Ek2pattu@yahoo.comE + diff --git a/program/doc/rrdbuild.pod b/program/doc/rrdbuild.pod new file mode 100644 index 00000000..99bab008 --- /dev/null +++ b/program/doc/rrdbuild.pod @@ -0,0 +1,364 @@ +=head1 NAME + +rrdbuild - Instructions for building RRDtool + +=head1 OVERVIEW + +If you downloaded the source of RRDtool you have to compile it. This +document will give some information on how this is done. + +RRDtool relies on services of third part libraries. Some of these libraries +may already be installed on your system. You have to compile copies of the other +ones before you can build RRDtool. + +This document will tell you about all the necessary steps to get going. + +These instructions assume you are using a B shell. If you use csh/tcsh, +then you can either type F to switch to bash for the compilation or if +you know what you are doing just replace the export bits with +setenv. + +We further assume that your copies of B and B are actually B and B respectively. It could be that they are installed as +B and B on your system. + +=head1 OPTIMISTIC BUILD + +Before you start to build RRDtool, you have to decide two things: + +=over + +=item 1. + +In which directory you want to build the software. + +=item 2. + +Where you want to install the software. + +=back + +Once you have decided. Save the two locations into environment variables. + + BUILD_DIR=/tmp/rrdbuild + INSTALL_DIR=/opt/rrdtool-1.4.3 + + +If your F is mounted with the option noexec (RHEL seems todo that) you have to choose +a different directory! + +Now make sure the BUILD_DIR exists and go there: + + mkdir -p $BUILD_DIR + cd $BUILD_DIR + +Lets first assume you already have all the necessary libraries +pre-installed. + + wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.3.tar.gz + gunzip -c rrdtool-1.4.3.tar.gz | tar xf - + cd rrdtool-1.4.3 + ./configure --prefix=$INSTALL_DIR && make && make install + +Ok, this was very optimistic. This try will probably have ended with +B complaining about several missing libraries. + +=head1 INSTALLING DEPENDENCIES + +If your OS lets you install additional packages from a software repository, +you may get away with installing the missing packages. When the packages are +installed, run configure again and try to compile again. Below you find some +hints on getting your OS ready for compiling RRDtool. + +Additions to this list are welcome. In general RRDtool should work with the +latest versions of the libraries. The versions listed here are just what was +current when I tested this. + +=head2 OpenSolaris 2008.05 + +Just add a compiler and the gnome development package: + + pkg install sunstudioexpress + pkg install SUNWgnome-common-devel + +There is a problem with F on OpenSolaris. It suggests that +xrender is required for compilation with cairo. This is not true and also +bad since OpenSolaris does not include an F file. Use Perl to +fix this: + + perl -i~ -p -e 's/(Requires.*?)\s*xrender.*/$1/' /usr/lib/pkgconfig/cairo.pc + +Make sure the RRDtool build system finds your new compiler + + export PATH=/opt/SunStudioExpress/bin + +Since there does not seem to be a viable msgfmt tool on OpenSolaris (short +of installing it yourself). You have to call configure with the + + --disable-libintl + +option. + +=head2 Debian / Ubuntu + +Use apt-get to make sure you have all that is required. A number +of packages will get added through dependencies. + + apt-get install libpango1.0-dev libxml2-dev + +=head2 Gentoo + +In Gentoo installing RRDtool is really simple you just need to B. All dependencies will be handled automatically by the portage +system. The only thing you should care about are USE flags, which allow you +fine tune features RRDtool will be built with. Currently the following USE +flags are available: + + doc - install .html and .txt documentation + into /usr/share/doc/rrdtool-1.x.xx/ + perl - build and install perl language bindings + python - build and install python language bindings + ruby - build and install ruby language bindings + tcl - build and install tcl language bindings + rrdcgi - build and install rrdcgi + +After you've decided which USE flags you need, set them either in +F or F and finally run: + + # emerge -va rrdtool + +Take a look at Gentoo handbook for further details on how to manage USE +flags: http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2 + +=head1 BUILDING DEPENDENCIES + +But again this may have been too optimistic still, and you actually have to +compile your own copies of some of the required libraries. Things like +libpng and zlib are pretty standard so you will probably have them on your +system anyway. Freetype, Fontinst, Cairo, Pango may be installed, but it is +possible that they are pretty old and thus don't live up to our +expectations, so you may want to compile their latest versions. + +=head2 General build tips for AIX + +If you are working with AIX, you may find the B<--disable-shared> option +will cause things to break for you. In that case you may have to install the +shared libraries into the RRDtool PREFIX and work with B<--disable-static> +instead. + +Another hint to get RRDtool working on AIX is to use the IBM XL C Compiler: + + export CC=/usr/vac/bin/cc + export PERLCC=$CC + +(Better instructions for AIX welcome!) + +=head2 Build Instructions + +Some libraries want to know where other libraries are. For this to work, +set the following environment variable + + export PKG_CONFIG_PATH=${INSTALL_DIR}/lib/pkgconfig + export PATH=$INSTALL_DIR/bin:$PATH + +The above relies on the presence of the F program. Below you find instructions +on how to compile pkgconfig. + +Since we are compiling libraries dynamically, they must know where to find +each other. This is done by setting an appropriate LDFLAGS. Unfortunately, +the syntax again differs from system to system: + +=over + +=item Solaris + + export LDFLAGS=-R${INSTALL_DIR}/lib + +if you are using the Sun Studio/Forte compiler, you may also want to set + + CFLAGS="-xO3 -xcode=pic13" (SPARC) + CFLAGS="-xO3 -Kpic" (x86) + +=item Linux + + export LDFLAGS="-Wl,--rpath -Wl,${INSTALL_DIR}/lib" + +=item HPUX + + export LDFLAGS="+b${INSTALL_DIR}/lib" + +=item AIX + + export LDFLAGS="-Wl,-blibpath:${INSTALL_DIR}/lib" + +=back + +If you have GNU make installed and it is not called 'make', +then do + + export MAKE=gmake + export GNUMAKE=gmake + +otherwise just do + + export MAKE=make + +=head3 Building pkgconfig + +As mentioned above, without pkgconfig the whole build process will be lots +of pain and suffering, so make sure you have a copy on your system. If it is +not available natively, here is how to compile it. + + wget http://pkgconfig.freedesktop.org/releases/pkg-config-0.23.tar.gz + gunzip -c pkg-config-0.23.tar.gz | tar xf - + cd pkg-config-0.23 + ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" + $MAKE + $MAKE install + +After installing pkgconfig in a custom directory, setting up the corresponding +environment variable will be helpful. + + export PKG_CONFIG=$INSTALL_DIR/bin/pkg-config + +=head3 Building zlib + +Chances are very high that you already have that on your system ... + + cd $BUILD_DIR + wget http://oss.oetiker.ch/rrdtool/pub/libs/zlib-1.2.3.tar.gz + gunzip -c zlib-1.2.3.tar.gz | tar xf - + cd zlib-1.2.3 + ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" --shared + $MAKE + $MAKE install + +=head3 Building libpng + +Libpng itself requires zlib to build, so we need to help a bit. If you +already have a copy of zlib on your system (which is very likely) you can +drop the settings of LDFLAGS and CPPFLAGS. Note that the backslash (\) at +the end of line 4 means that line 4 and line 5 are on one line. + + cd $BUILD_DIR + wget http://oss.oetiker.ch/rrdtool/pub/libs/libpng-1.2.18.tar.gz + gunzip -c libpng-1.2.18.tar.gz | tar xf - + cd libpng-1.2.10 + env CFLAGS="-O3 -fPIC" ./configure --prefix=$INSTALL_DIR + $MAKE + $MAKE install + +=head3 Building freetype + + cd $BUILD_DIR + wget http://oss.oetiker.ch/rrdtool/pub/libs/freetype-2.3.5.tar.gz + gunzip -c freetype-2.3.5.tar.gz | tar xf - + cd freetype-2.3.5 + ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" + $MAKE + $MAKE install + +If you run into problems building freetype on Solaris, you may want to try to +add the following at the start the configure line: + + env EGREP=egrep + +=head3 Building LibXML2 + + cd $BUILD_DIR + wget http://oss.oetiker.ch/rrdtool/pub/libs/libxml2-2.6.32.tar.gz + gunzip -c libxml2-2.6.32.tar.gz | tar xf - + cd libxml2-2.6.32 + ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" + $MAKE + $MAKE install + +=head3 Building fontconfig + +Note that fontconfig has a run time configuration file in INSTALL_DIR/etc you +may want to adjust that so that fontconfig finds the fonts on your system. +Run the fc-cache program to build the fontconfig cache after changing the +config file. + + cd $BUILD_DIR + wget http://oss.oetiker.ch/rrdtool/pub/libs/fontconfig-2.4.2.tar.gz + gunzip -c fontconfig-2.4.2.tar.gz | tar xf - + cd fontconfig-2.4.2 + ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" --with-freetype-config=$INSTALL_DIR/bin/freetype-config + $MAKE + $MAKE install + +=head3 Building Pixman + + cd $BUILD_DIR + wget http://oss.oetiker.ch/rrdtool/pub/libs/pixman-0.10.0.tar.gz + gunzip -c pixman-0.10.0.tar.gz | tar xf - + cd pixman-0.10.0 + ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" + $MAKE + $MAKE install + +=head3 Building Cairo + + cd $BUILD_DIR + wget http://oss.oetiker.ch/rrdtool/pub/libs/cairo-1.6.4.tar.gz + gunzip -c cairo-1.6.4.tar.gz | tar xf - + cd cairo-1.6.4 + ./configure --prefix=$INSTALL_DIR \ + --enable-xlib=no \ + --enable-xlib-render=no \ + --enable-win32=no \ + CFLAGS="-O3 -fPIC" + $MAKE + $MAKE install + +=head3 Building Glib + + cd $BUILD_DIR + wget http://oss.oetiker.ch/rrdtool/pub/libs/glib-2.15.4.tar.gz + gunzip -c glib-2.15.4.tar.gz | tar xf - + cd glib-2.15.4 + ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" + $MAKE + $MAKE install + +=head3 Building Pango + + cd $BUILD_DIR + wget http://oss.oetiker.ch/rrdtool/pub/libs/pango-1.21.1.tar.bz2 + bunzip2 -c pango-1.21.1.tar.bz2 | tar xf - + cd pango-1.21.1 + ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" --without-x + $MAKE + $MAKE install + +=head2 Building rrdtool (second try) + +Now all the dependent libraries are built and you can try again. This time +you tell configure where it should be looking for libraries and include +files. This is done via environment variables. Depending on the shell you +are running, the syntax for setting environment variables is different. + +And finally try building again. We disable the python and tcl bindings +because it seems that a fair number of people have ill configured python and +tcl setups that would prevent RRDtool from building if they are included in +their current state. + + cd $BUILD_DIR/rrdtool-1.4.3 + ./configure --prefix=$INSTALL_DIR --disable-tcl --disable-python + $MAKE clean + $MAKE + $MAKE install + +SOLARIS HINT: if you want to build the Perl module for the native Perl (the +one shipping with Solaris) you will need the Sun Forte compiler installed on +your box or you have to hand-tune bindings/perl-shared/Makefile while +building! + +Now go to I<$INSTALL_DIR>B and run them to see if +your build has been successful. + +=head1 AUTHOR + +Tobias Oetiker Etobi@oetiker.chE + diff --git a/program/doc/rrdcached.pod b/program/doc/rrdcached.pod new file mode 100644 index 00000000..d6bfec39 --- /dev/null +++ b/program/doc/rrdcached.pod @@ -0,0 +1,699 @@ +=pod + +=head1 NAME + +rrdcached - Data caching daemon for rrdtool + +=head1 SYNOPSIS + +B +[B<-P>EI] +[B<-l>EI
] +[B<-s>EI] +[B<-w>EI] +[B<-z>EI] +[B<-f>EI] +[B<-p>EI] +[B<-t>EI] +[B<-j>EI] +[-F] +[-g] +[B<-b>EIE[B<-B>]] + +=head1 DESCRIPTION + +B is a daemon that receives updates to existing RRD files, +accumulates them and, if enough have been received or a defined time has +passed, writes the updates to the RRD file. A I command may be used to +force writing of values to disk, so that graphing facilities and similar can +work with up-to-date data. + +The daemon was written with big setups in mind. Those setups usually run into +IOErelated problems sooner or later for reasons that are beyond the scope +of this document. Check the wiki at the RRDtool homepage for details. Also +check L below before using this daemon! A detailed +description of how the daemon operates can be found in the L +section below. + +=head1 OPTIONS + +=over 4 + +=item B<-l> I
+ +Tells the daemon to bind to I
and accept incoming connections on that +socket. If I
begins with C, everything following that prefix is +interpreted as the path to a UNIX domain socket. Otherwise the address or node +name are resolved using C. + +For network sockets, a port may be specified by using the form +CI
B<]:>I>. If the address is an IPv4 address or a fully +qualified domain name (i.Ee. the address contains at least one dot +(C<.>)), the square brackets can be omitted, resulting in the (simpler) +CB<:>I> pattern. The default port is B<42217/udp>. If you +specify a network socket, it is mandatory to read the +L section. + +The following formats are accepted. Please note that the address of the UNIX +domain socket B start with a slash in the second case! + + unix: + / + + []: + : + +If the B<-l> option is not specified the default address, +C, will be used. + +=item B<-s> I|I + +Set the group permissions of a UNIX domain socket. The option accepts either +a numeric group id or group name. That group will then have both read and write +permissions (the socket will have file permissions 0750) for the socket and, +therefore, is able to send commands to the daemon. This +may be useful in cases where you cannot easily run all RRD processes with the same +user privileges (e.g. graph generating CGI scripts that typically run in the +permission context of the web server). + +This option affects the I UNIX socket addresses (the following +B<-l> options), i.e., you may specify different settings for different +sockets. + +The default is not to change ownership or permissions of the socket and, thus, +use the system default. + +=item B<-m> I + +Set the file permissions of a UNIX domain socket. The option accepts an octal +number representing the bit pattern for the mode (see L for +details). + +Please note that not all systems honor this setting. On Linux, read/write +permissions are required to connect to a UNIX socket. However, many +BSD-derived systems ignore permissions for UNIX sockets. See L for +details. + +This option affects the I UNIX socket addresses (the following +B<-l> options), i.e., you may specify different settings for different +sockets. + +The default is not to change ownership or permissions of the socket and, thus, +use the system default. + +=item B<-P> I[,I[,...]] + +Specifies the commands accepted via a network socket. This allows +administrators of I to control the actions accepted from various +sources. + +The arguments given to the B<-P> option is a comma separated list of commands. +For example, to allow the C and C commands one could specify: + + rrdcached -P FLUSH,PENDING $MORE_ARGUMENTS + +The B<-P> option affects the I socket addresses (the following B<-l> +options). In the following example, only the IPv4 network socket (address +C<10.0.0.1>) will be restricted to the C and C commands: + + rrdcached -l unix:/some/path -P FLUSH,PENDING -l 10.0.0.1 + +A complete list of available commands can be found in the section +L below. There are two minor special exceptions: + +=over 4 + +=item * + +The C and C commands are always allowed. + +=item * + +If the C command is accepted, the B<.>Ecommand will automatically +be accepted, too. + +=back + +Please also read L below. + +=item B<-w> I + +Data is written to disk every I seconds. If this option is not +specified the default interval of 300Eseconds will be used. + +=item B<-z> I + +If specified, rrdcached will delay writing of each RRD for a random number +of seconds in the rangeE[0,I). This will avoid too many +writes being queued simultaneously. This value should be no greater than +the value specified in B<-w>. By default, there is no delay. + +=item B<-f> I + +Every I seconds the entire cache is searched for old values which are +written to disk. This only concerns files to which updates have stopped, so +setting this to a high value, such as 3600Eseconds, is acceptable in most +cases. This timeout defaults to 3600Eseconds. + +=item B<-p> I + +Sets the name and location of the PID-file. If not specified, the default, +C/run/rrdcached.pid> will be used. + +=item B<-t> I + +Specifies the number of threads used for writing RRD files. The default +isE4. Increasing this number will allow rrdcached to have more +simultaneous I/O requests into the kernel. This may allow the kernel to +re-order disk writes, resulting in better disk throughput. + +=item B<-j> I + +Write updates to a journal in I. In the event of a program or system +crash, this will allow the daemon to write any updates that were pending +at the time of the crash. + +On startup, the daemon will check for journal files in this directory. If +found, all updates therein will be read into memory before the daemon +starts accepting new connections. + +The journal will be rotated with the same frequency as the flush timer +given by B<-f>. + +When journaling is enabled, the daemon will use a fast shutdown procedure. +Rather than flushing all files to disk, it will make sure the journal is +properly written and exit immediately. Although the RRD data files are +not fully up-to-date, no information is lost; all pending updates will be +replayed from the journal next time the daemon starts up. + +To disable fast shutdown, use the B<-F> option. + +=item B<-F> + +ALWAYS flush all updates to the RRD data files when the daemon is shut +down, regardless of journal setting. + +=item B<-g> + +Run in the foreground. The daemon will not fork(). + +=item B<-b> I + +The daemon will change into a specific directory at startup. All files passed +to the daemon, that are specified by a B path, will be interpreted +to be relative to this directory. If not given the default, C, will be +used. + + +------------------------+------------------------+ + ! Command line ! File updated ! + +------------------------+------------------------+ + ! foo.rrd ! /tmp/foo.rrd ! + ! foo/bar.rrd ! /tmp/foo/bar.rrd ! + ! /var/lib/rrd/foo.rrd ! /var/lib/rrd/foo.rrd ! + +------------------------+------------------------+ + Paths given on the command line and paths actually + updated by the daemon, assuming the base directory + "/tmp". + +B The paths up to and including the base directory B +symbolic links. In other words, if the base directory is +specified as: + + -b /base/dir/somewhere + +... then B of the following should be symbolic links: + + /base + /base/dir + /base/dir/somewhere + +=item B<-B> + +Only permit writes into the base directory specified in B<-b> (and any +sub-directories). This does B detect symbolic links. Paths +containing C<../> will also be blocked. + +=back + +=head1 AFFECTED RRDTOOL COMMANDS + +The following commands may be made aware of the B using the command +line argument B<--daemon> or the environment variable B: + +=over + +=item * + +dump + +=item * + +fetch + +=item * + +flush + +=item * + +graph + +=item * + +graphv + +=item * + +info + +=item * + +last + +=item * + +lastupdate + +=item * + +update + +=item * + +xport + +=back + +The B command can send values to the daemon instead of writing them to +the disk itself. All other commands can send a B command (see below) to +the daemon before accessing the files, so they work with up-to-date data even +if the cache timeout is large. + +=head1 ERROR REPORTING + +The daemon reports errors in one of two ways: During startup, error messages +are printed to C. One of the steps when starting up is to fork to the +background and closing C - after this writing directly to the user is +no longer possible. Once this has happened, the daemon will send log messages +to the system logging daemon using syslog(3). The facility used is +C. + +=head1 HOW IT WORKS + +When receiving an update, B does not write to disk but looks for an +entry for that file in its internal tree. If not found, an entry is created +including the current time (called "First" in the diagram below). This time is +B the time specified on the command line but the time the operating system +considers to be "now". The value and time of the value (called "Time" in the +diagram below) are appended to the tree node. + +When appending a value to a tree node, it is checked whether it's time to write +the values to disk. Values are written to disk if +S= timeout>>, where C is the timeout specified +using the B<-w> option, see L. If the values are "old enough" they +will be enqueued in the "update queue", i.Ee. they will be appended to +the linked list shown below. Because the tree nodes and the elements of the +linked list are the same data structures in memory, any update to a file that +has already been enqueued will be written with the next write to the RRD file, +too. + +A separate "update thread" constantly dequeues the first element in the update +queue and writes all its values to the appropriate file. So as long as the +update queue is not empty files are written at the highest possible rate. + +Since the timeout of files is checked only when new values are added to the +file, "dead" files, i.Ee. files that are not updated anymore, would never +be written to disk. Therefore, every now and then, controlled by the B<-f> +option, the entire tree is walked and all "old" values are enqueued. Since this +only affects "dead" files and walking the tree is relatively expensive, you +should set the "flush interval" to a reasonably high value. The default is +3600Eseconds (one hour). + +The downside of caching values is that they won't show up in graphs generated +from the RRDEfiles. To get around this, the daemon provides the "flush +command" to flush specific files. This means that the file is inserted at the +B of the update queue or moved there if it is already enqueued. The flush +command will return only after the file's pending updates have been written +to disk. + + +------+ +------+ +------+ + ! head ! ! root ! ! tail ! + +---+--+ +---+--+ +---+--+ + ! /\ ! + ! / \ ! + ! /\ /\ ! + ! /\/\ \ `----------------- ... --------, ! + V / `-------, ! V + +---+----+---+ +------+-----+ +---+----+---+ + ! File: foo ! ! File: bar ! ! File: qux ! + ! First: 101 ! ! First: 119 ! ! First: 180 ! + ! Next:&bar -+--->! Next:&... -+---> ... --->! Next:NULL ! + | Prev:NULL !<---+-Prev:&foo !<--- ... ----+-Prev: &... ! + +============+ +============+ +============+ + ! Time: 100 ! ! Time: 120 ! ! Time: 180 ! + ! Value: 10 ! ! Value: 0.1 ! ! Value: 2,2 ! + +------------+ +------------+ +------------+ + ! Time: 110 ! ! Time: 130 ! ! Time: 190 ! + ! Value: 26 ! ! Value: 0.1 ! ! Value: 7,3 ! + +------------+ +------------+ +------------+ + : : : : : : + +------------+ +------------+ +------------+ + ! Time: 230 ! ! Time: 250 ! ! Time: 310 ! + ! Value: 42 ! ! Value: 0.2 ! ! Value: 1,2 ! + +------------+ +------------+ +------------+ + +The above diagram demonstrates: + +=over + +=item * + +Files/values are stored in a (balanced) tree. + +=item * + +Tree nodes and entries in the update queue are the same data structure. + +=item * + +The local time ("First") and the time specified in updates ("Time") may differ. + +=item * + +Timed out values are inserted at the "tail". + +=item * + +Explicitly flushed values are inserted at the "head". + +=item * + +ASCII art rocks. + +=back + +=head1 SECURITY CONSIDERATIONS + +=head2 Authentication + +There is no authentication. + +The client/server protocol does not yet have any authentication mechanism. It +is likely that authentication and encryption will be added in a future version, +but for the time being it is the administrator's responsibility to secure the +traffic from/to the daemon! + +It is highly recommended to install a packet filter or similar mechanism to +prevent unauthorized connections. Unless you have a dedicated VLAN or VPN for +this, using network sockets is probably a bad idea! + +=head2 Authorization + +There is minimal per-socket authorization. + +Authorization is currently done on a per-socket basis. That means each socket +has a list of commands it will accept and it will accept. It will accept only +those commands explicitly listed but it will (currently) accept these commands +from anyone reaching the socket. + +If the networking sockets are to be used, it is necessary to restrict the +accepted commands to those needed by external clients. If, for example, +external clients want to draw graphs of the cached data, they should only be +allowed to use the C command. + +=head2 Encryption + +There is no encryption. + +Again, this may be added in the future, but for the time being it is your job +to keep your private data private. Install a VPN or an encrypted tunnel if you +statistics are confidential! + +=head2 Sanity checking + +There is no sanity checking. + +The daemon will blindly write to any file it gets told, so you really should +create a separate user just for this daemon. Also it does not do any sanity +checks, so if it gets told to write values for a time far in the future, your +files will be messed up good! + +=head2 Conclusion + +=over 4 + +=item * + +Security is the job of the administrator. + +=item * + +We recommend to allow write access via UNIX domain sockets only. + +=item * + +You have been warned. + +=back + +=head1 PROTOCOL + +The daemon communicates with clients using a line based ASCII protocol which is +easy to read and easy to type. This makes it easy for scripts to implement the +protocol and possible for users to use telnet to connect to the daemon +and test stuff "by hand". + +The protocol is line based, this means that each record consists of one or more +lines. A line is terminated by the line feed character C<0x0A>, commonly +written as C<\n>. In the examples below, this character will be written as +CLFE> ("line feed"). + +After the connection has been established, the client is expected to send a +"command". A command consists of the command keyword, possibly some arguments, +and a terminating newline character. For a list of commands, see +L below. + +Example: + + FLUSH /tmp/foo.rrd + +The daemon answers with a line consisting of a status code and a short status +message, separated by one or more space characters. A negative status code +signals an error, a positive status code or zero signal success. If the status +code is greater than zero, it indicates the number of lines that follow the +status line. + +Examples: + + 0 Success + + 2 Two lines follow + This is the first line + And this is the second line + +=head2 Valid Commands + +The following commands are understood by the daemon: + +=over 4 + +=item B I + +Causes the daemon to put I to the B of the update queue +(possibly moving it there if the node is already enqueued). The answer will be +sent B the node has been dequeued. + +=item B + +Causes the daemon to start flushing ALL pending values to disk. This +returns immediately, even though the writes may take a long time. + +=item B I + +Shows any "pending" updates for a file, in order. The updates shown have +not yet been written to the underlying RRD file. + +=item B I + +Removes I from the cache. Any pending updates B. + +=item B + +Shows the files that are on the output queue. Returns zero or more lines +in the following format, where Enum_valsE is the number of values +to be written for the EfileE: + + + +=item B [I] + +Returns a short usage message. If no command is given, or I is +B, a list of commands supported by the daemon is returned. Otherwise a +short description, possibly containing a pointer to a manual page, is returned. +Obviously, this is meant for interactive usage and the format in which the +commands and usage summaries are returned is not well defined. + +=item B + +Returns a list of metrics which can be used to measure the daemons performance +and check its status. For a description of the values returned, see +L below. + +The format in which the values are returned is similar to many other line based +protocols: Each value is printed on a separate line, each consisting of the +name of the value, a colon, one or more spaces and the actual value. + +Example: + + 9 Statistics follow + QueueLength: 0 + UpdatesReceived: 30 + FlushesReceived: 2 + UpdatesWritten: 13 + DataSetsWritten: 390 + TreeNodesNumber: 13 + TreeDepth: 4 + JournalBytes: 190 + JournalRotate: 0 + +=item B I I [I ...] + +Adds more data to a filename. This is B operation the daemon was designed +for, so describing the mechanism again is unnecessary. Read L +above for a detailed explanation. + +Note that rrdcached only accepts absolute timestamps in the update values. +Updates strings like "N:1:2:3" are automatically converted to absolute +time by the RRD client library before sending to rrdcached. + +=item B I + +This command is written to the journal after a file is successfully +written out to disk. It is used during journal replay to determine which +updates have already been applied. It is I valid in the journal; it +is not accepted from the other command channels. + +=item B + +This command initiates the bulk load of multiple commands. This is +designed for installations with extremely high update rates, since it +permits more than one command to be issued per read() and write(). + +All commands are executed just as they would be if given individually, +except for output to the user. Messages indicating success are +suppressed, and error messages are delayed until the client is finished. + +Command processing is finished when the client sends a dot (".") on its +own line. After the client has finished, the server responds with an +error count and the list of error messages (if any). Each error messages +indicates the number of the command to which it corresponds, and the error +message itself. The first user command after B is command number one. + + client: BATCH + server: 0 Go ahead. End with dot '.' on its own line. + client: UPDATE x.rrd 1223661439:1:2:3 <--- command #1 + client: UPDATE y.rrd 1223661440:3:4:5 <--- command #2 + client: and so on... + client: . + server: 2 Errors + server: 1 message for command 1 + server: 12 message for command 12 + +=item B + +Disconnect from rrdcached. + +=back + +=head2 Performance Values + +The following counters are returned by the B command: + +=over 4 + +=item B I<(unsigned 64bit integer)> + +Number of nodes currently enqueued in the update queue. + +=item B I<(unsigned 64bit integer)> + +Number of UPDATE commands received. + +=item B I<(unsigned 64bit integer)> + +Number of FLUSH commands received. + +=item B I<(unsigned 64bit integer)> + +Total number of updates, i.Ee. calls to C, since the +daemon was started. + +=item B I<(unsigned 64bit integer)> + +Total number of "data sets" written to disk since the daemon was +started. A data set is one or more values passed to the B +command. For example: C<1223661439:123:456> is one data set with two +values. The term "data set" is used to prevent confusion whether +individual values or groups of values are counted. + +=item B I<(unsigned 64bit integer)> + +Number of nodes in the cache. + +=item B I<(unsigned 64bit integer)> + +Depth of the tree used for fast key lookup. + +=item B I<(unsigned 64bit integer)> + +Total number of bytes written to the journal since startup. + +=item B I<(unsigned 64bit integer)> + +Number of times the journal has been rotated since startup. + +=back + +=head1 SIGNALS + +=over 4 + +=item SIGINT and SIGTERM + +The daemon exits normally on receipt of either of these signals. Pending +updates are handled in accordance with the B<-j> and B<-F> options. + +=item SIGUSR1 + +The daemon exits AFTER flushing all updates out to disk. This may take a +while. + +=item SIGUSR2 + +The daemon exits immediately, without flushing updates out to disk. +Pending updates will be replayed from the journal when the daemon starts +up again. B. + +=back + +=head1 BUGS + +No known bugs at the moment. + +=head1 SEE ALSO + +L, L + +=head1 AUTHOR + +Florian Forster EoctoEatEverplant.orgE + +Both B and this manual page have been written by Florian. + +=head1 CONTRIBUTORS + +kevin brintnall Ekbrint@rufus.netE + +=cut + diff --git a/program/doc/rrdcgi.pod b/program/doc/rrdcgi.pod new file mode 100644 index 00000000..e34d4c00 --- /dev/null +++ b/program/doc/rrdcgi.pod @@ -0,0 +1,225 @@ +=head1 NAME + +rrdcgi - Create web pages containing RRD graphs based on templates + +=head1 SYNOPSIS + +C<#!/path/to/>B S<[B<--filter>]> + +=head1 DESCRIPTION + +B is a sort of very limited script interpreter. Its purpose +is to run as a cgi-program and parse a web page template containing special +ERRD:: tags. B will interpret and act according to these tags. +In the end it will printout a web page including the necessary CGI headers. + +B parses the contents of the template in 3 steps. In each step it looks +only for a subset of tags. This allows nesting of tags. + +The argument parser uses the same semantics as you are used from your C-shell. + +=over 8 + +=item B<--filter> + +Assume that rrdcgi is run as a filter and not as a cgi. + +=back + +=head2 Keywords + +=over 8 + +=item RRD::CV I + +Inserts the CGI variable of the given name. + +=item RRD::CV::QUOTE I + +Inserts the CGI variable of the given name but quotes it, ready for +use as an argument in another RRD:: tag. So even when there are spaces in the +value of the CGI variable it will still be considered to be one argument. + +=item RRD::CV::PATH I + +Inserts the CGI variable of the given name, quotes it and makes sure +it starts neither with a '/' nor contains '..'. This is to make +sure that no problematic pathnames can be introduced through the +CGI interface. + +=item RRD::GETENV I + +Get the value of an environment variable. + + + +might give you the name of the remote user given you are using +some sort of access control on the directory. + + +=item RRD::GOODFOR I + +Specify the number of seconds this page should remain valid. This will prompt +the rrdcgi to output a Last-Modified, an Expire and if the number of +seconds is I a Refresh header. + +=item RRD::INCLUDE I + +Include the contents of the specified file into the page returned from the cgi. + +=item RRD::SETENV I I + +If you want to present your graphs in another time zone than your own, you +could use + + + +to make sure everything is presented in Universal Time. Note that the +values permitted to TZ depend on your OS. + +=item RRD::SETVAR I I + +Analog to SETENV but for local variables. + +=item RRD::GETVAR I + +Analog to GETENV but for local variables. + +=item RRD::TIME::LAST I I + +This gets replaced by the last modification time of the selected RRD. The +time is I-formatted with the string specified in the second argument. + +=item RRD::TIME::NOW I + +This gets replaced by the current time of day. The time is +I-formatted with the string specified in the argument. + +Note that if you return : (colons) from your strftime format you may +have to escape them using \ if the time is to be used as an argument +to a GRAPH command. + +=item RRD::TIME::STRFTIME I I I I + +This gets replaced by a strftime-formatted time using the format +I on either I or I depending on +whether I or I is specified. Both I and I +must be supplied as either could be relative to the other. This is intended +to allow pretty titles on graphs with times that are easier for non RRDtool +folks to figure out than "-2weeks". + +Note that again, if you return : (colon) from your strftime format, +you may have to escape them using \ if the time is to be used as an +argument to a GRAPH command. + +=item RRD::GRAPH I + +This tag creates the RRD graph defined by its argument and then is +replaced by an appropriate EIMG ... E tag referring to the graph. +The B<--lazy> option in RRD graph can be used to make sure that graphs +are only regenerated when they are out of date. The arguments +to the B tag work as described in the B manual page. + +Use the B<--lazy> option in your RRD::GRAPH tags, to reduce the load +on your server. This option makes sure that graphs are only regenerated when +the old ones are out of date. + +If you do not specify your own B<--imginfo> format, the following will +be used: + + + +Note that %s stands for the filename part of the graph generated, all +directories given in the PNG file argument will get dropped. + +=item RRD::PRINT I + +If the preceding B tag contained and B arguments, +then you can access their output with this tag. The I argument refers to the +number of the B argument. This first B has I 0. + +=item RRD::INTERNAL + +This tag gets replaced by an internal var. Currently these vars are known: +VERSION, COMPILETIME. +These vars represent the compiled-in values. + +=back + +=head1 EXAMPLE 1 + +The example below creates a web pages with a single RRD graph. + + #!/usr/local/bin/rrdcgi + + RRDCGI Demo + +

RRDCGI Example Page

+

+ + +

+ + + +=head1 EXAMPLE 2 + +This script is slightly more elaborate, it allows you to run it from +a form which sets RRD_NAME. RRD_NAME is then used to select which RRD +you want to use as source for your graph. + + #!/usr/local/bin/rrdcgi + + RRDCGI Demo + +

RRDCGI Example Page for

+

Selection

+
Room A, + Room B. +
+

Graph

+

+ .png --lazy + --title "Temperatures for " + DEF:cel=.rrd:exhaust:AVERAGE + LINE2:cel#00a000:"D. Celsius"> + +

+ + + +=head1 EXAMPLE 3 + +This example shows how to handle the case where the RRD, graphs and +cgi-bins are separate directories + + #!/.../bin/rrdcgi + + RRDCGI Demo + +

RRDCGI test Page

+ ' + --lazy --start -1d --end now + DEF:http_src=/.../rrds/test.rrd:http_src:AVERAGE + AREA:http_src#00ff00:http_src + > + + + +Note 1: Replace /.../ with the relevant directories + +Note 2: The SRC=/.../pngs should be paths from the view of the +webserver/browser + +=head1 AUTHOR + +Tobias Oetiker Etobi@oetiker.chE + + + + + diff --git a/program/doc/rrdcreate.pod b/program/doc/rrdcreate.pod new file mode 100644 index 00000000..b321de63 --- /dev/null +++ b/program/doc/rrdcreate.pod @@ -0,0 +1,598 @@ +=head1 NAME + +rrdcreate - Set up a new Round Robin Database + +=head1 SYNOPSIS + +B B I +S<[B<--start>|B<-b> I]> +S<[B<--step>|B<-s> I]> +S<[B<--no-overwrite>]> +S<[BIB<:>IB<:>I]> +S<[BIB<:>I]> + +=head1 DESCRIPTION + +The create function of RRDtool lets you set up new Round Robin +Database (B) files. The file is created at its final, full size +and filled with I<*UNKNOWN*> data. + +=head2 I + +The name of the B you want to create. B files should end +with the extension F<.rrd>. However, B will accept any +filename. + +=head2 B<--start>|B<-b> I (default: now - 10s) + +Specifies the time in seconds since 1970-01-01 UTC when the first +value should be added to the B. B will not accept +any data timed before or at the time specified. + +See also AT-STYLE TIME SPECIFICATION section in the +I documentation for other ways to specify time. + +=head2 B<--step>|B<-s> I (default: 300 seconds) + +Specifies the base interval in seconds with which data will be fed +into the B. + +=head2 B<--no-overwrite> + +Do not clobber an existing file of the same name. + +=head2 BIB<:>IB<:>I + +A single B can accept input from several data sources (B), +for example incoming and outgoing traffic on a specific communication +line. With the B configuration option you must define some basic +properties of each data source you want to store in the B. + +I is the name you will use to reference this particular data +source from an B. A I must be 1 to 19 characters long in +the characters [a-zA-Z0-9_]. + +I defines the Data Source Type. The remaining arguments of a +data source entry depend on the data source type. For GAUGE, COUNTER, +DERIVE, and ABSOLUTE the format for a data source entry is: + +BIB<:>IB<:>IB<:>IB<:>I + +For COMPUTE data sources, the format is: + +BIB<:>IB<:>I + +In order to decide which data source type to use, review the +definitions that follow. Also consult the section on "HOW TO MEASURE" +for further insight. + +=over + +=item B + +is for things like temperatures or number of people in a room or the +value of a RedHat share. + +=item B + +is for continuous incrementing counters like the ifInOctets counter in +a router. The B data source assumes that the counter never +decreases, except when a counter overflows. The update function takes +the overflow into account. The counter is stored as a per-second +rate. When the counter overflows, RRDtool checks if the overflow +happened at the 32bit or 64bit border and acts accordingly by adding +an appropriate value to the result. + +=item B + +will store the derivative of the line going from the last to the +current value of the data source. This can be useful for gauges, for +example, to measure the rate of people entering or leaving a +room. Internally, derive works exactly like COUNTER but without +overflow checks. So if your counter does not reset at 32 or 64 bit you +might want to use DERIVE and combine it with a MIN value of 0. + +B + +by Don Baarda Edon.baarda@baesystems.comE + +If you cannot tolerate ever mistaking the occasional counter reset for a +legitimate counter wrap, and would prefer "Unknowns" for all legitimate +counter wraps and resets, always use DERIVE with min=0. Otherwise, using +COUNTER with a suitable max will return correct values for all legitimate +counter wraps, mark some counter resets as "Unknown", but can mistake some +counter resets for a legitimate counter wrap. + +For a 5 minute step and 32-bit counter, the probability of mistaking a +counter reset for a legitimate wrap is arguably about 0.8% per 1Mbps of +maximum bandwidth. Note that this equates to 80% for 100Mbps interfaces, so +for high bandwidth interfaces and a 32bit counter, DERIVE with min=0 is +probably preferable. If you are using a 64bit counter, just about any max +setting will eliminate the possibility of mistaking a reset for a counter +wrap. + +=item B + +is for counters which get reset upon reading. This is used for fast counters +which tend to overflow. So instead of reading them normally you reset them +after every read to make sure you have a maximum time available before the +next overflow. Another usage is for things you count like number of messages +since the last update. + +=item B + +is for storing the result of a formula applied to other data sources +in the B. This data source is not supplied a value on update, but +rather its Primary Data Points (PDPs) are computed from the PDPs of +the data sources according to the rpn-expression that defines the +formula. Consolidation functions are then applied normally to the PDPs +of the COMPUTE data source (that is the rpn-expression is only applied +to generate PDPs). In database software, such data sets are referred +to as "virtual" or "computed" columns. + +=back + +I defines the maximum number of seconds that may pass +between two updates of this data source before the value of the +data source is assumed to be I<*UNKNOWN*>. + +I and I define the expected range values for data supplied by a +data source. If I and/or I any value outside the defined range +will be regarded as I<*UNKNOWN*>. If you do not know or care about min and +max, set them to U for unknown. Note that min and max always refer to the +processed values of the DS. For a traffic-B type DS this would be +the maximum and minimum data-rate expected from the device. + +I + +I defines the formula used to compute the PDPs of a +COMPUTE data source from other data sources in the same . It is +similar to defining a B argument for the graph command. Please +refer to that manual page for a list and description of RPN operations +supported. For COMPUTE data sources, the following RPN operations are +not supported: COUNT, PREV, TIME, and LTIME. In addition, in defining +the RPN expression, the COMPUTE data source may only refer to the +names of data source listed previously in the create command. This is +similar to the restriction that Bs must refer only to Bs +and Bs previously defined in the same graph command. + +=head2 BIB<:>I + +The purpose of an B is to store data in the round robin archives +(B). An archive consists of a number of data values or statistics for +each of the defined data-sources (B) and is defined with an B line. + +When data is entered into an B, it is first fit into time slots +of the length defined with the B<-s> option, thus becoming a I. + +The data is also processed with the consolidation function (I) of +the archive. There are several consolidation functions that +consolidate primary data points via an aggregate function: B, +B, B, B. + +=over + +=item AVERAGE + +the average of the data points is stored. + +=item MIN + +the smallest of the data points is stored. + +=item MAX + +the largest of the data points is stored. + +=item LAST + +the last data points is used. + +=back + +Note that data aggregation inevitably leads to loss of precision and +information. The trick is to pick the aggregate function such that the +I properties of your data is kept across the aggregation +process. + + +The format of B line for these +consolidation functions is: + +BIB<:>IB<:>IB<:>I + +I The xfiles factor defines what part of a consolidation interval may +be made up from I<*UNKNOWN*> data while the consolidated value is still +regarded as known. It is given as the ratio of allowed I<*UNKNOWN*> PDPs +to the number of PDPs in the interval. Thus, it ranges from 0 to 1 (exclusive). + + +I defines how many of these I are used to build +a I which then goes into the archive. + +I defines how many generations of data values are kept in an B. +Obviously, this has to be greater than zero. + +=head1 Aberrant Behavior Detection with Holt-Winters Forecasting + +In addition to the aggregate functions, there are a set of specialized +functions that enable B to provide data smoothing (via the +Holt-Winters forecasting algorithm), confidence bands, and the +flagging aberrant behavior in the data source time series: + +=over + +=item * + +BIB<:>IB<:>IB<:>IB<:>I[B<:>I] + +=item * + +BIB<:>IB<:>IB<:>IB<:>I[B<:>I] + +=item * + +BIB<:>IB<:>IB<:>I[B<:smoothing-window=>I] + +=item * + +BIB<:>IB<:>IB<:>I[B<:smoothing-window=>I] + +=item * + +BIB<:>IB<:>I + +=item * + +BIB<:>IB<:>IB<:>IB<:>I + +=back + +These B differ from the true consolidation functions in several ways. +First, each of the Bs is updated once for every primary data point. +Second, these B are interdependent. To generate real-time confidence +bounds, a matched set of SEASONAL, DEVSEASONAL, DEVPREDICT, and either +HWPREDICT or MHWPREDICT must exist. Generating smoothed values of the primary +data points requires a SEASONAL B and either an HWPREDICT or MHWPREDICT +B. Aberrant behavior detection requires FAILURES, DEVSEASONAL, SEASONAL, +and either HWPREDICT or MHWPREDICT. + +The predicted, or smoothed, values are stored in the HWPREDICT or MHWPREDICT +B. HWPREDICT and MHWPREDICT are actually two variations on the +Holt-Winters method. They are interchangeable. Both attempt to decompose data +into three components: a baseline, a trend, and a seasonal coefficient. +HWPREDICT adds its seasonal coefficient to the baseline to form a prediction, whereas +MHWPREDICT multiplies its seasonal coefficient by the baseline to form a +prediction. The difference is noticeable when the baseline changes +significantly in the course of a season; HWPREDICT will predict the seasonality +to stay constant as the baseline changes, but MHWPREDICT will predict the +seasonality to grow or shrink in proportion to the baseline. The proper choice +of method depends on the thing being modeled. For simplicity, the rest of this +discussion will refer to HWPREDICT, but MHWPREDICT may be substituted in its +place. + +The predicted deviations are stored in DEVPREDICT (think a standard deviation +which can be scaled to yield a confidence band). The FAILURES B stores +binary indicators. A 1 marks the indexed observation as failure; that is, the +number of confidence bounds violations in the preceding window of observations +met or exceeded a specified threshold. An example of using these B to graph +confidence bounds and failures appears in L. + +The SEASONAL and DEVSEASONAL B store the seasonal coefficients for the +Holt-Winters forecasting algorithm and the seasonal deviations, respectively. +There is one entry per observation time point in the seasonal cycle. For +example, if primary data points are generated every five minutes and the +seasonal cycle is 1 day, both SEASONAL and DEVSEASONAL will have 288 rows. + +In order to simplify the creation for the novice user, in addition to +supporting explicit creation of the HWPREDICT, SEASONAL, DEVPREDICT, +DEVSEASONAL, and FAILURES B, the B create command supports +implicit creation of the other four when HWPREDICT is specified alone and +the final argument I is omitted. + +I specifies the length of the B prior to wrap around. Remember +that there is a one-to-one correspondence between primary data points and +entries in these RRAs. For the HWPREDICT CF, I should be larger than +the I. If the DEVPREDICT B is implicitly created, the +default number of rows is the same as the HWPREDICT I argument. If the +FAILURES B is implicitly created, I will be set to the I argument of the HWPREDICT B. Of course, the B +I command is available if these defaults are not sufficient and the +creator wishes to avoid explicit creations of the other specialized function +B. + +I specifies the number of primary data points in a seasonal +cycle. If SEASONAL and DEVSEASONAL are implicitly created, this argument for +those B is set automatically to the value specified by HWPREDICT. If +they are explicitly created, the creator should verify that all three +I arguments agree. + +I is the adaption parameter of the intercept (or baseline) +coefficient in the Holt-Winters forecasting algorithm. See L for a +description of this algorithm. I must lie between 0 and 1. A value +closer to 1 means that more recent observations carry greater weight in +predicting the baseline component of the forecast. A value closer to 0 means +that past history carries greater weight in predicting the baseline +component. + +I is the adaption parameter of the slope (or linear trend) coefficient +in the Holt-Winters forecasting algorithm. I must lie between 0 and 1 +and plays the same role as I with respect to the predicted linear +trend. + +I is the adaption parameter of the seasonal coefficients in the +Holt-Winters forecasting algorithm (HWPREDICT) or the adaption parameter in +the exponential smoothing update of the seasonal deviations. It must lie +between 0 and 1. If the SEASONAL and DEVSEASONAL B are created +implicitly, they will both have the same value for I: the value +specified for the HWPREDICT I argument. Note that because there is +one seasonal coefficient (or deviation) for each time point during the +seasonal cycle, the adaptation rate is much slower than the baseline. Each +seasonal coefficient is only updated (or adapts) when the observed value +occurs at the offset in the seasonal cycle corresponding to that +coefficient. + +If SEASONAL and DEVSEASONAL B are created explicitly, I need not +be the same for both. Note that I can also be changed via the +B I command. + +I specifies the fraction of a season that should be +averaged around each point. By default, the value of I is +0.05, which means each value in SEASONAL and DEVSEASONAL will be occasionally +replaced by averaging it with its (I*0.05) nearest neighbors. +Setting I to zero will disable the running-average smoother +altogether. + +I provides the links between related B. If HWPREDICT is +specified alone and the other B are created implicitly, then +there is no need to worry about this argument. If B are created +explicitly, then carefully pay attention to this argument. For each +B which includes this argument, there is a dependency between +that B and another B. The I argument is the 1-based +index in the order of B creation (that is, the order they appear +in the I command). The dependent B for each B +requiring the I argument is listed here: + +=over + +=item * + +HWPREDICT I is the index of the SEASONAL B. + +=item * + +SEASONAL I is the index of the HWPREDICT B. + +=item * + +DEVPREDICT I is the index of the DEVSEASONAL B. + +=item * + +DEVSEASONAL I is the index of the HWPREDICT B. + +=item * + +FAILURES I is the index of the DEVSEASONAL B. + +=back + +I is the minimum number of violations (observed values outside +the confidence bounds) within a window that constitutes a failure. If the +FAILURES B is implicitly created, the default value is 7. + +I is the number of time points in the window. Specify an +integer greater than or equal to the threshold and less than or equal to 28. +The time interval this window represents depends on the interval between +primary data points. If the FAILURES B is implicitly created, the +default value is 9. + +=head1 The HEARTBEAT and the STEP + +Here is an explanation by Don Baarda on the inner workings of RRDtool. +It may help you to sort out why all this *UNKNOWN* data is popping +up in your databases: + +RRDtool gets fed samples/updates at arbitrary times. From these it builds Primary +Data Points (PDPs) on every "step" interval. The PDPs are +then accumulated into the RRAs. + +The "heartbeat" defines the maximum acceptable interval between +samples/updates. If the interval between samples is less than "heartbeat", +then an average rate is calculated and applied for that interval. If +the interval between samples is longer than "heartbeat", then that +entire interval is considered "unknown". Note that there are other +things that can make a sample interval "unknown", such as the rate +exceeding limits, or a sample that was explicitly marked as unknown. + +The known rates during a PDP's "step" interval are used to calculate +an average rate for that PDP. If the total "unknown" time accounts for +more than B the "step", the entire PDP is marked +as "unknown". This means that a mixture of known and "unknown" sample +times in a single PDP "step" may or may not add up to enough "known" +time to warrant a known PDP. + +The "heartbeat" can be short (unusual) or long (typical) relative to +the "step" interval between PDPs. A short "heartbeat" means you +require multiple samples per PDP, and if you don't get them mark the +PDP unknown. A long heartbeat can span multiple "steps", which means +it is acceptable to have multiple PDPs calculated from a single +sample. An extreme example of this might be a "step" of 5 minutes and a +"heartbeat" of one day, in which case a single sample every day will +result in all the PDPs for that entire day period being set to the +same average rate. I<-- Don Baarda Edon.baarda@baesystems.comE> + + time| + axis| + begin__|00| + |01| + u|02|----* sample1, restart "hb"-timer + u|03| / + u|04| / + u|05| / + u|06|/ "hbt" expired + u|07| + |08|----* sample2, restart "hb" + |09| / + |10| / + u|11|----* sample3, restart "hb" + u|12| / + u|13| / + step1_u|14| / + u|15|/ "swt" expired + u|16| + |17|----* sample4, restart "hb", create "pdp" for step1 = + |18| / = unknown due to 10 "u" labled secs > 0.5 * step + |19| / + |20| / + |21|----* sample5, restart "hb" + |22| / + |23| / + |24|----* sample6, restart "hb" + |25| / + |26| / + |27|----* sample7, restart "hb" + step2__|28| / + |22| / + |23|----* sample8, restart "hb", create "pdp" for step1, create "cdp" + |24| / + |25| / + +graphics by I. + + +=head1 HOW TO MEASURE + +Here are a few hints on how to measure: + +=over + + +=item Temperature + +Usually you have some type of meter you can read to get the temperature. +The temperature is not really connected with a time. The only connection is +that the temperature reading happened at a certain time. You can use the +B data source type for this. RRDtool will then record your reading +together with the time. + +=item Mail Messages + +Assume you have a method to count the number of messages transported by +your mail server in a certain amount of time, giving you data like '5 +messages in the last 65 seconds'. If you look at the count of 5 like an +B data type you can simply update the RRD with the number 5 and the +end time of your monitoring period. RRDtool will then record the number of +messages per second. If at some later stage you want to know the number of +messages transported in a day, you can get the average messages per second +from RRDtool for the day in question and multiply this number with the +number of seconds in a day. Because all math is run with Doubles, the +precision should be acceptable. + +=item It's always a Rate + +RRDtool stores rates in amount/second for COUNTER, DERIVE and ABSOLUTE +data. When you plot the data, you will get on the y axis +amount/second which you might be tempted to convert to an absolute +amount by multiplying by the delta-time between the points. RRDtool +plots continuous data, and as such is not appropriate for plotting +absolute amounts as for example "total bytes" sent and received in a +router. What you probably want is plot rates that you can scale to +bytes/hour, for example, or plot absolute amounts with another tool +that draws bar-plots, where the delta-time is clear on the plot for +each point (such that when you read the graph you see for example GB +on the y axis, days on the x axis and one bar for each day). + +=back + + +=head1 EXAMPLE + + rrdtool create temperature.rrd --step 300 \ + DS:temp:GAUGE:600:-273:5000 \ + RRA:AVERAGE:0.5:1:1200 \ + RRA:MIN:0.5:12:2400 \ + RRA:MAX:0.5:12:2400 \ + RRA:AVERAGE:0.5:12:2400 + +This sets up an B called F which accepts one +temperature value every 300 seconds. If no new data is supplied for +more than 600 seconds, the temperature becomes I<*UNKNOWN*>. The +minimum acceptable value is -273 and the maximum is 5'000. + +A few archive areas are also defined. The first stores the +temperatures supplied for 100 hours (1'200 * 300 seconds = 100 +hours). The second RRA stores the minimum temperature recorded over +every hour (12 * 300 seconds = 1 hour), for 100 days (2'400 hours). The +third and the fourth RRA's do the same for the maximum and +average temperature, respectively. + +=head1 EXAMPLE 2 + + rrdtool create monitor.rrd --step 300 \ + DS:ifOutOctets:COUNTER:1800:0:4294967295 \ + RRA:AVERAGE:0.5:1:2016 \ + RRA:HWPREDICT:1440:0.1:0.0035:288 + +This example is a monitor of a router interface. The first B tracks the +traffic flow in octets; the second B generates the specialized +functions B for aberrant behavior detection. Note that the I +argument of HWPREDICT is missing, so the other B will implicitly be +created with default parameter values. In this example, the forecasting +algorithm baseline adapts quickly; in fact the most recent one hour of +observations (each at 5 minute intervals) accounts for 75% of the baseline +prediction. The linear trend forecast adapts much more slowly. Observations +made during the last day (at 288 observations per day) account for only +65% of the predicted linear trend. Note: these computations rely on an +exponential smoothing formula described in the LISA 2000 paper. + +The seasonal cycle is one day (288 data points at 300 second intervals), and +the seasonal adaption parameter will be set to 0.1. The RRD file will store 5 +days (1'440 data points) of forecasts and deviation predictions before wrap +around. The file will store 1 day (a seasonal cycle) of 0-1 indicators in +the FAILURES B. + +The same RRD file and B are created with the following command, +which explicitly creates all specialized function B. + + rrdtool create monitor.rrd --step 300 \ + DS:ifOutOctets:COUNTER:1800:0:4294967295 \ + RRA:AVERAGE:0.5:1:2016 \ + RRA:HWPREDICT:1440:0.1:0.0035:288:3 \ + RRA:SEASONAL:288:0.1:2 \ + RRA:DEVPREDICT:1440:5 \ + RRA:DEVSEASONAL:288:0.1:2 \ + RRA:FAILURES:288:7:9:5 + +Of course, explicit creation need not replicate implicit create, a +number of arguments could be changed. + +=head1 EXAMPLE 3 + + rrdtool create proxy.rrd --step 300 \ + DS:Total:DERIVE:1800:0:U \ + DS:Duration:DERIVE:1800:0:U \ + DS:AvgReqDur:COMPUTE:Duration,Requests,0,EQ,1,Requests,IF,/ \ + RRA:AVERAGE:0.5:1:2016 + +This example is monitoring the average request duration during each 300 sec +interval for requests processed by a web proxy during the interval. +In this case, the proxy exposes two counters, the number of requests +processed since boot and the total cumulative duration of all processed +requests. Clearly these counters both have some rollover point, but using the +DERIVE data source also handles the reset that occurs when the web proxy is +stopped and restarted. + +In the B, the first data source stores the requests per second rate +during the interval. The second data source stores the total duration of all +requests processed during the interval divided by 300. The COMPUTE data source +divides each PDP of the AccumDuration by the corresponding PDP of +TotalRequests and stores the average request duration. The remainder of the +RPN expression handles the divide by zero case. + +=head1 AUTHOR + +Tobias Oetiker Etobi@oetiker.chE diff --git a/program/doc/rrddump.pod b/program/doc/rrddump.pod new file mode 100644 index 00000000..e8d802e5 --- /dev/null +++ b/program/doc/rrddump.pod @@ -0,0 +1,97 @@ +=head1 NAME + +rrddump - dump the contents of an RRD to XML format + +=head1 SYNOPSIS + +B B I [I] +S<[B<--header>|B<-h> {none,xsd,dtd}]> +S<[B<--no-header>]> +S<[B<--daemon> I
]> +S I> + +=head1 DESCRIPTION + +The B function writes the contents of an B in human +readable (?) XML format to a file or to stdout. This format can +be read by rrdrestore. Together they allow you to transfer your +files from one computer architecture to another as well to +manipulate the contents of an B file in a somewhat more +convenient manner. + +=over 8 + +=item I + +The name of the B you want to dump. + +=item I + +The (optional) filename that you want to write the XML output to. +If not specified, the XML will be printed to stdout. + +=item B<--header>|B<-h> {none,xsd,dtd} + +By default RRDtool will add a dtd header to the xml file. Here +you can customize this to and xsd header or no header at all. + + +=item B<--no-header> + +A shortcut for S<--header=none>. + +If you want to restore the dump with RRDtool 1.2 you should use the +S<--no-header> option since 1.2 can not deal with xml headers. + +=item 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 B to return +fresh data even if the daemon is configured to cache values for a long time. +For a list of accepted formats, see the B<-l> option in the L manual. + + rrdtool dump --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd + +=back + +=head1 EXAMPLES + +To transfer an RRD between architectures, follow these steps: + +=over 4 + +=item 1. + +On the same system where the RRD was created, use B B +to export the data to XML format. + +=item 2. + +Transfer the XML dump to the target system. + +=item 3. + +Run B B to create a new RRD from the XML dump. See +B for details. + +=back + +=head1 ENVIRONMENT VARIABLES + +The following environment variables may be used to change the behavior of +Cdump>: + +=over 4 + +=item B + +If this environment variable is set it will have the same effect as specifying +the C<--daemon> option on the command line. If both are present, the command +line argument takes precedence. + +=back + +=head1 AUTHOR + +Tobias Oetiker Etobi@oetiker.chE + diff --git a/program/doc/rrdfetch.pod b/program/doc/rrdfetch.pod new file mode 100644 index 00000000..0052aa65 --- /dev/null +++ b/program/doc/rrdfetch.pod @@ -0,0 +1,288 @@ +=head1 NAME + +rrdfetch - Fetch data from an RRD. + +=head1 SYNOPSIS + +B B I I +S<[B<--resolution>|B<-r> I]> +S<[B<--start>|B<-s> I]> +S<[B<--end>|B<-e> I]> +S<[B<--daemon> I
]> + +=head1 DESCRIPTION + +The B function is normally used internally by the graph +function to get data from Bs. B will analyze the B +and try to retrieve the data in the resolution requested. +The data fetched is printed to stdout. I<*UNKNOWN*> data is often +represented by the string "NaN" depending on your OS's printf +function. + +=over 8 + +=item I + +the name of the B you want to fetch the data from. + +=item I + +the consolidation function that is applied to the data you +want to fetch (AVERAGE,MIN,MAX,LAST) + +=item B<--resolution>|B<-r> I (default is the highest resolution) + +the interval you want the values to have (seconds per +value). B will try to match your request, but it will return +data even if no absolute match is possible. B See note below. + +=item B<--start>|B<-s> I (default end-1day) + +start of the time series. A time in seconds since epoch (1970-01-01) +is required. Negative numbers are relative to the current time. By default, +one day worth of data will be fetched. See also AT-STYLE TIME SPECIFICATION +section for a detailed explanation on ways to specify the start time. + +=item B<--end>|B<-e> I (default now) + +the end of the time series in seconds since epoch. See also AT-STYLE +TIME SPECIFICATION section for a detailed explanation of how to +specify the end time. + +=item 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 B to return +fresh data even if the daemon is configured to cache values for a long time. +For a list of accepted formats, see the B<-l> option in the L manual. + + rrdtool fetch --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd AVERAGE + +=back + +=head2 RESOLUTION INTERVAL + +In order to get RRDtool to fetch anything other than the finest resolution RRA +B the start and end time must be specified on boundaries that are +multiples of the desired resolution. Consider the following example: + + rrdtool create subdata.rrd -s 10 DS:ds0:GAUGE:300:0:U \ + RRA:AVERAGE:0.5:30:3600 \ + RRA:AVERAGE:0.5:90:1200 \ + RRA:AVERAGE:0.5:360:1200 \ + RRA:MAX:0.5:360:1200 \ + RRA:AVERAGE:0.5:8640:600 \ + RRA:MAX:0.5:8640:600 + +This RRD collects data every 10 seconds and stores its averages over 5 +minutes, 15 minutes, 1 hour, and 1 day, as well as the maxima for 1 hour +and 1 day. + +Consider now that you want to fetch the 15 minute average data for the +last hour. You might try + + rrdtool fetch subdata.rrd AVERAGE -r 900 -s -1h + +However, this will almost always result in a time series that is +B in the 15 minute RRA. Therefore, the highest resolution RRA, +i.e. 5 minute averages, will be chosen which in this case is not +what you want. + +Hence, make sure that + +=over 3 + +=item 1. + +both start and end time are a multiple of 900 + +=item 2. + +both start and end time are within the desired RRA + +=back + +So, if time now is called "t", do + + end time == int(t/900)*900, + start time == end time - 1hour, + resolution == 900. + +Using the bash shell, this could look be: + + TIME=$(date +%s) + RRDRES=900 + rrdtool fetch subdata.rrd AVERAGE -r $RRDRES \ + -e $(($TIME/$RRDRES*$RRDRES)) -s e-1h + +Or in Perl: + + perl -e '$ctime = time; $rrdres = 900; \ + system "rrdtool fetch subdata.rrd AVERAGE \ + -r $rrdres -e @{[int($ctime/$rrdres)*$rrdres]} -s e-1h"' + + +=head2 AT-STYLE TIME SPECIFICATION + +Apart from the traditional I, RRDtool does also +understand at-style time specification. The specification is called +"at-style" after the Unix command at(1) that has moderately complex +ways to specify time to run your job at a certain date and time. The +at-style specification consists of two parts: the B