├── LICENSE ├── MANIFEST ├── MANIFEST.in ├── README.rst ├── rrdtool-1.4.7 ├── ABOUT-NLS ├── CHANGES ├── CONTRIBUTORS ├── COPYING ├── COPYRIGHT ├── Makefile.am ├── Makefile.in ├── NEWS ├── README ├── THREADS ├── TODO ├── WIN32-BUILD-TIPS.txt ├── aclocal.m4 ├── autogen.sh ├── bindings │ ├── Makefile.am │ ├── Makefile.in │ ├── lua │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── README │ │ ├── compat-5.1r5 │ │ │ ├── compat-5.1.c │ │ │ ├── compat-5.1.h │ │ │ └── compat-5.1.lua │ │ ├── rrdlua.c │ │ └── test.lua.bottom │ ├── perl-piped │ │ ├── MANIFEST │ │ ├── Makefile.PL │ │ ├── README │ │ ├── RRDp.pm │ │ └── t │ │ │ └── base.t │ ├── perl-shared │ │ ├── MANIFEST │ │ ├── Makefile.PL │ │ ├── README │ │ ├── RRDs.pm │ │ ├── RRDs.xs │ │ ├── ntmake-build │ │ └── t │ │ │ └── base.t │ ├── python │ │ ├── ACKNOWLEDGEMENT │ │ ├── AUTHORS │ │ ├── COPYING │ │ ├── README │ │ ├── rrdtoolmodule.c │ │ └── setup.py │ ├── ruby │ │ ├── CHANGES │ │ ├── README │ │ ├── extconf.rb │ │ ├── main.c │ │ └── test.rb │ └── tcl │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── README │ │ ├── ifOctets.tcl.in │ │ └── tclrrd.c ├── compile ├── config.guess ├── config.rpath ├── config.sub ├── configure ├── configure.ac ├── depcomp ├── doc │ ├── Makefile.am │ ├── Makefile.in │ ├── RRDp.html │ ├── RRDs.html │ ├── bin_dec_hex.1 │ ├── bin_dec_hex.html │ ├── bin_dec_hex.pod │ ├── bin_dec_hex.txt │ ├── cdeftutorial.1 │ ├── cdeftutorial.html │ ├── cdeftutorial.pod │ ├── cdeftutorial.txt │ ├── librrd.3 │ ├── librrd.html │ ├── librrd.pod │ ├── librrd.txt │ ├── rpntutorial.1 │ ├── rpntutorial.html │ ├── rpntutorial.pod │ ├── rpntutorial.txt │ ├── rrd-beginners.1 │ ├── rrd-beginners.html │ ├── rrd-beginners.pod │ ├── rrd-beginners.txt │ ├── rrdbuild.1 │ ├── rrdbuild.html │ ├── rrdbuild.pod │ ├── rrdbuild.txt │ ├── rrdcached.1 │ ├── rrdcached.html │ ├── rrdcached.pod │ ├── rrdcached.txt │ ├── rrdcgi.1 │ ├── rrdcgi.html │ ├── rrdcgi.pod │ ├── rrdcgi.txt │ ├── rrdcreate.1 │ ├── rrdcreate.html │ ├── rrdcreate.pod │ ├── rrdcreate.txt │ ├── rrddump.1 │ ├── rrddump.html │ ├── rrddump.pod │ ├── rrddump.txt │ ├── rrdfetch.1 │ ├── rrdfetch.html │ ├── rrdfetch.pod │ ├── rrdfetch.txt │ ├── rrdfirst.1 │ ├── rrdfirst.html │ ├── rrdfirst.pod │ ├── rrdfirst.txt │ ├── rrdflushcached.1 │ ├── rrdflushcached.html │ ├── rrdflushcached.pod │ ├── rrdflushcached.txt │ ├── rrdgraph.1 │ ├── rrdgraph.html │ ├── rrdgraph.pod │ ├── rrdgraph.txt │ ├── rrdgraph_data.1 │ ├── rrdgraph_data.html │ ├── rrdgraph_data.pod │ ├── rrdgraph_data.txt │ ├── rrdgraph_examples.1 │ ├── rrdgraph_examples.html │ ├── rrdgraph_examples.pod │ ├── rrdgraph_examples.txt │ ├── rrdgraph_graph.1 │ ├── rrdgraph_graph.html │ ├── rrdgraph_graph.pod │ ├── rrdgraph_graph.txt │ ├── rrdgraph_libdbi.pod │ ├── rrdgraph_rpn.1 │ ├── rrdgraph_rpn.html │ ├── rrdgraph_rpn.pod │ ├── rrdgraph_rpn.txt │ ├── rrdinfo.1 │ ├── rrdinfo.html │ ├── rrdinfo.pod │ ├── rrdinfo.txt │ ├── rrdlast.1 │ ├── rrdlast.html │ ├── rrdlast.pod │ ├── rrdlast.txt │ ├── rrdlastupdate.1 │ ├── rrdlastupdate.html │ ├── rrdlastupdate.pod │ ├── rrdlastupdate.txt │ ├── rrdlua.pod │ ├── rrdresize.1 │ ├── rrdresize.html │ ├── rrdresize.pod │ ├── rrdresize.txt │ ├── rrdrestore.1 │ ├── rrdrestore.html │ ├── rrdrestore.pod │ ├── rrdrestore.txt │ ├── rrdthreads.1 │ ├── rrdthreads.html │ ├── rrdthreads.pod │ ├── rrdthreads.txt │ ├── rrdtool-dump.dtd │ ├── rrdtool-xport.dtd │ ├── rrdtool.1 │ ├── rrdtool.html │ ├── rrdtool.pod │ ├── rrdtool.txt │ ├── rrdtune.1 │ ├── rrdtune.html │ ├── rrdtune.pod │ ├── rrdtune.txt │ ├── rrdtutorial.1 │ ├── rrdtutorial.html │ ├── rrdtutorial.pod │ ├── rrdtutorial.txt │ ├── rrdupdate.1 │ ├── rrdupdate.html │ ├── rrdupdate.pod │ ├── rrdupdate.txt │ ├── rrdxport.1 │ ├── rrdxport.html │ ├── rrdxport.pod │ └── rrdxport.txt ├── etc │ ├── rrdcached-default │ └── rrdcached-init ├── examples │ ├── 4charts.pl.in │ ├── Makefile.am │ ├── Makefile.in │ ├── bigtops.pl.in │ ├── cgi-demo.cgi.in │ ├── minmax.pl.in │ ├── perftest.pl.in │ ├── piped-demo.pl.in │ ├── rrdcached │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── RRDCached.pm │ │ └── rrdcached-size.pl │ ├── shared-demo.pl.in │ └── stripes.pl.in ├── favicon.ico ├── install-sh ├── libtool ├── ltmain.sh ├── m4 │ ├── acinclude.m4 │ ├── gettext.m4 │ ├── iconv.m4 │ ├── intlmacosx.m4 │ ├── lib-ld.m4 │ ├── lib-link.m4 │ ├── lib-prefix.m4 │ ├── libtool.m4 │ ├── ltoptions.m4 │ ├── ltsugar.m4 │ ├── ltversion.m4 │ ├── lt~obsolete.m4 │ ├── nls.m4 │ ├── po.m4 │ └── progtest.m4 ├── missing ├── netware │ └── Makefile ├── po │ ├── ChangeLog │ ├── LINGUAS │ ├── Makefile.in.in │ ├── Makevars │ ├── POTFILES.in │ ├── Rules-quot │ ├── boldquot.sed │ ├── en@boldquot.header │ ├── en@quot.header │ ├── insert-header.sin │ ├── quot.sed │ ├── remove-potcdate.sin │ ├── rrdtool.pot │ └── stamp-po ├── rrd_config.h.in ├── rrdtool.spec ├── src │ ├── Makefile.am │ ├── Makefile.in │ ├── fnv.h │ ├── get_ver.awk │ ├── gettext.h │ ├── hash_32.c │ ├── librrd.pc.in │ ├── librrd.sym.in.in │ ├── plbasename.c │ ├── plbasename.h │ ├── pngsize.c │ ├── rrd.h │ ├── rrd_cgi.c │ ├── rrd_client.c │ ├── rrd_client.h │ ├── rrd_config_bottom.h │ ├── rrd_create.c │ ├── rrd_daemon.c │ ├── rrd_diff.c │ ├── rrd_dump.c │ ├── rrd_error.c │ ├── rrd_fetch.c │ ├── rrd_fetch_libdbi.c │ ├── rrd_first.c │ ├── rrd_flushcached.c │ ├── rrd_format.c │ ├── rrd_format.h │ ├── rrd_getopt.c │ ├── rrd_getopt.h │ ├── rrd_getopt1.c │ ├── rrd_gfx.c │ ├── rrd_graph.c │ ├── rrd_graph.h │ ├── rrd_graph_helper.c │ ├── rrd_hw.c │ ├── rrd_hw.h │ ├── rrd_hw_math.c │ ├── rrd_hw_math.h │ ├── rrd_hw_update.c │ ├── rrd_hw_update.h │ ├── rrd_i18n.h │ ├── rrd_info.c │ ├── rrd_is_thread_safe.h │ ├── rrd_last.c │ ├── rrd_lastupdate.c │ ├── rrd_nan_inf.c │ ├── rrd_not_thread_safe.c │ ├── rrd_open.c │ ├── rrd_parsetime.c │ ├── rrd_parsetime.h │ ├── rrd_resize.c │ ├── rrd_restore.c │ ├── rrd_rpncalc.c │ ├── rrd_rpncalc.h │ ├── rrd_thread_safe.c │ ├── rrd_thread_safe_nt.c │ ├── rrd_tool.c │ ├── rrd_tool.h │ ├── rrd_tune.c │ ├── rrd_update.c │ ├── rrd_utils.c │ ├── rrd_version.c │ ├── rrd_xport.c │ ├── rrd_xport.h │ ├── rrdupdate.c │ ├── strftime.c │ ├── strftime.h │ ├── unused.h │ └── win32comp.c └── win32 │ ├── Makefile │ ├── README │ ├── config.h │ ├── rrd.sln │ ├── rrdlib.vcproj │ ├── rrdtool.sln │ ├── rrdtool.vcproj │ ├── rrdupdate.sln │ └── rrdupdate.vcproj └── setup.py /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include LICENSE MANIFEST.in MANIFEST README.rst 2 | recursive-include rrdtool-1.4.7 * 3 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | python-rrdtool package 2 | ====================== 3 | 4 | This is a working Python Package of RRDtool binding to Python. 5 | It delivers the same API as original binding (actually, it IS original 6 | binding, but installable via pip.) 7 | 8 | Useful links: 9 | 10 | - RRDTool webpage: http://oss.oetiker.ch/rrdtool/ 11 | - RRDTool Python module: http://oss.oetiker.ch/rrdtool/prog/rrdpython.en.html 12 | 13 | Installation 14 | ------------ 15 | 16 | A few development (header) files are required to build ``python-rrdtool``: for 17 | Python, libcairo2, libpango, libxml2, libglib2 and librrd. In Ubuntu run: 18 | ``sudo apt-get install libcairo2-dev libpango1.0-dev libglib2.0-dev libxml2-dev librrd-dev`` 19 | 20 | In virtualenv: ``pip install python-rrdtool`` 21 | 22 | From archive: ``pip install python-rrdtool-1.4.7.tar.gz`` 23 | 24 | From sources: ``python setup.py install`` 25 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/CHANGES: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pbanaszkiewicz/python-rrdtool/fc39e4d06bd279fb1780a240a1f18989ba57e9e0/rrdtool-1.4.7/CHANGES -------------------------------------------------------------------------------- /rrdtool-1.4.7/CONTRIBUTORS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pbanaszkiewicz/python-rrdtool/fc39e4d06bd279fb1780a240a1f18989ba57e9e0/rrdtool-1.4.7/CONTRIBUTORS -------------------------------------------------------------------------------- /rrdtool-1.4.7/COPYRIGHT: -------------------------------------------------------------------------------- 1 | $Id: COPYRIGHT 2080 2010-05-11 14:55:18Z oetiker $ 2 | RRDTOOL - Round Robin Database Tool 3 | A tool for fast logging of numerical data graphical display 4 | of this data. 5 | 6 | Copyright (c) 1998-2009 Tobias Oetiker 7 | All rights reserved. 8 | 9 | GNU GPL License 10 | =============== 11 | 12 | This program is free software; you can redistribute it and/or modify it 13 | under the terms of the GNU General Public License as published by the Free 14 | Software Foundation; either version 2 of the License, or (at your option) 15 | any later version. 16 | 17 | This program is distributed in the hope that it will be useful, but WITHOUT 18 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 19 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 20 | more details. 21 | 22 | You should have received a copy of the GNU General Public License along 23 | with this program; if not, write to the Free Software Foundation, Inc., 24 | 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 25 | 26 | FLOSS License Exception 27 | ======================= 28 | (Adapted from http://www.mysql.com/company/legal/licensing/foss-exception.html) 29 | 30 | I want specified Free/Libre and Open Source Software ("FLOSS") 31 | applications to be able to use specified GPL-licensed RRDtool 32 | libraries (the "Program") despite the fact that not all FLOSS licenses are 33 | compatible with version 2 of the GNU General Public License (the "GPL"). 34 | 35 | As a special exception to the terms and conditions of version 2.0 of the GPL: 36 | 37 | You are free to distribute a Derivative Work that is formed entirely from 38 | the Program and one or more works (each, a "FLOSS Work") licensed under one 39 | or more of the licenses listed below, as long as: 40 | 41 | 1. You obey the GPL in all respects for the Program and the Derivative 42 | Work, except for identifiable sections of the Derivative Work which are 43 | not derived from the Program, and which can reasonably be considered 44 | independent and separate works in themselves, 45 | 46 | 2. all identifiable sections of the Derivative Work which are not derived 47 | from the Program, and which can reasonably be considered independent and 48 | separate works in themselves, 49 | 50 | 1. are distributed subject to one of the FLOSS licenses listed 51 | below, and 52 | 53 | 2. the object code or executable form of those sections are 54 | accompanied by the complete corresponding machine-readable source 55 | code for those sections on the same medium and under the same FLOSS 56 | license as the corresponding object code or executable forms of 57 | those sections, and 58 | 59 | 3. any works which are aggregated with the Program or with a Derivative 60 | Work on a volume of a storage or distribution medium in accordance with 61 | the GPL, can reasonably be considered independent and separate works in 62 | themselves which are not derivatives of either the Program, a Derivative 63 | Work or a FLOSS Work. 64 | 65 | If the above conditions are not met, then the Program may only be copied, 66 | modified, distributed or used under the terms and conditions of the GPL. 67 | 68 | FLOSS License List 69 | ================== 70 | License name Version(s)/Copyright Date 71 | Academic Free License 2.0 72 | Apache Software License 1.0/1.1/2.0 73 | Apple Public Source License 2.0 74 | Artistic license From Perl 5.8.0 75 | BSD license "July 22 1999" 76 | Common Public License 1.0 77 | GNU Library or "Lesser" General Public License (LGPL) 2.0/2.1 78 | IBM Public License, Version 1.0 79 | Jabber Open Source License 1.0 80 | MIT License (As listed in file MIT-License.txt) - 81 | Mozilla Public License (MPL) 1.0/1.1 82 | Open Software License 2.0 83 | OpenSSL license (with original SSLeay license) "2003" ("1998") 84 | PHP License 3.01 85 | Python license (CNRI Python License) - 86 | Python Software Foundation License 2.1.1 87 | Sleepycat License "1999" 88 | W3C License "2001" 89 | X11 License "2001" 90 | Zlib/libpng License - 91 | Zope Public License 2.0/2.1 92 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/Makefile.am: -------------------------------------------------------------------------------- 1 | # $Id: Makefile.am 2239 2011-12-16 07:48:48Z oetiker $ 2 | 3 | ## Process this file with automake to produce Makefile.in 4 | RSYNC = rsync --rsh=ssh 5 | 6 | # build the following subdirectories 7 | 8 | SUBDIRS = po src examples doc bindings 9 | 10 | # the following files are not mentioned in any other Makefile 11 | EXTRA_DIST = COPYRIGHT CHANGES WIN32-BUILD-TIPS.txt TODO CONTRIBUTORS THREADS \ 12 | rrdtool.spec favicon.ico autogen.sh \ 13 | libtool \ 14 | netware/Makefile \ 15 | etc/rrdcached-default etc/rrdcached-init \ 16 | win32/Makefile win32/config.h win32/rrdlib.vcproj win32/rrdtool.vcproj win32/rrdupdate.vcproj \ 17 | win32/README win32/rrd.sln win32/rrdtool.sln win32/rrdupdate.sln 18 | 19 | 20 | CLEANFILES = config.cache 21 | 22 | # use relaxed rules when building dists 23 | AUTOMAKE_OPTIONS= foreign 24 | 25 | # where we keep local rules for automake 26 | ACLOCAL_AMFLAGS=-I m4 27 | ACLOCAL_M4= $(top_srcdir)/aclocal.m4 28 | #AUTOHEADER = @AUTOHEADER@ --localdir=$(top_srcdir)/config 29 | #AUTOCONF = @AUTOCONF@ --localdir=$(top_srcdir)/config 30 | 31 | # $(RSYNC) CHANGES archive/$(PACKAGE)-$(VERSION).tar.gz tobi@ipn.caida.org:/ipn/web/Tools/RRDtool/pub/ 32 | 33 | site-perl-inst: site-perl-install 34 | 35 | site-perl-install: all bindings/perl-piped/Makefile bindings/perl-shared/Makefile 36 | cd bindings/perl-piped && $(MAKE) install 37 | cd bindings/perl-shared && $(MAKE) install 38 | 39 | site-tcl-install: all 40 | cd bindings/tcl && $(MAKE) tcl-install 41 | 42 | site-python-install: all 43 | cd bindings/python && $(PYTHON) setup.py install $(if $(DESTDIR),--root=$(DESTDIR)) 44 | 45 | # 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"}' 46 | indent: 47 | find ./ -name "*.[ch]" | xargs indent 48 | 49 | ##END## 50 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/NEWS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pbanaszkiewicz/python-rrdtool/fc39e4d06bd279fb1780a240a1f18989ba57e9e0/rrdtool-1.4.7/NEWS -------------------------------------------------------------------------------- /rrdtool-1.4.7/README: -------------------------------------------------------------------------------- 1 | Round Robin Database Tools 2 | ========================== 3 | $Id: README 1844 2009-06-07 11:35:52Z oetiker $ 4 | 5 | It is pretty easy to gather status information from all sorts of things, 6 | ranging from the temperature in your office to the number of octets which 7 | have passed through the FDDI interface of your router. But it is not so 8 | trivial to store this data in a efficient and systematic manner. This is 9 | where RRDtool kicks in. It lets you log and analyze the data you gather from 10 | all kinds of data-sources (DS). The data analysis part of RRDtool is based 11 | on the ability to quickly generate graphical representations of the data 12 | values collected over a definable time period. 13 | 14 | 15 | To compile: 16 | ----------- 17 | 18 | check out the instructions in doc/rrdbuild.txt 19 | 20 | Getting Started: 21 | ---------------- 22 | 23 | Either after compiling or after installing you can try the example 24 | RRDtool applications in the examples directory. 25 | 26 | To learn: 27 | --------- 28 | 29 | Read the documentation in the doc directory. Start of with 30 | RRDtool. All documents are available as html and as ASCII text. 31 | 32 | If you are looking for a more slow paced introduction, make sure to read 33 | Alex van den Bogaerdt's rrdtutorial which is also available from the doc 34 | directory. Also read his cdeftutorial and Steve Rader's rpntutorial. 35 | 36 | If you want to know about the format of the log files check 37 | src/rrd_format.h there are a lot of comments in there ... 38 | 39 | How to make Tobi happy: 40 | ----------------------- 41 | 42 | If you want to show your appreciation for RRDtool you could make me happy 43 | by going to http://tobi.oetiker.ch/wish and ordering a CD from 44 | my CD wish list ... 45 | 46 | 47 | How to keep in touch: 48 | --------------------- 49 | 50 | There are 3 Mailing lists for RRDtool: 51 | 52 | rrd-announce LOW volume RRDtool Announcements List (Only Stable Releases) 53 | rrd-users For discussion amongst people who use RRDtool in their applications 54 | rrd-developers For people who actually HACK RRDtool code 55 | 56 | To subscribe to send a message with the subject 'subscribe' 57 | to -request@lists.oetiker.ch 58 | 59 | Note, that postings to rrd-announce will always be cross-posted 60 | to rrd-users and rrd-developers as well. 61 | 62 | To Contribute: 63 | -------------- 64 | 65 | Contributed feature and bug patches are most welcome. But please 66 | send complete patches. A complete patch patches the CODE as well 67 | as the CHANGES, CONTRIBUTORS and the POD files. 68 | 69 | Use GNU diff --unified --recursive olddir newdir to build your patches. 70 | 71 | The latest Version: 72 | ------------------- 73 | Is available from http://oss.oetiker.ch/rrdtool/ 74 | 75 | 76 | Tobias Oetiker 77 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/THREADS: -------------------------------------------------------------------------------- 1 | In order to use the librrd in multi-threaded programs you must: 2 | 3 | * Link with librrd_th instead of with librrd 4 | * Use the *_r function instead or the *-functions 5 | * Never use non *_r functions unless it is explicitly documented that the 6 | function is tread-safe 7 | 8 | Every thread SHOULD call rrd_get_context() before the first call to 9 | any librrd function in order to set up thread specific data. This is 10 | not strictly required, but it is the only way to test if memory 11 | allocation can be done by this function. Otherwise the program may die 12 | with a SIGSEGV in a low-memory situation. 13 | 14 | 15 | IMPORTANT NOTE FOR RRD CONTRIBUTORS: 16 | 17 | Some precautions must be followed when developing rrd from now on: 18 | 19 | * Only use thread-safe functions in library code. Many often used libc 20 | functions aren't thread-safe. Take care if you want to use any of 21 | the following functions: 22 | 23 | + direct strerror calls must be avoided: use rrd_strerror instead, 24 | it provides a per-thread error message 25 | + the getpw*, getgr*, gethost* function families (and some more get* 26 | functions): use the *_r variants 27 | + Time functions: asctime, ctime, gmtime, localtime: use *_r variants 28 | + strtok: use strtok_r 29 | + tmpnam: use tmpnam_r 30 | + many other (lookup documentation) 31 | 32 | As an aide(?) a header file named "rrd_is_thread_safe.h" is provided 33 | that works with the GNU C-preprocessor to "poison" some of the most 34 | common non-thread-safe functions using the "#pragma GCC poison" 35 | directive. Just include this header in source files you want to keep 36 | thread-safe. 37 | 38 | * Do not introduce global variables! 39 | 40 | If you really, really have to use a global variable you may add a 41 | new field to the rrd_context structure and modify rrd_error.c, 42 | rrd_thread_safe.c and rrd_non_thread_safe.c 43 | 44 | * Do not use "getopt" or "getopt_long" in *_r (directly or indirectly) 45 | 46 | getopt uses global variables and behaves badly in a multithreaded 47 | application when called concurrently. Instead provide a *_r function 48 | taking all options as function parameters. You may provide argc and 49 | **argv arguments for variable length argument lists. See 50 | rrd_update_r as an example. 51 | 52 | * Do not use the parsetime function! 53 | 54 | It uses lots of global vars. You may use it in functions not 55 | designed to be thread-safe like functions wrapping the _r version of some 56 | operation (eg. rrd_create, but not in rrd_create_r) 57 | 58 | WIN32 Platform Note (added 04/01/03): 59 | 60 | Both rrdtool.vcproj (MSVC++ 7.0) and rrd.dsw (MSVC++ 6.0) are configured to compile with rrd_thread_safe_nt.c. 61 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/TODO: -------------------------------------------------------------------------------- 1 | Random Feature Ideas for RRDtool 2 | -------------------------------- 3 | $Id: TODO 1842 2009-06-07 11:34:22Z oetiker $ 4 | 5 | make it possible to define order of legend items independant of their order 6 | on the commandline ... 7 | 8 | architecture independant storage format. 9 | 10 | micro second precision 11 | 12 | 2036 stable time 13 | 14 | add configurable counter wrap 15 | 16 | align data points not to GMT but some free offset 17 | 18 | allow starting through symlinks called rrdcreate rrdtune and the like 19 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # On MAC OS X, GNU libtoolize is named 'glibtoolize': 4 | if [ `(uname -s) 2>/dev/null` == 'Darwin' ] 5 | then 6 | glibtoolize 7 | else 8 | libtoolize 9 | fi 10 | 11 | autoreconf --force --install --verbose -I m4 12 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/bindings/Makefile.am: -------------------------------------------------------------------------------- 1 | .PHONY: python ruby 2 | 3 | if BUILD_TCL 4 | SUB_tcl = tcl 5 | endif 6 | if BUILD_LUA 7 | SUB_lua = lua 8 | endif 9 | 10 | SUBDIRS = $(SUB_tcl) $(SUB_lua) 11 | 12 | # the following files are not mentioned in any other Makefile 13 | EXTRA_DIST = perl-piped/MANIFEST perl-piped/README perl-piped/Makefile.PL perl-piped/RRDp.pm perl-piped/t/base.t \ 14 | 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 \ 15 | ruby/CHANGES ruby/README ruby/extconf.rb ruby/main.c ruby/test.rb \ 16 | python/ACKNOWLEDGEMENT python/AUTHORS python/COPYING python/README python/rrdtoolmodule.c python/setup.py 17 | 18 | 19 | # add the following to the all target 20 | all-local: @COMP_PERL@ @COMP_RUBY@ @COMP_PYTHON@ 21 | 22 | install-data-local: 23 | $(AM_V_GEN)test -f perl-piped/Makefile && cd perl-piped && $(MAKE) install || true 24 | $(AM_V_GEN)test -f perl-shared/Makefile && cd perl-shared && $(MAKE) install || true 25 | $(AM_V_GEN)test -f ruby/Makefile && cd ruby && $(MAKE) EPREFIX=$(DESTDIR)$(exec_prefix) $(RUBY_MAKE_OPTIONS) install || true 26 | $(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 27 | 28 | # rules for building the ruby module 29 | # RUBYARCHDIR= is to work around in a makefile quirk not sure 30 | # it is is the right thing todo, but it makes rrdtool build on freebsd as well 31 | ruby: Makefile 32 | cd ruby && $(RUBY) extconf.rb && $(MAKE) EPREFIX=$(exec_prefix) $(RUBY_MAKE_OPTIONS) RUBYARCHDIR= 33 | 34 | # rules for building the pyton module 35 | python: Makefile 36 | cd python && env BUILDLIBDIR=../../src/.libs $(PYTHON) setup.py build_ext --rpath=$(libdir) && env LIBDIR=../../src/.libs $(PYTHON) setup.py build 37 | 38 | # rules for building the perl module 39 | perl_piped: perl-piped/Makefile 40 | cd perl-piped && $(MAKE) 41 | 42 | perl-piped/Makefile: perl-piped/Makefile.PL 43 | cd perl-piped && $(PERL) Makefile.PL $(PERL_MAKE_OPTIONS) 44 | 45 | perl_shared: perl-shared/Makefile 46 | cd perl-shared && $(MAKE) 47 | 48 | perl-shared/Makefile: perl-shared/Makefile.PL Makefile 49 | cd perl-shared && $(PERL) Makefile.PL $(PERLFLAGS) $(PERL_MAKE_OPTIONS) RPATH=$(libdir) 50 | # LIBS="$(LDFLAGS) $(LIBS)" $(PERLFLAGS) $(PERL_MAKE_OPTIONS) 51 | 52 | clean-local: 53 | test -f perl-piped/Makefile && cd perl-piped && $(MAKE) clean || true 54 | test -f perl-piped/Makefile && rm perl-piped/Makefile || true 55 | test -f perl-shared/Makefile && cd perl-shared && $(MAKE) clean || true 56 | test -f perl-shared/Makefile && rm -f perl-shared/Makefile || true 57 | test -f ruby/Makefile && cd ruby && $(MAKE) clean && rm Makefile || true 58 | test -d python/build && cd python && rm -rf build || true 59 | ##END## 60 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/bindings/lua/Makefile.am: -------------------------------------------------------------------------------- 1 | # These files are not mentioned in any other Makefile 2 | # compat-5.1.lua is only necessary for Lua 5.0 in distros where 3 | # it's not already installed. 4 | EXTRA_DIST = README test.lua.bottom compat-5.1r5/compat-5.1.lua 5 | 6 | LIB_VERSION_INFO=0:0:0 7 | 8 | LUA = @LUA@ 9 | LUA_INSTALL_CMOD = @LUA_INSTALL_CMOD@ 10 | LUA_INSTALL_LMOD = @LUA_INSTALL_LMOD@ 11 | LUA_DEFINES = @LUA_DEFINES@ 12 | LUA_CFLAGS = @LUA_CFLAGS@ 13 | LUA_LFLAGS = @LUA_LFLAGS@ 14 | 15 | CLEANFILES = rrd.o rrd.so test.lua test.rrd test.png 16 | 17 | lualibdir=$(LUA_INSTALL_CMOD) 18 | lualib_LTLIBRARIES = rrd.la 19 | if LUA_NEED_OUR_COMPAT51 20 | rrd_la_SOURCES = rrdlua.c compat-5.1r5/compat-5.1.c compat-5.1r5/compat-5.1.h 21 | compatdir = $(LUA_INSTALL_LMOD) 22 | compat_DATA = compat-5.1r5/compat-5.1.lua 23 | else 24 | rrd_la_SOURCES = rrdlua.c 25 | endif 26 | rrd_la_LIBADD = -lrrd -lm 27 | rrd_la_LDFLAGS = -module -version-info $(LIB_VERSION_INFO) $(LUA_LFLAGS) -L$(top_builddir)/src/.libs 28 | rrd_la_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir) $(LUA_CFLAGS) $(LUA_DEFINES) -DLIB_VERSION=\"$(LIB_VERSION)\" 29 | 30 | .PHONY: test.lua 31 | 32 | test.lua: test.lua.bottom 33 | @echo "-- Created by Makefile." > test.lua 34 | @echo "-- Test script adapted from the one in the Ruby binding." > test.lua 35 | @echo >> test.lua 36 | if LUA50 37 | @echo "--- compat-5.1.lua is only required for Lua 5.0 ----------" >> test.lua 38 | if LUA_NEED_OUR_COMPAT51 39 | if !LUA_SITE_LINSTALL 40 | @echo "original_LUA_PATH = LUA_PATH" >> test.lua 41 | @echo "-- try only compat-5.1.lua installed with RRDtool" >> test.lua 42 | @echo "LUA_PATH = '$(LUA_INSTALL_LMOD)/?.lua'" >> test.lua 43 | endif 44 | endif 45 | @echo "local r = pcall(require, 'compat-5.1')" >> test.lua 46 | @echo "if not r then" >> test.lua 47 | @echo " print('** compat-5.1.lua not found')" >> test.lua 48 | @echo " os.exit(1)" >> test.lua 49 | @echo "end" >> test.lua 50 | if LUA_NEED_OUR_COMPAT51 51 | if !LUA_SITE_LINSTALL 52 | @echo "LUA_PATH = original_LUA_PATH" >> test.lua 53 | @echo "original_LUA_PATH = nil" >> test.lua 54 | endif 55 | endif 56 | @echo "----------------------------------------------------------" >> test.lua 57 | @echo >> test.lua 58 | endif 59 | if !LUA_SITE_CINSTALL 60 | @echo "package.cpath = '$(LUA_INSTALL_CMOD)/?.so;' .. package.cpath" >> test.lua 61 | endif 62 | @cat test.lua.bottom >> test.lua 63 | 64 | test: test.lua 65 | $(LUA) test.lua 66 | 67 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/bindings/lua/README: -------------------------------------------------------------------------------- 1 | RRDLua is a Lua module for RRD functions. 2 | 3 | - Configuration 4 | 5 | From the top dir of RRDtool package, run "./configure", or 6 | "./configure --enable-lua-site-install" if you prefer to install in 7 | Lua's search path. 8 | 9 | You should have lua 5.0, or superior, and respective lua-dev packages 10 | installed before executing configure. 11 | 12 | - Compilation and installation 13 | 14 | Run 'make' and 'sudo make install'. If you don't enable lua-site-install, 15 | the Lua modules will be installed together with RRDtool, under the subdir 16 | lib/lua/. 17 | 18 | - Testing 19 | 20 | Install RRDtool first, as above. Then, enter the bindings/lua dir, run 21 | 'make test' and use your preferred viewer to display the just created 22 | 'test.png'. If you can read "Enjoy Lua RRDtool module!" on the picture, 23 | everything went fine. 24 | 25 | - Using with Lua 5.1 26 | 27 | Start your programs with: 28 | 29 | ------..----------------------------------------------------------- 30 | package.cpath = ' 'RRDp', 7 | 'VERSION' => '0.99.0', # finds $VERSION 8 | 'linkext' => {LINKTYPE => ''}, 9 | 'dist' => {COMPRESS=>'gzip', SUFFIX=>'gz'}, 10 | ); 11 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/bindings/perl-piped/README: -------------------------------------------------------------------------------- 1 | This is a Perl module for using RRDtool process via a set of pipes. 2 | 3 | perl Makefile.PL 4 | make test 5 | make install 6 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/bindings/perl-piped/t/base.t: -------------------------------------------------------------------------------- 1 | #! /usr/bin/perl 2 | 3 | # this exercises just the perl module .. not RRDtool as such ... 4 | 5 | BEGIN { $| = 1; print "1..5\n"; } 6 | END { 7 | print "not ok 1\n" unless $loaded; 8 | unlink "demo.rrd"; 9 | } 10 | 11 | sub ok 12 | { 13 | $ok_count++; 14 | my($what, $result) = @_ ; 15 | print "not " unless $result; 16 | print "ok $ok_count $what\n"; 17 | } 18 | 19 | use RRDp; 20 | 21 | $loaded = 1; 22 | $ok_count = 1; 23 | 24 | print "ok 1 module load\n"; 25 | 26 | ok("RRDp::start", RRDp::start "../../src/rrdtool" > 0); 27 | 28 | $now=time(); 29 | RRDp::cmd qw(create demo.rrd --start ), $now, qw(--step 100 ), 30 | qw( DS:in:GAUGE:100:U:U RRA:AVERAGE:0.5:1:10 ); 31 | 32 | $answer = RRDp::read; 33 | ok("RRDp::cmd", -s "demo.rrd" ); 34 | 35 | RRDp::cmd qw(last demo.rrd); 36 | $answer = RRDp::read; 37 | 38 | ok("RRDp::read", $$answer =~ /$now/); 39 | 40 | $status = RRDp::end; 41 | 42 | ok("RRDp::end", $status == 0); 43 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/bindings/perl-shared/MANIFEST: -------------------------------------------------------------------------------- 1 | MANIFEST 2 | README 3 | Makefile.PL 4 | RRDs.pm 5 | RRDs.xs 6 | t/base.t 7 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/bindings/perl-shared/Makefile.PL: -------------------------------------------------------------------------------- 1 | use ExtUtils::MakeMaker; 2 | use Config; 3 | # See lib/ExtUtils/MakeMaker.pm for details of how to influence 4 | # the contents of the Makefile that is written. 5 | 6 | if (($Config{'osname'} eq 'MSWin32' && $ENV{'OSTYPE'} eq '')) { 7 | WriteMakefile( 8 | 'NAME' => 'RRDs', 9 | 'VERSION_FROM' => 'RRDs.pm', 10 | 'DEFINE' => "-DPERLPATCHLEVEL=$Config{PATCHLEVEL} -D_CRT_SECURE_NO_WARNINGS -DWIN32", 11 | 'INC' => '-I../../src/ "-IC:/Perl/lib/CORE" -I"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include" -I"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include"', 12 | 'LDDLFLAGS' => '-dll -nologo -opt:ref,icf -ltcg -libpath:"C:\Perl\lib\CORE" -machine:X86', 13 | 'LDFLAGS' => '-nologo -opt:ref,icf -ltcg -libpath:"C:\Perl\lib\CORE" -machine:X86', 14 | 'OPTIMIZE' => '-O2 -MD', 15 | 'LIBS' => '"..\..\win32\Release\rrdlib.lib" "..\..\win32\Release" "C:\Perl\lib\CORE\perl514.lib" -L../../contrib/lib -L"C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib" -L"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\lib" -L"C:\Perl\lib\CORE"', 16 | 'realclean' => {FILES => 't/demo?.rrd t/demo?.png' }, 17 | ($] ge '5.005') ? ( 18 | 'AUTHOR' => 'Tobias Oetiker (tobi@oetiker.ch)', 19 | 'ABSTRACT' => 'Round Robin Database Tool', 20 | ) : () 21 | ); 22 | }else{ 23 | # if the last argument when calling Makefile.PL is RPATH=/... and ... is the 24 | # path to librrd.so then the Makefile will be written such that RRDs.so knows 25 | # where to find librrd.so later on ... 26 | my $R=""; 27 | if ($ARGV[-1] =~ /RPATH=(\S+)/){ 28 | pop @ARGV; 29 | my $rp = $1; 30 | for ($^O){ 31 | /linux/ && do{ $R = "-Wl,--rpath -Wl,$rp"}; 32 | /hpux/ && do{ $R = "+b$rp"}; 33 | /solaris/ && do{ $R = "-R$rp"}; 34 | /bsd/ && do{ $R = "-R$rp"}; 35 | /aix/ && do{ $R = "-blibpath:$rp"}; 36 | } 37 | } 38 | 39 | # darwin works without this because librrd contains its 40 | # install_name which will includes the final location of the 41 | # library after it is installed. This install_name gets transfered 42 | # to the perl shared object. 43 | my $librrd; 44 | if ($^O eq 'darwin'){ 45 | $librrd = '-lrrd'; 46 | } else { 47 | $librrd = "-L../../src/.libs/ $R -lrrd"; 48 | } 49 | 50 | WriteMakefile( 51 | 'NAME' => 'RRDs', 52 | 'VERSION_FROM' => 'RRDs.pm', # finds $VERSION 53 | 'DEFINE' => "-DPERLPATCHLEVEL=$Config{PATCHLEVEL}", 54 | 'INC' => '-I../../src', 55 | # Perl will figure out which one is valid 56 | #'dynamic_lib' => {'OTHERLDFLAGS' => "$librrd -lm"}, 57 | 'depend' => {'RRDs.c' => "../../src/librrd.la"}, 58 | 'LDFROM' => '$(OBJECT) '.$librrd, 59 | 'realclean' => {FILES => 't/demo?.rrd t/demo?.png' }, 60 | ($^O eq 'darwin') ? ( 'LDDLFLAGS' => "-L../../src/.libs/ $Config{lddlflags}" ) : () 61 | ); 62 | } 63 | 64 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/bindings/perl-shared/README: -------------------------------------------------------------------------------- 1 | These are the Perl bindings for rrdtool as a shared library. To compile do 2 | the following: 3 | 4 | perl Makefile.PL 5 | make test 6 | 7 | For Windows Users, make sure you have the following requirements: 8 | 9 | - ActiveState Perl (32bit version Only) 10 | - Microsoft Visual C++ 11 | - The following binaries in your path: mt.exe, nmake.exe, link.exe, perl.exe 12 | - Make the project rrdlib.vcproj in Release mode to create rrdlib.lib 13 | 14 | To build: 15 | 16 | perl Makefile.PL 17 | nmake 18 | 19 | To Install: 20 | 21 | nmake install 22 | 23 | NOTE: If using anything other than Visual C++ 9, edit Makefile.PL and modify 24 | your paths appropriately. 25 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/bindings/perl-shared/ntmake-build: -------------------------------------------------------------------------------- 1 | use ExtUtils::MakeMaker; 2 | use Config; 3 | # See lib/ExtUtils/MakeMaker.pm for details of how to influence 4 | # the contents of the Makefile that is written. 5 | # Run VCVARS32.BAT before generating makefile/compiling. 6 | WriteMakefile( 7 | 'NAME' => 'RRDs', 8 | 'VERSION_FROM' => 'RRDs.pm', 9 | # 'DEFINE' => "-DPERLPATCHLEVEL=$Config{PATCHLEVEL}", 10 | # keep compatible w/ ActiveState 5xx builds 11 | 'DEFINE' => "-DPERLPATCHLEVEL=5", 12 | 13 | 'INC' => '-I../../src/ "-I/Program Files/GnuWin32/include"', 14 | # Since we are now using GnuWin32 libraries dynamically (instead of static 15 | # complile with code redistributed with rrdtool), use /MD instead of /MT. 16 | # Yes, this means we need msvcrt.dll but GnuWin32 dlls already require it 17 | # and it is available on most versions of Windows. 18 | 'OPTIMIZE' => '-O2 -MD', 19 | '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"', 20 | 'realclean' => {FILES => 't/demo?.rrd t/demo?.png' }, 21 | ($] ge '5.005') ? ( 22 | 'AUTHOR' => 'Tobias Oetiker (tobi@oetiker.ch)', 23 | 'ABSTRACT' => 'Round Robin Database Tool', 24 | ) : () 25 | 26 | 27 | ); 28 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/bindings/python/ACKNOWLEDGEMENT: -------------------------------------------------------------------------------- 1 | ACKNOWLEDGMENT 2 | ============== 3 | 4 | This is a list of people who have made contributions to py-rrdtool. 5 | 6 | Matthew W. Samsonoff 7 | Brian E. Gallew 8 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/bindings/python/AUTHORS: -------------------------------------------------------------------------------- 1 | Hye-Shik Chang 2 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/bindings/python/README: -------------------------------------------------------------------------------- 1 | Based on Python-RRDtool 0.2.1 2 | ----------------------------- 3 | 4 | The python-rrdtool provides a interface to rrdtool, the wonderful 5 | graphing and logging utility. This wrapper implementation has 6 | worked from the scratch (without SWIG), and it's under LGPL. 7 | 8 | This module have not documented yet. Please refer pydoc. 9 | 10 | 11 | Project 12 | ------- 13 | 14 | Homepage: http://www.nongnu.org/py-rrdtool/ 15 | 16 | Mailing Lists: 17 | 18 | CVS Checkins py-rrdtool-cvs@nongnu.org 19 | Users & Hackers py-rrdtool-users@nongnu.org 20 | 21 | 22 | Original Author 23 | --------------- 24 | 25 | Hye-Shik Chang 26 | 27 | Any comments, suggestions, and/or patches are very welcome. 28 | Thank you for using py-rrdtool! 29 | 30 | 31 | CHANGES 32 | ------- 33 | 2008-05-19 - tobi 34 | * rewrote the info method to conform to rrdtool info standard 35 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/bindings/python/setup.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | # 3 | # setup.py 4 | # 5 | # py-rrdtool distutil setup 6 | # 7 | # Author : Hye-Shik Chang 8 | # Date : $Date: 2003/02/14 02:38:16 $ 9 | # Created : 24 May 2002 10 | # 11 | # $Revision: 1.7 $ 12 | # 13 | # ========================================================================== 14 | # This file is part of py-rrdtool. 15 | # 16 | # py-rrdtool is free software; you can redistribute it and/or modify 17 | # it under the terms of the GNU Lesser General Public License as published 18 | # by the Free Software Foundation; either version 2 of the License, or 19 | # (at your option) any later version. 20 | # 21 | # py-rrdtool is distributed in the hope that it will be useful, 22 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 23 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 24 | # GNU Lesser General Public License for more details. 25 | # 26 | # You should have received a copy of the GNU Lesser General Public License 27 | # along with Foobar; if not, write to the Free Software 28 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 29 | # 30 | 31 | from distutils.core import setup, Extension 32 | import sys, os 33 | 34 | RRDBASE = os.environ.get('LOCALBASE', '../../src') 35 | library_dir = os.environ.get('BUILDLIBDIR', os.path.join(RRDBASE, '.libs')) 36 | include_dir = os.environ.get('INCDIR', RRDBASE) 37 | 38 | setup(name = "py-rrdtool", 39 | version = "0.2.1", 40 | description = "Python Interface to RRDTool", 41 | author = "Hye-Shik Chang", 42 | author_email = "perky@fallin.lv", 43 | license = "LGPL", 44 | url = "http://oss.oetiker.ch/rrdtool", 45 | #packages = ['rrdtool'], 46 | ext_modules = [ 47 | Extension( 48 | "rrdtoolmodule", 49 | ["rrdtoolmodule.c"], 50 | libraries=['rrd'], 51 | library_dirs=[library_dir], 52 | include_dirs=[include_dir], 53 | ) 54 | ] 55 | ) 56 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/bindings/ruby/CHANGES: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pbanaszkiewicz/python-rrdtool/fc39e4d06bd279fb1780a240a1f18989ba57e9e0/rrdtool-1.4.7/bindings/ruby/CHANGES -------------------------------------------------------------------------------- /rrdtool-1.4.7/bindings/ruby/README: -------------------------------------------------------------------------------- 1 | # 2 | # ruby librrd bindings 3 | # author: Miles Egan 4 | # 5 | 6 | - Introduction 7 | 8 | This module provides ruby bindings for librrd, with functionality 9 | comparable to the native perl bindings. See test.rb for a script that 10 | exercises all ruby-librrd functionality. 11 | 12 | - Installation 13 | 14 | Installation is standard. Simply run: 15 | 16 | ruby extconf.rb 17 | make 18 | make install 19 | 20 | I hope this works for you. Please let me know if you have any 21 | problems or suggestions. Someday when I'm feeling less lazy I'll 22 | actually document this thing. Thanks to Tobi for rrdtool! 23 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/bindings/ruby/extconf.rb: -------------------------------------------------------------------------------- 1 | # $Id: extconf.rb,v 1.2 2001/11/28 18:30:16 miles Exp $ 2 | # Lost ticket pays maximum rate. 3 | 4 | require 'mkmf' 5 | 6 | if /linux/ =~ RUBY_PLATFORM 7 | $LDFLAGS += ' -Wl,--rpath -Wl,$(EPREFIX)/lib' 8 | elsif /solaris/ =~ RUBY_PLATFORM 9 | $LDFLAGS += ' -R$(EPREFIX)/lib' 10 | elsif /hpux/ =~ RUBY_PLATFORM 11 | $LDFLAGS += ' +b$(EPREFIX)/lib' 12 | elsif /aix/ =~ RUBY_PLATFORM 13 | $LDFLAGS += ' -blibpath:$(EPREFIX)/lib' 14 | end 15 | 16 | dir_config("rrd","../../src","../../src/.libs") 17 | have_library("rrd", "rrd_create") 18 | create_makefile("RRD") 19 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/bindings/ruby/test.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # $Id: test.rb,v 1.2 2002/10/22 17:34:00 miles Exp $ 3 | # Driver does not carry cash. 4 | 5 | $: << '/scratch/rrd12build/lib/ruby/1.8/i386-linux/' 6 | 7 | require "RRD" 8 | 9 | name = "test" 10 | rrd = "#{name}.rrd" 11 | start_time = Time.now.to_i 12 | end_time = start_time.to_i + 300 * 300 13 | 14 | puts "creating #{rrd}" 15 | RRD.create( 16 | rrd, 17 | "--start", "#{start_time - 1}", 18 | "--step", "300", 19 | "DS:a:GAUGE:600:U:U", 20 | "DS:b:GAUGE:600:U:U", 21 | "RRA:AVERAGE:0.5:1:300") 22 | puts 23 | 24 | puts "updating #{rrd}" 25 | start_time.step(end_time, 300) { |i| 26 | RRD.update(rrd, "#{i}:#{rand(100)}:#{Math.sin(i / 800) * 50 + 50}") 27 | } 28 | puts 29 | 30 | puts "fetching data from #{rrd}" 31 | (fstart, fend, data) = RRD.fetch(rrd, "--start", start_time.to_s, "--end", end_time.to_s, "AVERAGE") 32 | puts "got #{data.length} data points from #{fstart} to #{fend}" 33 | puts 34 | 35 | puts "generating graph #{name}.png" 36 | RRD.graph( 37 | "#{name}.png", 38 | "--title", " RubyRRD Demo", 39 | "--start", "#{start_time+3600}", 40 | "--end", "start + 1000 min", 41 | "--interlace", 42 | "--imgformat", "PNG", 43 | "--width=450", 44 | "DEF:a=#{rrd}:a:AVERAGE", 45 | "DEF:b=#{rrd}:b:AVERAGE", 46 | "CDEF:line=TIME,2400,%,300,LT,a,UNKN,IF", 47 | "AREA:b#00b6e4:beta", 48 | "AREA:line#0022e9:alpha", 49 | "LINE3:line#ff0000") 50 | puts 51 | 52 | # last method test 53 | if end_time != RRD.last("#{rrd}").to_i 54 | puts "last method expects #{Time.at(end_time)}." 55 | puts " But #{RRD.last("#{rrd}")} returns." 56 | end 57 | puts 58 | 59 | # xport method test 60 | puts "xporting data from #{rrd}" 61 | (fstart,fend,step,col,legend,data)=RRD.xport( 62 | "--start", start_time.to_s, 63 | "--end", (start_time + 300 * 300).to_s, 64 | "--step", 10.to_s, 65 | "DEF:A=#{rrd}:a:AVERAGE", 66 | "DEF:B=#{rrd}:b:AVERAGE", 67 | "XPORT:A:a", 68 | "XPORT:B:b") 69 | puts "Xported #{col} columns(#{legend.join(", ")}) with #{data.length} rows from #{fstart} to #{fend} and step #{step}\n" 70 | 71 | print "This script has created #{name}.png in the current directory\n"; 72 | print "This demonstrates the use of the TIME and % RPN operators\n"; 73 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/bindings/tcl/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | EXTRA_DIST = README tclrrd.c 3 | 4 | VERSION = @VERSION@ 5 | 6 | AM_CFLAGS = @CFLAGS@ 7 | ### no including this by default @WERROR@ 8 | 9 | TCL_PREFIX = @TCL_PREFIX@ 10 | TCL_SHLIB_LD = @TCL_SHLIB_LD@ 11 | TCL_SHLIB_CFLAGS = @TCL_SHLIB_CFLAGS@ 12 | TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@ 13 | TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ 14 | TCL_LD_SEARCH_FLAGS = @TCL_LD_SEARCH_FLAGS@ 15 | TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@ 16 | TCL_INCLUDE_SPEC = @TCL_INCLUDE_SPEC@ 17 | 18 | CLEANFILES = tclrrd.o tclrrd.so 19 | 20 | SRC_DIR = $(top_srcdir)/src 21 | AM_CPPFLAGS = $(TCL_INCLUDE_SPEC) -I$(SRC_DIR) -DUSE_TCL_STUBS 22 | LIBDIRS = -L$(top_builddir)/src/.libs -L$(top_builddir)/src -L$(libdir) 23 | LIB_RUNTIME_DIR = $(libdir) 24 | 25 | if BUILD_TCL_SITE 26 | tclpkgdir = @TCL_PACKAGE_DIR@ 27 | tclpkg_DATA = pkgIndex.tcl 28 | tclpkg_SCRIPTS = ifOctets.tcl 29 | else 30 | pkglib_DATA = pkgIndex.tcl 31 | pkglib_SCRIPTS = ifOctets.tcl 32 | endif 33 | 34 | # Automake doen't like `tclrrd$(VERSION)$(TCL_SHLIB_SUFFIX)' as 35 | # library name. So we build and install this library `by hand'. 36 | # 37 | # We do, however, specify a lib_LIBRARIES target such that 38 | # automake creates the directory (if neecessary). 39 | # 40 | TCL_RRD_LIB = tclrrd$(VERSION)$(TCL_SHLIB_SUFFIX) 41 | 42 | lib_LIBRARIES = 43 | 44 | all-local: $(TCL_RRD_LIB) 45 | 46 | $(TCL_RRD_LIB): tclrrd.o 47 | $(TCL_SHLIB_LD) $(TCL_LD_SEARCH_FLAGS) $(LIBDIRS) $< -o $@ -lrrd_th -lm $(TCL_STUB_LIB_SPEC) $(LDFLAGS) $(LIBS) 48 | 49 | tclrrd.o: tclrrd.c 50 | $(CC) $(AM_CFLAGS) $(CFLAGS) $(TCL_SHLIB_CFLAGS) $(AM_CPPFLAGS) -c tclrrd.c -DVERSION=\"$(VERSION)\" 51 | 52 | pkgIndex.tcl: 53 | echo "package ifneeded Rrd $(VERSION) \"load $(libdir)/tclrrd$(VERSION)[info sharedlibextension]\"" > $@ 54 | 55 | install-exec-local: $(TCL_RRD_LIB) 56 | @$(NORMAL_INSTALL) 57 | $(INSTALL_PROGRAM) $(TCL_RRD_LIB) $(DESTDIR)$(libdir)/$(TCL_RRD_LIB) 58 | 59 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/bindings/tcl/README: -------------------------------------------------------------------------------- 1 | TCLRRD -- A TCL interpreter extension to access the RRD library, 2 | contributed to Tobias Oetiker's RRD tools. 3 | 4 | Copyright (c) 1999,2000 Frank Strauss, Technical University of Braunschweig. 5 | 6 | See the file "COPYING" for information on usage and redistribution 7 | of this file, and for a DISCLAIMER OF ALL WARRANTIES. 8 | 9 | TCLRRD adds a dynamically loadable package to the Tcl 8.x interpreter 10 | to access all RRD functions as of RRDtool 1.0.13. All command names 11 | and arguments are equal to those of RRDtool. They are assigned to the 12 | namespace `Rrd', e.g. `Rrd::create'. Return values are a bit 13 | different from plain RRDtool behavior to enable more native Tcl 14 | usage. Errors are mapped to the TCL_ERROR return code together with 15 | the RRD error strings. 16 | 17 | TCLRRD makes it easy to combine RRD use with advanced SNMP functionality 18 | of scotty (http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/). E.g., it's easy 19 | to use some scotty code to get the counters of some interfaces by their 20 | interface name and then use Rrd::update to store the values. Furthermore, 21 | data source types (see RRD::create documentation) and integer value ranges 22 | could be easily retrieved from MIB information. 23 | 24 | TCLRRD has been written on a Linux system for use with Tcl 8.x. It should 25 | work on many other platforms, although it has not been tested. There are 26 | no fool proof installation procedures. Take a look at Makefile.am and 27 | adapt it, if required. 28 | 29 | TCLRRD has been written for RRD 1.0.13. 30 | 31 | Frank Strauss , 09-Mar-2000 32 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/bindings/tcl/ifOctets.tcl.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # the next line restarts using tclsh -*- tcl -*- \ 3 | exec tclsh@TCL_VERSION@ "$0" "$@" 4 | 5 | #package require Tnm 3.0 6 | package require Rrd @VERSION@ 7 | 8 | set rrdfile "[lindex $argv 0]-[lindex $argv 1].rrd" 9 | 10 | # create rrdfile if not yet existent 11 | if {[file exists $rrdfile] == 0} { 12 | Rrd::create $rrdfile --step 5 \ 13 | DS:inOctets:COUNTER:10:U:U DS:outOctets:COUNTER:10:U:U \ 14 | RRA:AVERAGE:0.5:1:12 15 | } 16 | 17 | # get an snmp session context 18 | set session [Tnm::snmp generator -address [lindex $argv 0]] 19 | 20 | # walk through the ifDescr column to find the right interface 21 | $session walk descr IF-MIB!ifDescr { 22 | 23 | # is this the right interface? 24 | if {"[Tnm::snmp value $descr 0]" == "[lindex $argv 1]"} { 25 | 26 | # get the instance part of this table row 27 | set inst [lindex [Tnm::mib split [Tnm::snmp oid $descr 0]] 1] 28 | 29 | # get the two interface's octet counter values 30 | set in [lindex [lindex [$session get IF-MIB!ifInOctets.$inst] 0] 2] 31 | set out [lindex [lindex [$session get IF-MIB!ifOutOctets.$inst] 0] 2] 32 | 33 | # write the values to the rrd 34 | puts "$in $out" 35 | Rrd::update $rrdfile --template inOctets:outOctets N:$in:$out 36 | 37 | Rrd::graph gaga.png --title "gaga" \ 38 | DEF:in=$rrdfile:inOctets:AVERAGE \ 39 | DEF:out=$rrdfile:outOctets:AVERAGE \ 40 | AREA:in#0000FF:inOctets \ 41 | LINE2:out#00C000:outOctets 42 | 43 | #puts [Rrd::fetch $rrdfile AVERAGE] 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/compile: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Wrapper for compilers which do not understand `-c -o'. 3 | 4 | scriptversion=2009-04-28.21; # UTC 5 | 6 | # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software 7 | # Foundation, Inc. 8 | # Written by Tom Tromey . 9 | # 10 | # This program is free software; you can redistribute it and/or modify 11 | # it under the terms of the GNU General Public License as published by 12 | # the Free Software Foundation; either version 2, or (at your option) 13 | # any later version. 14 | # 15 | # This program is distributed in the hope that it will be useful, 16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | # GNU General Public License for more details. 19 | # 20 | # You should have received a copy of the GNU General Public License 21 | # along with this program. If not, see . 22 | 23 | # As a special exception to the GNU General Public License, if you 24 | # distribute this file as part of a program that contains a 25 | # configuration script generated by Autoconf, you may include it under 26 | # the same distribution terms that you use for the rest of that program. 27 | 28 | # This file is maintained in Automake, please report 29 | # bugs to or send patches to 30 | # . 31 | 32 | case $1 in 33 | '') 34 | echo "$0: No command. Try \`$0 --help' for more information." 1>&2 35 | exit 1; 36 | ;; 37 | -h | --h*) 38 | cat <<\EOF 39 | Usage: compile [--help] [--version] PROGRAM [ARGS] 40 | 41 | Wrapper for compilers which do not understand `-c -o'. 42 | Remove `-o dest.o' from ARGS, run PROGRAM with the remaining 43 | arguments, and rename the output as expected. 44 | 45 | If you are trying to build a whole package this is not the 46 | right script to run: please start by reading the file `INSTALL'. 47 | 48 | Report bugs to . 49 | EOF 50 | exit $? 51 | ;; 52 | -v | --v*) 53 | echo "compile $scriptversion" 54 | exit $? 55 | ;; 56 | esac 57 | 58 | ofile= 59 | cfile= 60 | eat= 61 | 62 | for arg 63 | do 64 | if test -n "$eat"; then 65 | eat= 66 | else 67 | case $1 in 68 | -o) 69 | # configure might choose to run compile as `compile cc -o foo foo.c'. 70 | # So we strip `-o arg' only if arg is an object. 71 | eat=1 72 | case $2 in 73 | *.o | *.obj) 74 | ofile=$2 75 | ;; 76 | *) 77 | set x "$@" -o "$2" 78 | shift 79 | ;; 80 | esac 81 | ;; 82 | *.c) 83 | cfile=$1 84 | set x "$@" "$1" 85 | shift 86 | ;; 87 | *) 88 | set x "$@" "$1" 89 | shift 90 | ;; 91 | esac 92 | fi 93 | shift 94 | done 95 | 96 | if test -z "$ofile" || test -z "$cfile"; then 97 | # If no `-o' option was seen then we might have been invoked from a 98 | # pattern rule where we don't need one. That is ok -- this is a 99 | # normal compilation that the losing compiler can handle. If no 100 | # `.c' file was seen then we are probably linking. That is also 101 | # ok. 102 | exec "$@" 103 | fi 104 | 105 | # Name of file we expect compiler to create. 106 | cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` 107 | 108 | # Create the lock directory. 109 | # Note: use `[/\\:.-]' here to ensure that we don't use the same name 110 | # that we are using for the .o file. Also, base the name on the expected 111 | # object file name, since that is what matters with a parallel build. 112 | lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d 113 | while true; do 114 | if mkdir "$lockdir" >/dev/null 2>&1; then 115 | break 116 | fi 117 | sleep 1 118 | done 119 | # FIXME: race condition here if user kills between mkdir and trap. 120 | trap "rmdir '$lockdir'; exit 1" 1 2 15 121 | 122 | # Run the compile. 123 | "$@" 124 | ret=$? 125 | 126 | if test -f "$cofile"; then 127 | mv "$cofile" "$ofile" 128 | elif test -f "${cofile}bj"; then 129 | mv "${cofile}bj" "$ofile" 130 | fi 131 | 132 | rmdir "$lockdir" 133 | exit $ret 134 | 135 | # Local Variables: 136 | # mode: shell-script 137 | # sh-indentation: 2 138 | # eval: (add-hook 'write-file-hooks 'time-stamp) 139 | # time-stamp-start: "scriptversion=" 140 | # time-stamp-format: "%:y-%02m-%02d.%02H" 141 | # time-stamp-time-zone: "UTC" 142 | # time-stamp-end: "; # UTC" 143 | # End: 144 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/doc/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | 3 | SUFFIXES = .pod .pl .1 .3 .man .html .txt .pm .pdf .inc 4 | 5 | AUTOMAKE_OPTIONS = foreign 6 | 7 | #ACLOCAL_M4 = $(top_srcdir)/config/aclocal.m4 8 | 9 | CLEANFILES = *.1 *.3 *.html *.txt *-dircache RRD?.pod *.pdf *~ core *itemcache *.rej *.orig *.tmp 10 | 11 | POD = bin_dec_hex.pod rrddump.pod rrdgraph_examples.pod rrdrestore.pod rrdupdate.pod \ 12 | cdeftutorial.pod rrdfetch.pod rrdgraph_graph.pod rrdthreads.pod rrdxport.pod \ 13 | rpntutorial.pod rrdfirst.pod rrdgraph_rpn.pod rrdtool.pod rrdcached.pod \ 14 | rrd-beginners.pod rrdinfo.pod rrdtune.pod rrdbuild.pod rrdflushcached.pod \ 15 | rrdcgi.pod rrdgraph.pod rrdlast.pod rrdlastupdate.pod \ 16 | rrdcreate.pod rrdgraph_data.pod rrdresize.pod rrdtutorial.pod 17 | 18 | if BUILD_LIBDBI 19 | POD += rrdgraph_libdbi.pod 20 | endif 21 | 22 | if BUILD_LUA 23 | POD += rrdlua.pod 24 | endif 25 | 26 | POD3 = librrd.pod 27 | 28 | PMP = RRDs.pod RRDp.pod 29 | 30 | MAN = $(POD:.pod=.1) 31 | MAN3 = $(POD3:.pod=.3) 32 | TXT = $(MAN:.1=.txt) $(MAN3:.3=.txt) 33 | HTML = $(POD:.pod=.html) $(POD3:.pod=.html) $(PMP:.pod=.html) 34 | PDF = $(MAN:.1=.pdf) $(MAN3:.3=.pdf) 35 | 36 | # what should go into the distribution 37 | EXTRA_DIST= $(POD) $(POD3) $(HTML) $(MAN) $(MAN3) $(TXT) rrdtool-dump.dtd rrdtool-xport.dtd rrdgraph_libdbi.pod rrdlua.pod 38 | 39 | idocdir = $(RRDDOCDIR)/txt 40 | idoc_DATA = $(POD) $(TXT) 41 | ihtmldir = $(RRDDOCDIR)/html 42 | ihtml_DATA = $(HTML) 43 | imandir = $(mandir)/man1 44 | iman_DATA = $(MAN) 45 | iman3dir = $(mandir)/man3 46 | iman3_DATA = $(MAN3) 47 | 48 | all-local: link man txt html-local 49 | 50 | .src.pod: 51 | perl -n -e 'if (/^=include\s+(\S+)/){open F,"$$1.inc" || die $$?;print ; close F} else {print}' $< > $@ 52 | 53 | .pod.1 .pm.1 .pl.1: 54 | $(AM_V_GEN)@POD2MAN@ --release=$(VERSION) --center=rrdtool $< > $@ 55 | 56 | .pod.3: 57 | $(AM_V_GEN)@POD2MAN@ --release=$(VERSION) --center=rrdtool --section=3 $< > $@ 58 | 59 | .1.txt .3.txt: 60 | $(AM_V_GEN)GROFF_NO_SGR=1 @NROFF@ -man -Tlp $< > $@ 61 | 62 | .1.pdf .3.pdf: 63 | $(AM_V_GEN)@TROFF@ -man $< | ps2pdf - $@ 64 | 65 | .pm.html .pod.html .pl.html: 66 | $(AM_V_GEN)@POD2HTML@ --infile=$< --outfile=$@ --noindex --htmlroot=. --podpath=. --title=$* 67 | 68 | RRDs.pod: 69 | $(AM_V_GEN)$(LN_S) $(top_srcdir)/bindings/perl-shared/RRDs.pm RRDs.pod 70 | 71 | RRDp.pod: 72 | $(AM_V_GEN)$(LN_S) $(top_srcdir)/bindings/perl-piped/RRDp.pm RRDp.pod 73 | 74 | link: RRDp.pod RRDs.pod 75 | 76 | man: $(MAN) $(MAN3) 77 | 78 | html-local: $(HTML) 79 | 80 | txt: $(TXT) 81 | 82 | pdf-local: $(PDF) 83 | 84 | pod: $(POD) $(POD3) 85 | 86 | install-data-hook: 87 | $(AM_V_GEN)cd $(DESTDIR)$(ihtmldir) && rm -f index.html && $(LN_S) rrdtool.html index.html 88 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/doc/cdeftutorial.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pbanaszkiewicz/python-rrdtool/fc39e4d06bd279fb1780a240a1f18989ba57e9e0/rrdtool-1.4.7/doc/cdeftutorial.txt -------------------------------------------------------------------------------- /rrdtool-1.4.7/doc/rrd-beginners.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pbanaszkiewicz/python-rrdtool/fc39e4d06bd279fb1780a240a1f18989ba57e9e0/rrdtool-1.4.7/doc/rrd-beginners.txt -------------------------------------------------------------------------------- /rrdtool-1.4.7/doc/rrdcached.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pbanaszkiewicz/python-rrdtool/fc39e4d06bd279fb1780a240a1f18989ba57e9e0/rrdtool-1.4.7/doc/rrdcached.txt -------------------------------------------------------------------------------- /rrdtool-1.4.7/doc/rrdcreate.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pbanaszkiewicz/python-rrdtool/fc39e4d06bd279fb1780a240a1f18989ba57e9e0/rrdtool-1.4.7/doc/rrdcreate.txt -------------------------------------------------------------------------------- /rrdtool-1.4.7/doc/rrddump.pod: -------------------------------------------------------------------------------- 1 | =head1 NAME 2 | 3 | rrddump - dump the contents of an RRD to XML format 4 | 5 | =head1 SYNOPSIS 6 | 7 | B B I [I] 8 | S<[B<--header>|B<-h> {none,xsd,dtd}]> 9 | S<[B<--no-header>]> 10 | S<[B<--daemon> I
]> 11 | S I> 12 | 13 | =head1 DESCRIPTION 14 | 15 | The B function writes the contents of an B in human 16 | readable (?) XML format to a file or to stdout. This format can 17 | be read by rrdrestore. Together they allow you to transfer your 18 | files from one computer architecture to another as well to 19 | manipulate the contents of an B file in a somewhat more 20 | convenient manner. 21 | 22 | =over 8 23 | 24 | =item I 25 | 26 | The name of the B you want to dump. 27 | 28 | =item I 29 | 30 | The (optional) filename that you want to write the XML output to. 31 | If not specified, the XML will be printed to stdout. 32 | 33 | =item B<--header>|B<-h> {none,xsd,dtd} 34 | 35 | By default RRDtool will add a dtd header to the xml file. Here 36 | you can customize this to and xsd header or no header at all. 37 | 38 | 39 | =item B<--no-header> 40 | 41 | A shortcut for S<--header=none>. 42 | 43 | If you want to restore the dump with RRDtool 1.2 you should use the 44 | S<--no-header> option since 1.2 can not deal with xml headers. 45 | 46 | =item B<--daemon> I
47 | 48 | Address of the L daemon. If specified, a C command is sent 49 | to the server before reading the RRD files. This allows B to return 50 | fresh data even if the daemon is configured to cache values for a long time. 51 | For a list of accepted formats, see the B<-l> option in the L manual. 52 | 53 | rrdtool dump --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd 54 | 55 | =back 56 | 57 | =head1 EXAMPLES 58 | 59 | To transfer an RRD between architectures, follow these steps: 60 | 61 | =over 4 62 | 63 | =item 1. 64 | 65 | On the same system where the RRD was created, use B B 66 | to export the data to XML format. 67 | 68 | =item 2. 69 | 70 | Transfer the XML dump to the target system. 71 | 72 | =item 3. 73 | 74 | Run B B to create a new RRD from the XML dump. See 75 | B for details. 76 | 77 | =back 78 | 79 | =head1 ENVIRONMENT VARIABLES 80 | 81 | The following environment variables may be used to change the behavior of 82 | Cdump>: 83 | 84 | =over 4 85 | 86 | =item B 87 | 88 | If this environment variable is set it will have the same effect as specifying 89 | the C<--daemon> option on the command line. If both are present, the command 90 | line argument takes precedence. 91 | 92 | =back 93 | 94 | =head1 AUTHOR 95 | 96 | Tobias Oetiker Etobi@oetiker.chE 97 | 98 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/doc/rrddump.txt: -------------------------------------------------------------------------------- 1 | RRDDUMP(1) rrdtool RRDDUMP(1) 2 | 3 | 4 | 5 | NNAAMMEE 6 | rrddump - dump the contents of an RRD to XML format 7 | 8 | SSYYNNOOPPSSIISS 9 | rrrrddttooooll dduummpp _f_i_l_e_n_a_m_e_._r_r_d [_f_i_l_e_n_a_m_e_._x_m_l] [----hheeaaddeerr|--hh {none,xsd,dtd}] 10 | [----nnoo--hheeaaddeerr] [----ddaaeemmoonn _a_d_d_r_e_s_s] > _f_i_l_e_n_a_m_e_._x_m_l 11 | 12 | DDEESSCCRRIIPPTTIIOONN 13 | The dduummpp function writes the contents of an RRRRDD in human readable (?) 14 | XML format to a file or to stdout. This format can be read by 15 | rrdrestore. Together they allow you to transfer your files from one 16 | computer architecture to another as well to manipulate the contents of 17 | an RRRRDD file in a somewhat more convenient manner. 18 | 19 | _f_i_l_e_n_a_m_e_._r_r_d 20 | The name of the RRRRDD you want to dump. 21 | 22 | _f_i_l_e_n_a_m_e_._x_m_l 23 | The (optional) filename that you want to write the XML output 24 | to. If not specified, the XML will be printed to stdout. 25 | 26 | ----hheeaaddeerr|--hh {none,xsd,dtd} 27 | By default RRDtool will add a dtd header to the xml file. Here 28 | you can customize this to and xsd header or no header at all. 29 | 30 | ----nnoo--hheeaaddeerr 31 | A shortcut for --header=none. 32 | 33 | If you want to restore the dump with RRDtool 1.2 you should use 34 | the --no-header option since 1.2 can not deal with xml headers. 35 | 36 | ----ddaaeemmoonn _a_d_d_r_e_s_s 37 | Address of the rrdcached daemon. If specified, a "flush" 38 | command is sent to the server before reading the RRD files. 39 | This allows rrrrddttooooll to return fresh data even if the daemon is 40 | configured to cache values for a long time. For a list of 41 | accepted formats, see the --ll option in the rrdcached manual. 42 | 43 | rrdtool dump --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd 44 | 45 | EEXXAAMMPPLLEESS 46 | To transfer an RRD between architectures, follow these steps: 47 | 48 | 1. On the same system where the RRD was created, use rrrrddttooooll dduummpp to 49 | export the data to XML format. 50 | 51 | 2. Transfer the XML dump to the target system. 52 | 53 | 3. Run rrrrddttooooll rreessttoorree to create a new RRD from the XML dump. See 54 | rrrrddrreessttoorree for details. 55 | 56 | EENNVVIIRROONNMMEENNTT VVAARRIIAABBLLEESS 57 | The following environment variables may be used to change the behavior 58 | of "rrdtool dump": 59 | 60 | RRRRDDCCAACCHHEEDD__AADDDDRREESSSS 61 | If this environment variable is set it will have the same effect as 62 | specifying the "--daemon" option on the command line. If both are 63 | present, the command line argument takes precedence. 64 | 65 | AAUUTTHHOORR 66 | Tobias Oetiker 67 | 68 | 69 | 70 | 1.4.7 2009-10-14 RRDDUMP(1) 71 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/doc/rrdfirst.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | rrdfirst 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |

16 | 27 | 28 | 29 |
30 | 31 | 32 |

33 |

34 |

NAME

35 |

rrdfirst - Return the date of the first data sample in an RRA within an RRD

36 |

37 |

38 |
39 |

SYNOPSIS

40 |

rrdtool first filename [--rraindex number]

41 |

42 |

43 |
44 |

DESCRIPTION

45 |

The first function returns the UNIX timestamp of the first data 46 | sample entered into the specified RRA of the RRD file.

47 |
48 |
filename
49 | 50 |
51 |

The name of the RRD that contains the data.

52 |
53 |
--rraindex number
54 | 55 |
56 |

The index number of the RRA that is to be examined. If not specified, the 57 | index defaults to zero. RRA index numbers can be determined through 58 | rrdtool info.

59 |
60 |
61 |

62 |

63 |
64 |

AUTHOR

65 |

Burton Strauss <Burton@ntopSupport.com>

66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/doc/rrdfirst.pod: -------------------------------------------------------------------------------- 1 | =head1 NAME 2 | 3 | rrdfirst - Return the date of the first data sample in an RRA within an RRD 4 | 5 | =head1 SYNOPSIS 6 | 7 | B B I [I<--rraindex number>] 8 | 9 | =head1 DESCRIPTION 10 | 11 | The B function returns the UNIX timestamp of the first data 12 | sample entered into the specified RRA of the RRD file. 13 | 14 | =over 8 15 | 16 | =item I 17 | 18 | The name of the B that contains the data. 19 | 20 | =item I<--rraindex number> 21 | 22 | The index number of the B that is to be examined. If not specified, the 23 | index defaults to zero. B index numbers can be determined through 24 | B. 25 | 26 | =back 27 | 28 | =head1 AUTHOR 29 | 30 | Burton Strauss 31 | 32 | 33 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/doc/rrdfirst.txt: -------------------------------------------------------------------------------- 1 | RRDFIRST(1) rrdtool RRDFIRST(1) 2 | 3 | 4 | 5 | NNAAMMEE 6 | rrdfirst - Return the date of the first data sample in an RRA within an 7 | RRD 8 | 9 | SSYYNNOOPPSSIISS 10 | rrrrddttooooll ffiirrsstt _f_i_l_e_n_a_m_e [_-_-_r_r_a_i_n_d_e_x _n_u_m_b_e_r] 11 | 12 | DDEESSCCRRIIPPTTIIOONN 13 | The ffiirrsstt function returns the UNIX timestamp of the first data sample 14 | entered into the specified RRA of the RRD file. 15 | 16 | _f_i_l_e_n_a_m_e 17 | The name of the RRRRDD that contains the data. 18 | 19 | _-_-_r_r_a_i_n_d_e_x _n_u_m_b_e_r 20 | The index number of the RRRRAA that is to be examined. If not 21 | specified, the index defaults to zero. RRRRAA index numbers can be 22 | determined through rrrrddttooooll iinnffoo. 23 | 24 | AAUUTTHHOORR 25 | Burton Strauss 26 | 27 | 28 | 29 | 1.4.7 2008-03-15 RRDFIRST(1) 30 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/doc/rrdflushcached.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | rrdflushcached 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |

16 | 28 | 29 | 30 |
31 | 32 | 33 |

34 |

35 |

NAME

36 |

rrdflushcached - Flush the values for a spcific RRD file from memory.

37 |

38 |

39 |
40 |

SYNOPSIS

41 |

rrdtool flushcached 42 | [--daemon address] 43 | filename [filename ...]

44 |

45 |

46 |
47 |

DESCRIPTION

48 |

The flushcached function connects to the rrdcached manpage, the RRD caching daemon, 49 | and issues a "flush" command for the given files. The daemon will put the 50 | files to the head of the update queue so they are written "soon". The 51 | status will be returned only after the files' pending updates have been 52 | written to disk.

53 |
54 |
filename
55 | 56 |
57 |

The name(s) of the RRD file(s) that are to be written to disk.

58 |
59 |
--daemon address
60 | 61 |
62 |

Address of the the rrdcached manpage daemon. If not specified, the 63 | RRDCACHED_ADDRESS environment variable must be set (see below). For a 64 | list of accepted formats, see the -l option in the the rrdcached manpage 65 | manual.

66 |
67 |  rrdtool flush --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd
68 |
69 |
70 |

71 |

72 |
73 |

ENVIRONMENT VARIABLES

74 |

The following environment variables may be used to change the behavior of 75 | rrdtoolflushcached:

76 |
77 |
RRDCACHED_ADDRESS
78 | 79 |
80 |

If this environment variable is set it will have the same effect as specifying 81 | the --daemon option on the command line. If both are present, the command 82 | line argument takes precedence.

83 |
84 |
85 |

86 |

87 |
88 |

AUTHOR

89 |

Florian Forster <octo at verplant.org>

90 | 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/doc/rrdflushcached.pod: -------------------------------------------------------------------------------- 1 | =head1 NAME 2 | 3 | rrdflushcached - Flush the values for a spcific RRD file from memory. 4 | 5 | =head1 SYNOPSIS 6 | 7 | B B 8 | S<[B<--daemon> I
]> 9 | I [I ...] 10 | 11 | =head1 DESCRIPTION 12 | 13 | The B function connects to L, the RRD caching daemon, 14 | and issues a "flush" command for the given files. The daemon will put the 15 | files to the head of the update queue so they are written "soon". The 16 | status will be returned only after the files' pending updates have been 17 | written to disk. 18 | 19 | =over 8 20 | 21 | =item I 22 | 23 | The name(s) of the B file(s) that are to be written to disk. 24 | 25 | =item B<--daemon> I
26 | 27 | Address of the L daemon. If not specified, the 28 | RRDCACHED_ADDRESS environment variable must be set (see below). For a 29 | list of accepted formats, see the B<-l> option in the L 30 | manual. 31 | 32 | rrdtool flush --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd 33 | 34 | =back 35 | 36 | =head1 ENVIRONMENT VARIABLES 37 | 38 | The following environment variables may be used to change the behavior of 39 | Cflushcached>: 40 | 41 | =over 4 42 | 43 | =item B 44 | 45 | If this environment variable is set it will have the same effect as specifying 46 | the C<--daemon> option on the command line. If both are present, the command 47 | line argument takes precedence. 48 | 49 | =back 50 | 51 | =head1 AUTHOR 52 | 53 | Florian Forster EoctoEatEverplant.orgE 54 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/doc/rrdflushcached.txt: -------------------------------------------------------------------------------- 1 | RRDFLUSHCACHED(1) rrdtool RRDFLUSHCACHED(1) 2 | 3 | 4 | 5 | NNAAMMEE 6 | rrdflushcached - Flush the values for a spcific RRD file from memory. 7 | 8 | SSYYNNOOPPSSIISS 9 | rrrrddttooooll fflluusshhccaacchheedd [----ddaaeemmoonn _a_d_d_r_e_s_s] _f_i_l_e_n_a_m_e [_f_i_l_e_n_a_m_e ...] 10 | 11 | DDEESSCCRRIIPPTTIIOONN 12 | The fflluusshhccaacchheedd function connects to rrdcached, the RRD caching daemon, 13 | and issues a "flush" command for the given files. The daemon will put 14 | the files to the head of the update queue so they are written "soon". 15 | The status will be returned only after the files' pending updates have 16 | been written to disk. 17 | 18 | _f_i_l_e_n_a_m_e 19 | The name(s) of the RRRRDD file(s) that are to be written to disk. 20 | 21 | ----ddaaeemmoonn _a_d_d_r_e_s_s 22 | Address of the rrdcached daemon. If not specified, the 23 | RRDCACHED_ADDRESS environment variable must be set (see below). 24 | For a list of accepted formats, see the --ll option in the 25 | rrdcached manual. 26 | 27 | rrdtool flush --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd 28 | 29 | EENNVVIIRROONNMMEENNTT VVAARRIIAABBLLEESS 30 | The following environment variables may be used to change the behavior 31 | of "rrdtool flushcached": 32 | 33 | RRRRDDCCAACCHHEEDD__AADDDDRREESSSS 34 | If this environment variable is set it will have the same effect as 35 | specifying the "--daemon" option on the command line. If both are 36 | present, the command line argument takes precedence. 37 | 38 | AAUUTTHHOORR 39 | Florian Forster 40 | 41 | 42 | 43 | 1.4.7 2009-10-14 RRDFLUSHCACHED(1) 44 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/doc/rrdgraph_examples.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pbanaszkiewicz/python-rrdtool/fc39e4d06bd279fb1780a240a1f18989ba57e9e0/rrdtool-1.4.7/doc/rrdgraph_examples.txt -------------------------------------------------------------------------------- /rrdtool-1.4.7/doc/rrdinfo.pod: -------------------------------------------------------------------------------- 1 | =head1 NAME 2 | 3 | rrdinfo - extract header information from an RRD 4 | 5 | =head1 SYNOPSIS 6 | 7 | B B I 8 | S<[B<--daemon> I
]> 9 | 10 | =head1 DESCRIPTION 11 | 12 | The B function prints the header information from an RRD in 13 | a parsing friendly format. 14 | 15 | Check L if you are uncertain about the meaning of the 16 | individual keys. 17 | 18 | =over 8 19 | 20 | =item I 21 | 22 | The name of the B you want to examine. 23 | 24 | =item B<--daemon> I
25 | 26 | Address of the L daemon. If specified, a C command is sent 27 | to the server before reading the RRD files. This allows B to return 28 | fresh data even if the daemon is configured to cache values for a long time. 29 | For a list of accepted formats, see the B<-l> option in the L manual. 30 | 31 | rrdtool info --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd 32 | 33 | =back 34 | 35 | =head1 EXAMPLE 36 | 37 | This is the output generated by running B on a simple RRD which 38 | contains two data sources and one RRA. Note that the number after the 39 | I keyword is in seconds since 1970. The string B 40 | stands for I<*UNKNOWN*> data. In the example it means that this RRD 41 | has neither minimum nor maximum values defined for either of its 42 | data sources. 43 | 44 | filename = "random.rrd" 45 | rrd_version = "0001" 46 | step = 300 47 | last_update = 955892996 48 | header_size = 2872 49 | ds[a].type = "GAUGE" 50 | ds[a].minimal_heartbeat = 600 51 | ds[a].min = NaN 52 | ds[a].max = NaN 53 | ds[a].last_ds = "UNKN" 54 | ds[a].value = 2.1824421548e+04 55 | ds[a].unknown_sec = 0 56 | ds[b].type = "GAUGE" 57 | ds[b].minimal_heartbeat = 600 58 | ds[b].min = NaN 59 | ds[b].max = NaN 60 | ds[b].last_ds = "UNKN" 61 | ds[b].value = 3.9620838224e+03 62 | ds[b].unknown_sec = 0 63 | rra[0].cf = "AVERAGE" 64 | rra[0].pdp_per_row = 1 65 | rra[0].cdp_prep[0].value = nan 66 | rra[0].cdp_prep[0].unknown_datapoints = 0 67 | rra[0].cdp_prep[1].value = nan 68 | rra[0].cdp_prep[1].unknown_datapoints = 0 69 | 70 | =head1 ENVIRONMENT VARIABLES 71 | 72 | The following environment variables may be used to change the behavior of 73 | Cinfo>: 74 | 75 | =over 4 76 | 77 | =item B 78 | 79 | If this environment variable is set it will have the same effect as specifying 80 | the C<--daemon> option on the command line. If both are present, the command 81 | line argument takes precedence. 82 | 83 | =back 84 | 85 | =head1 AUTHOR 86 | 87 | Tobias Oetiker Etobi@oetiker.chE 88 | 89 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/doc/rrdinfo.txt: -------------------------------------------------------------------------------- 1 | RRDINFO(1) rrdtool RRDINFO(1) 2 | 3 | 4 | 5 | NNAAMMEE 6 | rrdinfo - extract header information from an RRD 7 | 8 | SSYYNNOOPPSSIISS 9 | rrrrddttooooll iinnffoo _f_i_l_e_n_a_m_e [----ddaaeemmoonn _a_d_d_r_e_s_s] 10 | 11 | DDEESSCCRRIIPPTTIIOONN 12 | The iinnffoo function prints the header information from an RRD in a 13 | parsing friendly format. 14 | 15 | Check rrdcreate if you are uncertain about the meaning of the 16 | individual keys. 17 | 18 | _f_i_l_e_n_a_m_e 19 | The name of the RRRRDD you want to examine. 20 | 21 | ----ddaaeemmoonn _a_d_d_r_e_s_s 22 | Address of the rrdcached daemon. If specified, a "flush" 23 | command is sent to the server before reading the RRD files. 24 | This allows rrrrddttooooll to return fresh data even if the daemon is 25 | configured to cache values for a long time. For a list of 26 | accepted formats, see the --ll option in the rrdcached manual. 27 | 28 | rrdtool info --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd 29 | 30 | EEXXAAMMPPLLEE 31 | This is the output generated by running iinnffoo on a simple RRD which 32 | contains two data sources and one RRA. Note that the number after the 33 | _l_a_s_t___u_p_d_a_t_e keyword is in seconds since 1970. The string NNaaNN stands for 34 | _*_U_N_K_N_O_W_N_* data. In the example it means that this RRD has neither 35 | minimum nor maximum values defined for either of its data sources. 36 | 37 | filename = "random.rrd" 38 | rrd_version = "0001" 39 | step = 300 40 | last_update = 955892996 41 | header_size = 2872 42 | ds[a].type = "GAUGE" 43 | ds[a].minimal_heartbeat = 600 44 | ds[a].min = NaN 45 | ds[a].max = NaN 46 | ds[a].last_ds = "UNKN" 47 | ds[a].value = 2.1824421548e+04 48 | ds[a].unknown_sec = 0 49 | ds[b].type = "GAUGE" 50 | ds[b].minimal_heartbeat = 600 51 | ds[b].min = NaN 52 | ds[b].max = NaN 53 | ds[b].last_ds = "UNKN" 54 | ds[b].value = 3.9620838224e+03 55 | ds[b].unknown_sec = 0 56 | rra[0].cf = "AVERAGE" 57 | rra[0].pdp_per_row = 1 58 | rra[0].cdp_prep[0].value = nan 59 | rra[0].cdp_prep[0].unknown_datapoints = 0 60 | rra[0].cdp_prep[1].value = nan 61 | rra[0].cdp_prep[1].unknown_datapoints = 0 62 | 63 | EENNVVIIRROONNMMEENNTT VVAARRIIAABBLLEESS 64 | The following environment variables may be used to change the behavior 65 | of "rrdtool info": 66 | 67 | RRRRDDCCAACCHHEEDD__AADDDDRREESSSS 68 | If this environment variable is set it will have the same effect as 69 | specifying the "--daemon" option on the command line. If both are 70 | present, the command line argument takes precedence. 71 | 72 | AAUUTTHHOORR 73 | Tobias Oetiker 74 | 75 | 76 | 77 | 1.4.7 2009-04-20 RRDINFO(1) 78 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/doc/rrdlast.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | rrdlast 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |

16 | 28 | 29 | 30 |
31 | 32 | 33 |

34 |

35 |

NAME

36 |

rrdlast - Return the date of the last data sample in an RRD

37 |

38 |

39 |
40 |

SYNOPSIS

41 |

rrdtool last filename 42 | [--daemon address]

43 |

44 |

45 |
46 |

DESCRIPTION

47 |

The last function returns the UNIX timestamp of the most recent 48 | update of the RRD.

49 |
50 |
filename
51 | 52 |
53 |

The name of the RRD that contains the data.

54 |
55 |
--daemon address
56 | 57 |
58 |

Address of the the rrdcached manpage daemon. If specified, a flush command is sent 59 | to the server before reading the RRD files. This allows rrdtool to return 60 | fresh data even if the daemon is configured to cache values for a long time. 61 | For a list of accepted formats, see the -l option in the the rrdcached manpage manual.

62 |
63 |  rrdtool last --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd
64 |
65 |
66 |

67 |

68 |
69 |

ENVIRONMENT VARIABLES

70 |

The following environment variables may be used to change the behavior of 71 | rrdtoollast:

72 |
73 |
RRDCACHED_ADDRESS
74 | 75 |
76 |

If this environment variable is set it will have the same effect as specifying 77 | the --daemon option on the command line. If both are present, the command 78 | line argument takes precedence.

79 |
80 |
81 |

82 |

83 |
84 |

AUTHOR

85 |

Russ Wright <rwwright@home.com>

86 | 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/doc/rrdlast.pod: -------------------------------------------------------------------------------- 1 | =head1 NAME 2 | 3 | rrdlast - Return the date of the last data sample in an RRD 4 | 5 | =head1 SYNOPSIS 6 | 7 | B B I 8 | S<[B<--daemon> I
]> 9 | 10 | =head1 DESCRIPTION 11 | 12 | The B function returns the UNIX timestamp of the most recent 13 | update of the RRD. 14 | 15 | =over 8 16 | 17 | =item I 18 | 19 | The name of the B that contains the data. 20 | 21 | =item B<--daemon> I
22 | 23 | Address of the L daemon. If specified, a C command is sent 24 | to the server before reading the RRD files. This allows B to return 25 | fresh data even if the daemon is configured to cache values for a long time. 26 | For a list of accepted formats, see the B<-l> option in the L manual. 27 | 28 | rrdtool last --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd 29 | 30 | =back 31 | 32 | =head1 ENVIRONMENT VARIABLES 33 | 34 | The following environment variables may be used to change the behavior of 35 | Clast>: 36 | 37 | =over 4 38 | 39 | =item B 40 | 41 | If this environment variable is set it will have the same effect as specifying 42 | the C<--daemon> option on the command line. If both are present, the command 43 | line argument takes precedence. 44 | 45 | =back 46 | 47 | =head1 AUTHOR 48 | 49 | Russ Wright 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/doc/rrdlast.txt: -------------------------------------------------------------------------------- 1 | RRDLAST(1) rrdtool RRDLAST(1) 2 | 3 | 4 | 5 | NNAAMMEE 6 | rrdlast - Return the date of the last data sample in an RRD 7 | 8 | SSYYNNOOPPSSIISS 9 | rrrrddttooooll llaasstt _f_i_l_e_n_a_m_e [----ddaaeemmoonn _a_d_d_r_e_s_s] 10 | 11 | DDEESSCCRRIIPPTTIIOONN 12 | The llaasstt function returns the UNIX timestamp of the most recent update 13 | of the RRD. 14 | 15 | _f_i_l_e_n_a_m_e 16 | The name of the RRRRDD that contains the data. 17 | 18 | ----ddaaeemmoonn _a_d_d_r_e_s_s 19 | Address of the rrdcached daemon. If specified, a "flush" 20 | command is sent to the server before reading the RRD files. 21 | This allows rrrrddttooooll to return fresh data even if the daemon is 22 | configured to cache values for a long time. For a list of 23 | accepted formats, see the --ll option in the rrdcached manual. 24 | 25 | rrdtool last --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd 26 | 27 | EENNVVIIRROONNMMEENNTT VVAARRIIAABBLLEESS 28 | The following environment variables may be used to change the behavior 29 | of "rrdtool last": 30 | 31 | RRRRDDCCAACCHHEEDD__AADDDDRREESSSS 32 | If this environment variable is set it will have the same effect as 33 | specifying the "--daemon" option on the command line. If both are 34 | present, the command line argument takes precedence. 35 | 36 | AAUUTTHHOORR 37 | Russ Wright 38 | 39 | 40 | 41 | 1.4.7 2008-09-25 RRDLAST(1) 42 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/doc/rrdlastupdate.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | rrdlastupdate 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |

16 | 28 | 29 | 30 |
31 | 32 | 33 |

34 |

35 |

NAME

36 |

rrdlastupdate - Return the most recent update to an RRD

37 |

38 |

39 |
40 |

SYNOPSIS

41 |

rrdtool lastupdate filename 42 | [--daemon address]

43 |

44 |

45 |
46 |

DESCRIPTION

47 |

The lastupdate function returns the UNIX timestamp and the 48 | value stored for each datum in the most recent update of an RRD.

49 |
50 |
filename
51 | 52 |
53 |

The name of the RRD that contains the data.

54 |
55 |
--daemon address
56 | 57 |
58 |

Address of the the rrdcached manpage daemon. If specified, a flush command is sent 59 | to the server before reading the RRD files. This allows rrdtool to return 60 | fresh data even if the daemon is configured to cache values for a long time. 61 | For a list of accepted formats, see the -l option in the the rrdcached manpage manual.

62 |
63 |  rrdtool lastupdate --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd
64 |
65 |
66 |

67 |

68 |
69 |

ENVIRONMENT VARIABLES

70 |

The following environment variables may be used to change the behavior of 71 | rrdtoollastupdate:

72 |
73 |
RRDCACHED_ADDRESS
74 | 75 |
76 |

If this environment variable is set it will have the same effect as specifying 77 | the --daemon option on the command line. If both are present, the command 78 | line argument takes precedence.

79 |
80 |
81 |

82 |

83 |
84 |

AUTHOR

85 |

Andy Riebs <andy.riebs@hp.com>

86 | 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/doc/rrdlastupdate.pod: -------------------------------------------------------------------------------- 1 | =head1 NAME 2 | 3 | rrdlastupdate - Return the most recent update to an RRD 4 | 5 | =head1 SYNOPSIS 6 | 7 | B B I 8 | S<[B<--daemon> I
]> 9 | 10 | =head1 DESCRIPTION 11 | 12 | The B function returns the UNIX timestamp and the 13 | value stored for each datum in the most recent update of an RRD. 14 | 15 | =over 8 16 | 17 | =item I 18 | 19 | The name of the B that contains the data. 20 | 21 | =item B<--daemon> I
22 | 23 | Address of the L daemon. If specified, a C command is sent 24 | to the server before reading the RRD files. This allows B to return 25 | fresh data even if the daemon is configured to cache values for a long time. 26 | For a list of accepted formats, see the B<-l> option in the L manual. 27 | 28 | rrdtool lastupdate --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd 29 | 30 | =back 31 | 32 | =head1 ENVIRONMENT VARIABLES 33 | 34 | The following environment variables may be used to change the behavior of 35 | Clastupdate>: 36 | 37 | =over 4 38 | 39 | =item B 40 | 41 | If this environment variable is set it will have the same effect as specifying 42 | the C<--daemon> option on the command line. If both are present, the command 43 | line argument takes precedence. 44 | 45 | =back 46 | 47 | =head1 AUTHOR 48 | 49 | Andy Riebs Eandy.riebs@hp.comE 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/doc/rrdlastupdate.txt: -------------------------------------------------------------------------------- 1 | RRDLASTUPDATE(1) rrdtool RRDLASTUPDATE(1) 2 | 3 | 4 | 5 | NNAAMMEE 6 | rrdlastupdate - Return the most recent update to an RRD 7 | 8 | SSYYNNOOPPSSIISS 9 | rrrrddttooooll llaassttuuppddaattee _f_i_l_e_n_a_m_e [----ddaaeemmoonn _a_d_d_r_e_s_s] 10 | 11 | DDEESSCCRRIIPPTTIIOONN 12 | The llaassttuuppddaattee function returns the UNIX timestamp and the value stored 13 | for each datum in the most recent update of an RRD. 14 | 15 | _f_i_l_e_n_a_m_e 16 | The name of the RRRRDD that contains the data. 17 | 18 | ----ddaaeemmoonn _a_d_d_r_e_s_s 19 | Address of the rrdcached daemon. If specified, a "flush" 20 | command is sent to the server before reading the RRD files. 21 | This allows rrrrddttooooll to return fresh data even if the daemon is 22 | configured to cache values for a long time. For a list of 23 | accepted formats, see the --ll option in the rrdcached manual. 24 | 25 | rrdtool lastupdate --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd 26 | 27 | EENNVVIIRROONNMMEENNTT VVAARRIIAABBLLEESS 28 | The following environment variables may be used to change the behavior 29 | of "rrdtool lastupdate": 30 | 31 | RRRRDDCCAACCHHEEDD__AADDDDRREESSSS 32 | If this environment variable is set it will have the same effect as 33 | specifying the "--daemon" option on the command line. If both are 34 | present, the command line argument takes precedence. 35 | 36 | AAUUTTHHOORR 37 | Andy Riebs 38 | 39 | 40 | 41 | 1.4.7 2008-09-25 RRDLASTUPDATE(1) 42 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/doc/rrdresize.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | rrdresize 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |

16 | 28 | 29 | 30 |
31 | 32 | 33 |

34 |

35 |

NAME

36 |

rrdresize - alters the size of an RRA and creates a new .rrd file

37 |

38 |

39 |
40 |

SYNOPSIS

41 |

rrdtool resize filename rra-num GROW|SHRINK rows

42 |

43 |

44 |
45 |

DESCRIPTION

46 |

The resize function is used to modify the number of rows in 47 | an RRA.

48 |
49 |
filename
50 | 51 |
52 |

the name of the RRD you want to alter.

53 |
54 |
rra-num
55 | 56 |
57 |

the RRA you want to alter. You can find the number using rrdtool info.

58 |
59 |
GROW
60 | 61 |
62 |

used if you want to add extra rows to an RRA. The extra rows will be inserted 63 | as the rows that are oldest.

64 |
65 |
SHRINK
66 | 67 |
68 |

used if you want to remove rows from an RRA. The rows that will be removed 69 | are the oldest rows.

70 |
71 |
rows
72 | 73 |
74 |

the number of rows you want to add or remove.

75 |
76 |
77 |

78 |

79 |
80 |

NOTES

81 |

The new .rrd file, with the modified RRAs, is written to the file 82 | resize.rrd in the current directory. The original .rrd file is not 83 | modified.

84 |

It is possible to abuse this tool and get strange results 85 | by first removing some rows and then reinserting the same amount (effectively 86 | clearing them to be Unknown). You may thus end up with unknown data in one 87 | RRA while at the same timestamp this data is available in another RRA.

88 |

89 |

90 |
91 |

AUTHOR

92 |

Alex van den Bogaerdt <alex@vandenbogaerdt.nl>

93 | 94 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/doc/rrdresize.pod: -------------------------------------------------------------------------------- 1 | =head1 NAME 2 | 3 | rrdresize - alters the size of an RRA and creates a new .rrd file 4 | 5 | =head1 SYNOPSIS 6 | 7 | B B I I BI<|>B I 8 | 9 | =head1 DESCRIPTION 10 | 11 | The B function is used to modify the number of rows in 12 | an B. 13 | 14 | =over 8 15 | 16 | =item I 17 | 18 | the name of the B you want to alter. 19 | 20 | =item I 21 | 22 | the B you want to alter. You can find the number using B. 23 | 24 | =item B 25 | 26 | used if you want to add extra rows to an RRA. The extra rows will be inserted 27 | as the rows that are oldest. 28 | 29 | =item B 30 | 31 | used if you want to remove rows from an RRA. The rows that will be removed 32 | are the oldest rows. 33 | 34 | =item I 35 | 36 | the number of rows you want to add or remove. 37 | 38 | =back 39 | 40 | =head1 NOTES 41 | 42 | The new .rrd file, with the modified RRAs, is written to the file 43 | B in the current directory. B. 45 | 46 | It is possible to abuse this tool and get strange results 47 | by first removing some rows and then reinserting the same amount (effectively 48 | clearing them to be Unknown). You may thus end up with unknown data in one 49 | RRA while at the same timestamp this data is available in another RRA. 50 | 51 | =head1 AUTHOR 52 | 53 | Alex van den Bogaerdt 54 | 55 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/doc/rrdresize.txt: -------------------------------------------------------------------------------- 1 | RRDRESIZE(1) rrdtool RRDRESIZE(1) 2 | 3 | 4 | 5 | NNAAMMEE 6 | rrdresize - alters the size of an RRA and creates a new .rrd file 7 | 8 | SSYYNNOOPPSSIISS 9 | rrrrddttooooll rreessiizzee _f_i_l_e_n_a_m_e _r_r_a_-_n_u_m GGRROOWW_|SSHHRRIINNKK _r_o_w_s 10 | 11 | DDEESSCCRRIIPPTTIIOONN 12 | The rreessiizzee function is used to modify the number of rows in an RRRRAA. 13 | 14 | _f_i_l_e_n_a_m_e 15 | the name of the RRRRDD you want to alter. 16 | 17 | _r_r_a_-_n_u_m the RRRRAA you want to alter. You can find the number using 18 | rrrrddttooooll iinnffoo. 19 | 20 | GGRROOWW used if you want to add extra rows to an RRA. The extra rows 21 | will be inserted as the rows that are oldest. 22 | 23 | SSHHRRIINNKK used if you want to remove rows from an RRA. The rows that will 24 | be removed are the oldest rows. 25 | 26 | _r_o_w_s the number of rows you want to add or remove. 27 | 28 | NNOOTTEESS 29 | The new .rrd file, with the modified RRAs, is written to the file 30 | rreessiizzee..rrrrdd in the current directory. TThhee oorriiggiinnaall ..rrrrdd ffiillee iiss nnoott 31 | mmooddiiffiieedd. 32 | 33 | It is possible to abuse this tool and get strange results by first 34 | removing some rows and then reinserting the same amount (effectively 35 | clearing them to be Unknown). You may thus end up with unknown data in 36 | one RRA while at the same timestamp this data is available in another 37 | RRA. 38 | 39 | AAUUTTHHOORR 40 | Alex van den Bogaerdt 41 | 42 | 43 | 44 | 1.4.7 2009-02-21 RRDRESIZE(1) 45 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/doc/rrdrestore.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | rrdrestore 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |

16 | 27 | 28 | 29 |
30 | 31 | 32 |

33 |

34 |

NAME

35 |

rrdrestore - Restore the contents of an RRD from its XML dump format

36 |

37 |

38 |
39 |

SYNOPSIS

40 |

rrdtool restore filename.xml filename.rrd 41 | [--range-check|-r]

42 |

43 |

44 |
45 |

DESCRIPTION

46 |

The restore function reads the XML representation of an RRD and converts 47 | it to the native RRD format.

48 |
49 |
filename.xml
50 | 51 |
52 |

The name of the XML file you want to restore.

53 |
54 |
filename.rrd
55 | 56 |
57 |

The name of the RRD to restore.

58 |
59 |
--range-check|-r
60 | 61 |
62 |

Make sure the values in the RRAs do not exceed the limits defined for 63 | the various data sources.

64 |
65 |
--force-overwrite|-f
66 | 67 |
68 |

Allows RRDtool to overwrite the destination RRD.

69 |
70 |
71 |

72 |

73 |
74 |

AUTHOR

75 |

Tobias Oetiker <tobi@oetiker.ch>

76 | 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/doc/rrdrestore.pod: -------------------------------------------------------------------------------- 1 | =head1 NAME 2 | 3 | rrdrestore - Restore the contents of an RRD from its XML dump format 4 | 5 | =head1 SYNOPSIS 6 | 7 | B B I I 8 | S<[B<--range-check>|B<-r>]> 9 | 10 | =head1 DESCRIPTION 11 | 12 | The B function reads the XML representation of an RRD and converts 13 | it to the native B format. 14 | 15 | =over 8 16 | 17 | =item I 18 | 19 | The name of the B file you want to restore. 20 | 21 | =item I 22 | 23 | The name of the B to restore. 24 | 25 | =item B<--range-check>|B<-r> 26 | 27 | Make sure the values in the RRAs do not exceed the limits defined for 28 | the various data sources. 29 | 30 | =item B<--force-overwrite>|B<-f> 31 | 32 | Allows B to overwrite the destination B. 33 | 34 | =back 35 | 36 | =head1 AUTHOR 37 | 38 | Tobias Oetiker 39 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/doc/rrdrestore.txt: -------------------------------------------------------------------------------- 1 | RRDRESTORE(1) rrdtool RRDRESTORE(1) 2 | 3 | 4 | 5 | NNAAMMEE 6 | rrdrestore - Restore the contents of an RRD from its XML dump format 7 | 8 | SSYYNNOOPPSSIISS 9 | rrrrddttooooll rreessttoorree _f_i_l_e_n_a_m_e_._x_m_l _f_i_l_e_n_a_m_e_._r_r_d [----rraannggee--cchheecckk|--rr] 10 | 11 | DDEESSCCRRIIPPTTIIOONN 12 | The rreessttoorree function reads the XML representation of an RRD and 13 | converts it to the native RRRRDD format. 14 | 15 | _f_i_l_e_n_a_m_e_._x_m_l 16 | The name of the XXMMLL file you want to restore. 17 | 18 | _f_i_l_e_n_a_m_e_._r_r_d 19 | The name of the RRRRDD to restore. 20 | 21 | ----rraannggee--cchheecckk|--rr 22 | Make sure the values in the RRAs do not exceed the limits 23 | defined for the various data sources. 24 | 25 | ----ffoorrccee--oovveerrwwrriittee|--ff 26 | Allows RRRRDDttooooll to overwrite the destination RRRRDD. 27 | 28 | AAUUTTHHOORR 29 | Tobias Oetiker 30 | 31 | 32 | 33 | 1.4.7 2008-03-15 RRDRESTORE(1) 34 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/doc/rrdthreads.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pbanaszkiewicz/python-rrdtool/fc39e4d06bd279fb1780a240a1f18989ba57e9e0/rrdtool-1.4.7/doc/rrdthreads.txt -------------------------------------------------------------------------------- /rrdtool-1.4.7/doc/rrdtool-dump.dtd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/doc/rrdtool-xport.dtd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/doc/rrdtool.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pbanaszkiewicz/python-rrdtool/fc39e4d06bd279fb1780a240a1f18989ba57e9e0/rrdtool-1.4.7/doc/rrdtool.txt -------------------------------------------------------------------------------- /rrdtool-1.4.7/doc/rrdtutorial.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pbanaszkiewicz/python-rrdtool/fc39e4d06bd279fb1780a240a1f18989ba57e9e0/rrdtool-1.4.7/doc/rrdtutorial.txt -------------------------------------------------------------------------------- /rrdtool-1.4.7/doc/rrdupdate.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pbanaszkiewicz/python-rrdtool/fc39e4d06bd279fb1780a240a1f18989ba57e9e0/rrdtool-1.4.7/doc/rrdupdate.txt -------------------------------------------------------------------------------- /rrdtool-1.4.7/etc/rrdcached-default: -------------------------------------------------------------------------------- 1 | 2 | RUN_RRDCACHED=0 3 | 4 | RRDCACHED_USER="rrdcached" 5 | 6 | OPTS="-w 300 -z 300" 7 | 8 | PIDFILE="/var/run/rrdcached/rrdcached.pid" 9 | 10 | SOCKFILE="/var/run/rrdcached/rrdcached.sock" 11 | 12 | SOCKPERMS=0660 13 | 14 | 15 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/etc/rrdcached-init: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # chkconfig: 2345 19 81 4 | # description: rrdcached startup script 5 | # 6 | 7 | RRDCACHED=/usr/bin/rrdcached 8 | 9 | . /etc/rc.d/init.d/functions 10 | 11 | . /etc/default/rrdcached 12 | 13 | RETVAL=0 14 | 15 | case "$1" in 16 | start) 17 | if [ ${RUN_RRDCACHED} -eq 0 ]; 18 | then 19 | echo "Please enable rrdcached in /etc/default/rrdcached" 20 | exit 0 21 | fi 22 | 23 | echo -n "Starting rrdcached: " 24 | [ -f $RRDCACHED ] || exit 1 25 | 26 | daemon --user=$RRDCACHED_USER \ 27 | $RRDCACHED $OPTS -p $PIDFILE -l $SOCKFILE 28 | RETVAL=$? 29 | echo 30 | [ $RETVAL -eq 0 ] && touch /var/lock/subsys/rrdcached 31 | [ $RETVAL -eq 0 ] && chmod $SOCKPERMS "${SOCKFILE}" 32 | ;; 33 | 34 | stop) 35 | echo -n "Shutting down rrdcached: " 36 | killproc rrdcached 37 | RETVAL=$? 38 | echo 39 | [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/rrdcached && rm -rf $PIDFILE 40 | ;; 41 | 42 | restart|reload) 43 | $0 stop 44 | $0 start 45 | RETVAL=$? 46 | ;; 47 | status) 48 | status rrdcached 49 | RETVAL=$? 50 | ;; 51 | *) 52 | echo "Usage: $0 {start|stop|restart|status}" 53 | exit 1 54 | esac 55 | 56 | exit $RETVAL 57 | 58 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/examples/4charts.pl.in: -------------------------------------------------------------------------------- 1 | #! @PERL@ 2 | 3 | #makes things work when run without install 4 | use lib qw( @prefix@/lib/perl ); 5 | 6 | use RRDs; 7 | 8 | my $start=time; 9 | my $rrd="randome.rrd"; 10 | my $name = $0; 11 | $name =~ s/.*\///g; 12 | $name =~ s/\.pl.*//g; 13 | 14 | RRDs::create ($rrd, "--start",$start-1, "--step",300, 15 | "DS:a:GAUGE:600:U:U", 16 | "DS:b:GAUGE:600:U:U", 17 | "RRA:AVERAGE:0.5:1:300", 18 | "RRA:MIN:0.5:12:300", 19 | "RRA:MAX:0.5:12:300", 20 | ); 21 | 22 | my $ERROR = RRDs::error; 23 | die "$0: unable to create `$rrd': $ERROR\n" if $ERROR; 24 | 25 | # dropt some data into the rrd 26 | my $t; 27 | for ($t=$start; $t<$start+300*300; $t+=300){ 28 | RRDs::update $rrd, "$t:".(sin($t/3000)*50+50).":".(sin($t/2500)*50+50); 29 | if ($ERROR = RRDs::error) { 30 | die "$0: unable to update `$rrd': $ERROR\n"; 31 | } 32 | } 33 | 34 | my $c1="f57912a0"; 35 | my $c2="2a79e9a0"; 36 | my $w=300; 37 | my $h=140; 38 | 39 | RRDs::graph "$name-L.png", 40 | "--title", "2 LINES", 41 | "--start", "now", 42 | "--end", "start+15h", 43 | "--lower-limit=0", 44 | "--interlace", 45 | "--imgformat","PNG", 46 | "--width=$w", 47 | "--height=$h", 48 | "DEF:a=$rrd:a:AVERAGE", 49 | "DEF:b=$rrd:b:AVERAGE", 50 | "LINE1:a#$c1:Value A", 51 | "LINE3:b#$c2:Value B", 52 | ; 53 | 54 | RRDs::graph "$name-A.png", 55 | "--title", "LINE and AREA", 56 | "--start", "now", 57 | "--end", "start+15h", 58 | "--lower-limit=0", 59 | "--interlace", 60 | "--imgformat","PNG", 61 | "--width=$w", 62 | "--height=$h", 63 | "DEF:a=$rrd:a:AVERAGE", 64 | "DEF:b=$rrd:b:AVERAGE", 65 | "AREA:a#$c1:Value A", 66 | "LINE2:b#$c2:Value B", 67 | ; 68 | 69 | RRDs::graph "$name-S.png", 70 | "--title", "STACKED AREAS", 71 | "--start", "now", 72 | "--end", "start+15h", 73 | "--lower-limit=0", 74 | "--interlace", 75 | "--imgformat","PNG", 76 | "--width=$w", 77 | "--height=$h", 78 | "DEF:a=$rrd:a:AVERAGE", 79 | "DEF:b=$rrd:b:AVERAGE", 80 | "AREA:a#$c1:Value A", 81 | "STACK:b#$c2:Value B", 82 | ; 83 | 84 | 85 | RRDs::graph "$name-M.png", 86 | "--title", "RPN Magic", 87 | "--start", "now", 88 | "--end", "start+15h", 89 | "--lower-limit=0", 90 | "--interlace", 91 | "--imgformat","PNG", 92 | "--width=$w", 93 | "--height=$h", 94 | "DEF:a=$rrd:a:AVERAGE", 95 | "DEF:b=$rrd:b:AVERAGE", 96 | "CDEF:alpha=TIME,3600,%,1800,LT,a,UNKN,IF", 97 | "CDEF:beta=TIME,3600,%,1800,GE,b,UNKN,IF", 98 | "AREA:alpha#$c1:Value A", 99 | "LINE1:a#$c1", 100 | "AREA:beta#$c2:Value B", 101 | "LINE1:b#$c2", 102 | ; 103 | 104 | RRDs::graph "$name-sample.png", 105 | "--title", "Sample", 106 | "--start", "now", 107 | "--end", "start+15h", 108 | "--lower-limit=0", 109 | "--interlace", 110 | "--imgformat","PNG", 111 | "--width=600", 112 | "--height=50", 113 | "DEF:a=$rrd:a:AVERAGE", 114 | "DEF:b=$rrd:a:MAX", 115 | "AREA:a#00ff00:Incoming", 116 | "LINE1:b#ff0000:Max Incoming", 117 | ; 118 | 119 | if ($ERROR = RRDs::error) { 120 | die "ERROR: $ERROR\n"; 121 | }; 122 | 123 | print "This script has created $name.png in the current directory\n"; 124 | print "This demonstrates the use of the TIME and % RPN operators\n"; 125 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/examples/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | 3 | #AUTOMAKE_OPTIONS = foreign 4 | 5 | #ACLOCAL_M4 = $(top_srcdir)/config/aclocal.m4 6 | 7 | SUBDIRS = rrdcached 8 | 9 | EXTRA_DIST = cgi-demo.cgi.in 10 | 11 | examplesdir = $(pkgdatadir)/examples 12 | examples_SCRIPTS = cgi-demo.cgi piped-demo.pl shared-demo.pl \ 13 | stripes.pl bigtops.pl minmax.pl 4charts.pl perftest.pl 14 | 15 | cgi-demo.cgi: @srcdir@/cgi-demo.cgi.in $(top_builddir)/config.status 16 | sed 's,@''exec_prefix@,$(exec_prefix),' @srcdir@/cgi-demo.cgi.in > $@ 17 | chmod a+x $@ 18 | 19 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/examples/bigtops.pl.in: -------------------------------------------------------------------------------- 1 | #! @PERL@ 2 | # this is for after install 3 | use lib qw( @prefix@/lib/perl ); 4 | 5 | use RRDs; 6 | my $start=time; 7 | my $rrd="randome.rrd"; 8 | my $name = $0; 9 | $name =~ s/.*\///g; 10 | $name =~ s/\.pl.*//g; 11 | 12 | RRDs::create ($rrd, "--start",$start-1, "--step",300, 13 | "DS:a:GAUGE:600:U:U", 14 | "DS:b:GAUGE:600:U:U", 15 | "RRA:AVERAGE:0.5:1:300"); 16 | my $ERROR = RRDs::error; 17 | die "$0: unable to create `$rrd': $ERROR\n" if $ERROR; 18 | 19 | # dropt some data into the rrd 20 | my $t; 21 | for ($t=$start; $t<$start+300*300; $t+=300){ 22 | RRDs::update $rrd, "$t:".rand(100).":".(sin($t/800)*50+50); 23 | if ($ERROR = RRDs::error) { 24 | die "$0: unable to update `$rrd': $ERROR\n"; 25 | } 26 | } 27 | 28 | RRDs::graph "$name.png", 29 | "--title", uc($name)." Demo", 30 | "--start", "$start + 1 h", 31 | "--end", "start + 1000 min", 32 | "--interlace", 33 | "--imgformat","PNG", 34 | "--width=450", 35 | "DEF:a=$rrd:a:AVERAGE", 36 | "DEF:b=$rrd:b:AVERAGE", 37 | "CDEF:line=TIME,2400,%,300,LT,a,UNKN,IF", 38 | "AREA:b#00b6e4:beta", 39 | "AREA:line#0022e9:alpha", 40 | "LINE3:line#ff0000", 41 | 42 | ; 43 | 44 | if ($ERROR = RRDs::error) { 45 | die "ERROR: $ERROR\n"; 46 | }; 47 | 48 | 49 | print "This script has created $name.png in the current directory\n"; 50 | print "This demonstrates the use of the TIME and % RPN operators\n"; 51 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/examples/cgi-demo.cgi.in: -------------------------------------------------------------------------------- 1 | #! @exec_prefix@/bin/rrdcgi 2 | 3 | 4 | 5 | RRDCGI Demo 6 | 7 | 8 | Note: This Demo will only work if have previously run 9 | the shared-demo.pl. 10 | 11 |

This is NOT traffic

12 | 13 | 14 |

" 18 | DEF:alpha=shared-demo.rrd:a:AVERAGE 19 | DEF:beta=shared-demo.rrd:b:AVERAGE 20 | AREA:alpha#0022e9:"Trees on Mars" 21 | STACK:beta#00b871:"Elchs in Norway"> 22 |

23 | 24 |

25 | 33 |

34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/examples/minmax.pl.in: -------------------------------------------------------------------------------- 1 | #! @PERL@ 2 | 3 | use lib qw( @prefix@/lib/perl ); 4 | 5 | use RRDs; 6 | my $start=time; 7 | my $rrd="randome.rrd"; 8 | my $name = $0; 9 | $name =~ s/.*\///g; 10 | $name =~ s/\.pl.*//g; 11 | 12 | RRDs::create ($rrd, "--start",$start-1, "--step",300, 13 | "DS:a:GAUGE:600:U:U", 14 | "RRA:AVERAGE:0.5:1:300", 15 | "RRA:MIN:0.5:12:300", 16 | "RRA:MAX:0.5:12:300", 17 | ); 18 | my $ERROR = RRDs::error; 19 | die "$0: unable to create `$rrd': $ERROR\n" if $ERROR; 20 | 21 | # dropt some data into the rrd 22 | my $t; 23 | for ($t=$start; $t<$start+300*300; $t+=300){ 24 | RRDs::update $rrd, "$t:".(sin($t/3000)*50+50); 25 | if ($ERROR = RRDs::error) { 26 | die "$0: unable to update `$rrd': $ERROR\n"; 27 | } 28 | } 29 | 30 | RRDs::graph "$name.png", 31 | "--title", uc($name)." Demo", 32 | "--start", "now", 33 | "--end", "start+1d", 34 | "--lower-limit=0", 35 | "--interlace", 36 | "--imgformat","PNG", 37 | "--width=450", 38 | "DEF:a=$rrd:a:AVERAGE", 39 | "DEF:b=$rrd:a:MIN", 40 | "DEF:c=$rrd:a:MAX", 41 | "AREA:a#00b6e4:real", 42 | "LINE1:b#0022e9:min", 43 | "LINE1:c#00ee22:max", 44 | ; 45 | 46 | if ($ERROR = RRDs::error) { 47 | die "ERROR: $ERROR\n"; 48 | }; 49 | 50 | 51 | print "This script has created $name.png in the current directory\n"; 52 | print "This demonstrates the use of MIN and MAX archives\n"; 53 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/examples/rrdcached/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | 3 | #AUTOMAKE_OPTIONS = foreign 4 | 5 | #ACLOCAL_M4 = $(top_srcdir)/config/aclocal.m4 6 | 7 | examplesdir = $(pkgdatadir)/examples/rrdcached 8 | examples_SCRIPTS = RRDCached.pm rrdcached-size.pl 9 | 10 | EXTRA_DIST = RRDCached.pm rrdcached-size.pl 11 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/examples/rrdcached/RRDCached.pm: -------------------------------------------------------------------------------- 1 | 2 | use strict; 3 | use warnings; 4 | 5 | package RRDCached; 6 | 7 | =head1 RRDCached 8 | 9 | This module implements the B client protocol for bulk updates. 10 | 11 | =head1 SYNOPSIS 12 | 13 | my $cache = RRDCached->new('unix:/var/run/rrdcached.sock') 14 | or die "Cannot connect to RRDCached"; 15 | 16 | $cache->update('file1.rrd', 'N:10:2:78'); 17 | $cache->update('file2.rrd', '1222973760:30:0:9', 'N:68:1:55'); 18 | ... 19 | 20 | $cache->done(); 21 | 22 | =cut 23 | 24 | use IO::Socket; 25 | 26 | ################################################################# 27 | 28 | sub new { 29 | my ($class, $daemon) = @_; 30 | my $this = {}; 31 | 32 | $daemon ||= $ENV{RRDCACHED_ADDRESS}; 33 | defined $daemon or return undef; 34 | 35 | my $sock_family = "INET"; 36 | 37 | if ($daemon =~ m{^unix: | ^/ }x) 38 | { 39 | $sock_family = "UNIX"; 40 | $daemon =~ s/^unix://; 41 | } 42 | 43 | my $sock = "IO::Socket::$sock_family"->new($daemon) 44 | or die "Cannot connect to daemon"; 45 | 46 | $sock->printflush("BATCH\n"); 47 | 48 | my $go = $sock->getline; 49 | warn "We didn't get go-ahead from rrdcached" unless $go =~ /^0/; 50 | 51 | $sock->autoflush(0); 52 | 53 | bless { sock => $sock, 54 | daemon => $daemon, 55 | }, $class; 56 | } 57 | 58 | sub update { 59 | my $this = shift; 60 | my $file = shift; 61 | ## @updates = @_; 62 | 63 | @_ or warn "No updates for $file!"; 64 | 65 | ## rrdcached doesn't handle N: timestamps 66 | my $now = time(); 67 | s/^N(?=:)/$now/ for (@_); 68 | 69 | $this->{sock}->print("update $file @_\n"); 70 | } 71 | 72 | sub done { 73 | my ($this) = @_; 74 | 75 | my $sock = delete $this->{sock}; 76 | 77 | $sock->printflush(".\n"); 78 | my $errs = $sock->getline; 79 | 80 | my ($num_err) = $errs =~ /^(\d+)/; 81 | return unless $num_err; 82 | 83 | $sock->getline for (1..$num_err); 84 | 85 | $sock->close; 86 | } 87 | 88 | ################################################################# 89 | 90 | 1; 91 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/examples/rrdcached/rrdcached-size.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | =head1 NAME 4 | 5 | rrdcached-size.pl - estimate the IO and memory requirements for rrdcached 6 | 7 | =head1 SYNOPSIS 8 | 9 | B 10 | [B<-rrds>EI] 11 | [B<-step>EI] 12 | [B<-update>EI] 13 | [B<-file>EI] 14 | [B<-io>EI] 15 | [B<-w>EI] 16 | [B<-f>EI] 17 | [B<-pagesize>EI] 18 | 19 | =head1 OPTIONS 20 | 21 | =over 4 22 | 23 | =item B<-rrds> I 24 | 25 | Specify the number of RRDs in the working set. 26 | 27 | =item B<-step> I 28 | 29 | Specify the RRD step value for each file. 30 | 31 | =item B<-update> I 32 | 33 | Average update string length. For this calculation, the time value must 34 | be specified as a C, not C. For example, this update string 35 | would lead to B<-update>EI<43> : 36 | 37 | 1226936851:0:0:101113914:0:0:0:25814373:0:0 38 | 39 | =item B<-file> I 40 | 41 | Specify the average file name length. For this calculation, use the full 42 | path of the file. 43 | 44 | =item B<-io> I 45 | 46 | Specify the number of RRD files that your system can write per second. 47 | 48 | =item B<-w> I 49 | 50 | Specifies the B<-w> timer used with rrdcached. For more information, see 51 | the B documentation. 52 | 53 | =item B<-f> I 54 | 55 | Specifies the B<-f> timer used with rrdcached. For more information, see 56 | the B documentation. 57 | 58 | =item B<-pagesize> I 59 | 60 | Manually specify the system page size, in case it is not detected 61 | properly. 62 | 63 | =back 64 | 65 | =cut 66 | 67 | use strict; 68 | use warnings; 69 | 70 | my $filename_len = 60; 71 | my $update_len = 128; 72 | my $rrds = 100; 73 | my $step = 300; 74 | my $rrd_per_sec = 200; 75 | my $rrdc_write = 300; 76 | my $rrdc_flush = 3600; 77 | my $pagesize = `pagesize` || 4096; 78 | 79 | ################################################################# 80 | 81 | use Getopt::Long; 82 | GetOptions('rrds=i' => \$rrds, 83 | 'step=i' => \$step, 84 | 'update=i' => \$update_len, 85 | 'file=i' => \$filename_len, 86 | 'io=i' => \$rrd_per_sec, 87 | 'w=i' => \$rrdc_write, 88 | 'f=i' => \$rrdc_flush, 89 | 'pagesize=i' => \$pagesize, 90 | 'h' => \&usage, 91 | ) 92 | or die "Options failure"; 93 | 94 | @ARGV and die "Extra args: @ARGV\n"; 95 | 96 | ################################################################# 97 | 98 | my $MEG = 1024*1024; 99 | 100 | my $write_time = int($rrds / $rrd_per_sec); 101 | my $write_busy = int(100 * $write_time / $rrdc_write); 102 | my $buffered_pdp = $rrdc_write / $step; 103 | 104 | my $max_ram 105 | = $rrds 106 | * ($filename_len 107 | + ( $rrdc_write / $step ) * $update_len) 108 | / $MEG; 109 | 110 | my $journal_size 111 | = $rrds 112 | * (length("update") + $filename_len + $update_len + 3) 113 | * ($rrdc_flush/$step) 114 | * 2 # 2 logs 115 | / $MEG; 116 | 117 | my $journal_rate = (($journal_size*$MEG/2))/$rrdc_flush; 118 | my $journal_page_rate = $journal_rate / $pagesize; 119 | 120 | $_ = sprintf("%.1f", $_) 121 | for ($write_time, 122 | $write_busy, 123 | $buffered_pdp, 124 | $max_ram, 125 | $journal_size, 126 | $journal_rate, 127 | $journal_page_rate, 128 | ); 129 | 130 | print <<"EOF"; 131 | RRD files : $rrds files 132 | RRD step : $step seconds 133 | Update length : $update_len bytes 134 | IO writes/sec : $rrd_per_sec rrd/sec 135 | write timer : $rrdc_write seconds 136 | flush timer : $rrdc_flush seconds 137 | ----------------------------------------------------------------- 138 | 139 | Time to write all RRDs: $write_time sec ($write_busy\% busy) 140 | 141 | $buffered_pdp PDPs will be buffered per file 142 | 143 | RAM usage: $max_ram MB 144 | 145 | Journal size: $journal_size MB (total size for two journals) 146 | 147 | Journal write rate: $journal_page_rate page/sec ($journal_rate byte/sec) 148 | EOF 149 | 150 | sub usage { 151 | system("perldoc $0"); 152 | exit(1); 153 | } 154 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/examples/stripes.pl.in: -------------------------------------------------------------------------------- 1 | #! @PERL@ 2 | use lib qw( @prefix@/lib/perl ); 3 | 4 | use strict; 5 | use vars qw(@ISA $loaded); 6 | 7 | use RRDs; 8 | my $start=time; 9 | my $rrd="random.rrd"; 10 | RRDs::create ($rrd, "--start",$start-1, "--step",300, 11 | "DS:a:GAUGE:600:U:U", 12 | "DS:b:GAUGE:600:U:U", 13 | "RRA:AVERAGE:0.5:1:200"); 14 | my $ERROR = RRDs::error; 15 | die "$0: unable to create `$rrd': $ERROR\n" if $ERROR; 16 | my $t; 17 | for ($t=$start; $t<$start+200*300; $t+=300){ 18 | RRDs::update $rrd, "$t:".rand(100).":".(sin($t/800)*50+50); 19 | if ($ERROR = RRDs::error) { 20 | die "$0: unable to update `$rrd': $ERROR\n"; 21 | } 22 | } 23 | RRDs::graph "stripes.png", 24 | "--title", "Stripes Demo", 25 | "--start", $start, 26 | "--end", "start + 400 min", 27 | "--interlace", 28 | "--imgformat","PNG", 29 | "--width=450", 30 | "DEF:a=$rrd:a:AVERAGE", 31 | "DEF:b=$rrd:b:AVERAGE", 32 | "CDEF:alpha=TIME,1200,%,600,LT,a,UNKN,IF", 33 | "CDEF:beta=TIME,1200,%,600,GE,b,UNKN,IF", 34 | "AREA:alpha#0022e9:alpha", 35 | "AREA:beta#00b674:beta", 36 | "LINE1:b#ff4400:beta envelope\\c", 37 | "COMMENT:\\s", 38 | "COMMENT:alpha=TIME,1200,%,600,LT,a,UNKN,IF", 39 | "COMMENT:beta=TIME,1200,%,600,GE,b,UNKN,IF\\j"; 40 | if ($ERROR = RRDs::error) { 41 | die "ERROR: $ERROR\n"; 42 | }; 43 | 44 | 45 | print "This script has created stripes.png in the current directory\n"; 46 | print "This demonstrates the use of the TIME and % RPN operators\n"; 47 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pbanaszkiewicz/python-rrdtool/fc39e4d06bd279fb1780a240a1f18989ba57e9e0/rrdtool-1.4.7/favicon.ico -------------------------------------------------------------------------------- /rrdtool-1.4.7/m4/intlmacosx.m4: -------------------------------------------------------------------------------- 1 | # intlmacosx.m4 serial 1 (gettext-0.17) 2 | dnl Copyright (C) 2004-2007 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | dnl 7 | dnl This file can can be used in projects which are not available under 8 | dnl the GNU General Public License or the GNU Library General Public 9 | dnl License but which still want to provide support for the GNU gettext 10 | dnl functionality. 11 | dnl Please note that the actual code of the GNU gettext library is covered 12 | dnl by the GNU Library General Public License, and the rest of the GNU 13 | dnl gettext package package is covered by the GNU General Public License. 14 | dnl They are *not* in the public domain. 15 | 16 | dnl Checks for special options needed on MacOS X. 17 | dnl Defines INTL_MACOSX_LIBS. 18 | AC_DEFUN([gt_INTL_MACOSX], 19 | [ 20 | dnl Check for API introduced in MacOS X 10.2. 21 | AC_CACHE_CHECK([for CFPreferencesCopyAppValue], 22 | gt_cv_func_CFPreferencesCopyAppValue, 23 | [gt_save_LIBS="$LIBS" 24 | LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" 25 | AC_TRY_LINK([#include ], 26 | [CFPreferencesCopyAppValue(NULL, NULL)], 27 | [gt_cv_func_CFPreferencesCopyAppValue=yes], 28 | [gt_cv_func_CFPreferencesCopyAppValue=no]) 29 | LIBS="$gt_save_LIBS"]) 30 | if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then 31 | AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1, 32 | [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) 33 | fi 34 | dnl Check for API introduced in MacOS X 10.3. 35 | AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent, 36 | [gt_save_LIBS="$LIBS" 37 | LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" 38 | AC_TRY_LINK([#include ], [CFLocaleCopyCurrent();], 39 | [gt_cv_func_CFLocaleCopyCurrent=yes], 40 | [gt_cv_func_CFLocaleCopyCurrent=no]) 41 | LIBS="$gt_save_LIBS"]) 42 | if test $gt_cv_func_CFLocaleCopyCurrent = yes; then 43 | AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1, 44 | [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) 45 | fi 46 | INTL_MACOSX_LIBS= 47 | if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then 48 | INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" 49 | fi 50 | AC_SUBST([INTL_MACOSX_LIBS]) 51 | ]) 52 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/m4/lib-ld.m4: -------------------------------------------------------------------------------- 1 | # lib-ld.m4 serial 3 (gettext-0.13) 2 | dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | dnl Subroutines of libtool.m4, 8 | dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision 9 | dnl with libtool.m4. 10 | 11 | dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. 12 | AC_DEFUN([AC_LIB_PROG_LD_GNU], 13 | [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, 14 | [# I'd rather use --version here, but apparently some GNU ld's only accept -v. 15 | case `$LD -v 2>&1 conf$$.sh 35 | echo "exit 0" >>conf$$.sh 36 | chmod +x conf$$.sh 37 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then 38 | PATH_SEPARATOR=';' 39 | else 40 | PATH_SEPARATOR=: 41 | fi 42 | rm -f conf$$.sh 43 | fi 44 | ac_prog=ld 45 | if test "$GCC" = yes; then 46 | # Check if gcc -print-prog-name=ld gives a path. 47 | AC_MSG_CHECKING([for ld used by GCC]) 48 | case $host in 49 | *-*-mingw*) 50 | # gcc leaves a trailing carriage return which upsets mingw 51 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 52 | *) 53 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 54 | esac 55 | case $ac_prog in 56 | # Accept absolute paths. 57 | [[\\/]* | [A-Za-z]:[\\/]*)] 58 | [re_direlt='/[^/][^/]*/\.\./'] 59 | # Canonicalize the path of ld 60 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` 61 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 62 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` 63 | done 64 | test -z "$LD" && LD="$ac_prog" 65 | ;; 66 | "") 67 | # If it fails, then pretend we aren't using GCC. 68 | ac_prog=ld 69 | ;; 70 | *) 71 | # If it is relative, then search for the first ld in PATH. 72 | with_gnu_ld=unknown 73 | ;; 74 | esac 75 | elif test "$with_gnu_ld" = yes; then 76 | AC_MSG_CHECKING([for GNU ld]) 77 | else 78 | AC_MSG_CHECKING([for non-GNU ld]) 79 | fi 80 | AC_CACHE_VAL(acl_cv_path_LD, 81 | [if test -z "$LD"; then 82 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" 83 | for ac_dir in $PATH; do 84 | test -z "$ac_dir" && ac_dir=. 85 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 86 | acl_cv_path_LD="$ac_dir/$ac_prog" 87 | # Check to see if the program is GNU ld. I'd rather use --version, 88 | # but apparently some GNU ld's only accept -v. 89 | # Break only if it was the GNU/non-GNU ld that we prefer. 90 | case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in 91 | *GNU* | *'with BFD'*) 92 | test "$with_gnu_ld" != no && break ;; 93 | *) 94 | test "$with_gnu_ld" != yes && break ;; 95 | esac 96 | fi 97 | done 98 | IFS="$ac_save_ifs" 99 | else 100 | acl_cv_path_LD="$LD" # Let the user override the test with a path. 101 | fi]) 102 | LD="$acl_cv_path_LD" 103 | if test -n "$LD"; then 104 | AC_MSG_RESULT($LD) 105 | else 106 | AC_MSG_RESULT(no) 107 | fi 108 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 109 | AC_LIB_PROG_LD_GNU 110 | ]) 111 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/m4/ltversion.m4: -------------------------------------------------------------------------------- 1 | # ltversion.m4 -- version numbers -*- Autoconf -*- 2 | # 3 | # Copyright (C) 2004 Free Software Foundation, Inc. 4 | # Written by Scott James Remnant, 2004 5 | # 6 | # This file is free software; the Free Software Foundation gives 7 | # unlimited permission to copy and/or distribute it, with or without 8 | # modifications, as long as this notice is preserved. 9 | 10 | # Generated from ltversion.in. 11 | 12 | # serial 3012 ltversion.m4 13 | # This file is part of GNU Libtool 14 | 15 | m4_define([LT_PACKAGE_VERSION], [2.2.6]) 16 | m4_define([LT_PACKAGE_REVISION], [1.3012]) 17 | 18 | AC_DEFUN([LTVERSION_VERSION], 19 | [macro_version='2.2.6' 20 | macro_revision='1.3012' 21 | _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 22 | _LT_DECL(, macro_revision, 0) 23 | ]) 24 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/m4/nls.m4: -------------------------------------------------------------------------------- 1 | # nls.m4 serial 3 (gettext-0.15) 2 | dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | dnl 7 | dnl This file can can be used in projects which are not available under 8 | dnl the GNU General Public License or the GNU Library General Public 9 | dnl License but which still want to provide support for the GNU gettext 10 | dnl functionality. 11 | dnl Please note that the actual code of the GNU gettext library is covered 12 | dnl by the GNU Library General Public License, and the rest of the GNU 13 | dnl gettext package package is covered by the GNU General Public License. 14 | dnl They are *not* in the public domain. 15 | 16 | dnl Authors: 17 | dnl Ulrich Drepper , 1995-2000. 18 | dnl Bruno Haible , 2000-2003. 19 | 20 | AC_PREREQ(2.50) 21 | 22 | AC_DEFUN([AM_NLS], 23 | [ 24 | AC_MSG_CHECKING([whether NLS is requested]) 25 | dnl Default is enabled NLS 26 | AC_ARG_ENABLE(nls, 27 | [ --disable-nls do not use Native Language Support], 28 | USE_NLS=$enableval, USE_NLS=yes) 29 | AC_MSG_RESULT($USE_NLS) 30 | AC_SUBST(USE_NLS) 31 | ]) 32 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/m4/progtest.m4: -------------------------------------------------------------------------------- 1 | # progtest.m4 serial 4 (gettext-0.14.2) 2 | dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | dnl 7 | dnl This file can can be used in projects which are not available under 8 | dnl the GNU General Public License or the GNU Library General Public 9 | dnl License but which still want to provide support for the GNU gettext 10 | dnl functionality. 11 | dnl Please note that the actual code of the GNU gettext library is covered 12 | dnl by the GNU Library General Public License, and the rest of the GNU 13 | dnl gettext package package is covered by the GNU General Public License. 14 | dnl They are *not* in the public domain. 15 | 16 | dnl Authors: 17 | dnl Ulrich Drepper , 1996. 18 | 19 | AC_PREREQ(2.50) 20 | 21 | # Search path for a program which passes the given test. 22 | 23 | dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, 24 | dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) 25 | AC_DEFUN([AM_PATH_PROG_WITH_TEST], 26 | [ 27 | # Prepare PATH_SEPARATOR. 28 | # The user is always right. 29 | if test "${PATH_SEPARATOR+set}" != set; then 30 | echo "#! /bin/sh" >conf$$.sh 31 | echo "exit 0" >>conf$$.sh 32 | chmod +x conf$$.sh 33 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then 34 | PATH_SEPARATOR=';' 35 | else 36 | PATH_SEPARATOR=: 37 | fi 38 | rm -f conf$$.sh 39 | fi 40 | 41 | # Find out how to test for executable files. Don't use a zero-byte file, 42 | # as systems may use methods other than mode bits to determine executability. 43 | cat >conf$$.file <<_ASEOF 44 | #! /bin/sh 45 | exit 0 46 | _ASEOF 47 | chmod +x conf$$.file 48 | if test -x conf$$.file >/dev/null 2>&1; then 49 | ac_executable_p="test -x" 50 | else 51 | ac_executable_p="test -f" 52 | fi 53 | rm -f conf$$.file 54 | 55 | # Extract the first word of "$2", so it can be a program name with args. 56 | set dummy $2; ac_word=[$]2 57 | AC_MSG_CHECKING([for $ac_word]) 58 | AC_CACHE_VAL(ac_cv_path_$1, 59 | [case "[$]$1" in 60 | [[\\/]]* | ?:[[\\/]]*) 61 | ac_cv_path_$1="[$]$1" # Let the user override the test with a path. 62 | ;; 63 | *) 64 | ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR 65 | for ac_dir in ifelse([$5], , $PATH, [$5]); do 66 | IFS="$ac_save_IFS" 67 | test -z "$ac_dir" && ac_dir=. 68 | for ac_exec_ext in '' $ac_executable_extensions; do 69 | if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then 70 | echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD 71 | if [$3]; then 72 | ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" 73 | break 2 74 | fi 75 | fi 76 | done 77 | done 78 | IFS="$ac_save_IFS" 79 | dnl If no 4th arg is given, leave the cache variable unset, 80 | dnl so AC_PATH_PROGS will keep looking. 81 | ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" 82 | ])dnl 83 | ;; 84 | esac])dnl 85 | $1="$ac_cv_path_$1" 86 | if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then 87 | AC_MSG_RESULT([$]$1) 88 | else 89 | AC_MSG_RESULT(no) 90 | fi 91 | AC_SUBST($1)dnl 92 | ]) 93 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/po/ChangeLog: -------------------------------------------------------------------------------- 1 | 2009-05-26 gettextize 2 | 3 | * Makefile.in.in: New file, from gettext-0.17. 4 | * Rules-quot: New file, from gettext-0.17. 5 | * boldquot.sed: New file, from gettext-0.17. 6 | * en@boldquot.header: New file, from gettext-0.17. 7 | * en@quot.header: New file, from gettext-0.17. 8 | * insert-header.sin: New file, from gettext-0.17. 9 | * quot.sed: New file, from gettext-0.17. 10 | * remove-potcdate.sin: New file, from gettext-0.17. 11 | * POTFILES.in: New file. 12 | 13 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/po/LINGUAS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pbanaszkiewicz/python-rrdtool/fc39e4d06bd279fb1780a240a1f18989ba57e9e0/rrdtool-1.4.7/po/LINGUAS -------------------------------------------------------------------------------- /rrdtool-1.4.7/po/Makevars: -------------------------------------------------------------------------------- 1 | # Makefile variables for PO directory in any package using GNU gettext. 2 | 3 | # Usually the message domain is the same as the package name. 4 | DOMAIN = $(PACKAGE) 5 | 6 | # These two variables depend on the location of this directory. 7 | subdir = po 8 | top_builddir = .. 9 | 10 | # These options get passed to xgettext. 11 | XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ 12 | 13 | # This is the copyright holder that gets inserted into the header of the 14 | # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding 15 | # package. (Note that the msgstr strings, extracted from the package's 16 | # sources, belong to the copyright holder of the package.) Translators are 17 | # expected to transfer the copyright for their translations to this person 18 | # or entity, or to disclaim their copyright. The empty string stands for 19 | # the public domain; in this case the translators are expected to disclaim 20 | # their copyright. 21 | COPYRIGHT_HOLDER = Tobias Oetiker 22 | 23 | # This is the email address or URL to which the translators shall report 24 | # bugs in the untranslated strings: 25 | # - Strings which are not entire sentences, see the maintainer guidelines 26 | # in the GNU gettext documentation, section 'Preparing Strings'. 27 | # - Strings which use unclear terms or require additional context to be 28 | # understood. 29 | # - Strings which make invalid assumptions about notation of date, time or 30 | # money. 31 | # - Pluralisation problems. 32 | # - Incorrect English spelling. 33 | # - Incorrect formatting. 34 | # It can be your email address, or a mailing list address where translators 35 | # can write to without being subscribed, or the URL of a web page through 36 | # which the translators can contact you. 37 | MSGID_BUGS_ADDRESS = http://oss.oetiker.ch/rrdtool-trac/newticket 38 | 39 | # This is the list of locale categories, beyond LC_MESSAGES, for which the 40 | # message catalogs shall be used. It is usually empty. 41 | EXTRA_LOCALE_CATEGORIES = 42 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/po/POTFILES.in: -------------------------------------------------------------------------------- 1 | src/rrd_getopt.c 2 | src/rrd_tool.c 3 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/po/Rules-quot: -------------------------------------------------------------------------------- 1 | # Special Makefile rules for English message catalogs with quotation marks. 2 | 3 | DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot 4 | 5 | .SUFFIXES: .insert-header .po-update-en 6 | 7 | en@quot.po-create: 8 | $(MAKE) en@quot.po-update 9 | en@boldquot.po-create: 10 | $(MAKE) en@boldquot.po-update 11 | 12 | en@quot.po-update: en@quot.po-update-en 13 | en@boldquot.po-update: en@boldquot.po-update-en 14 | 15 | .insert-header.po-update-en: 16 | @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ 17 | if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ 18 | tmpdir=`pwd`; \ 19 | echo "$$lang:"; \ 20 | ll=`echo $$lang | sed -e 's/@.*//'`; \ 21 | LC_ALL=C; export LC_ALL; \ 22 | cd $(srcdir); \ 23 | if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \ 24 | if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ 25 | rm -f $$tmpdir/$$lang.new.po; \ 26 | else \ 27 | if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ 28 | :; \ 29 | else \ 30 | echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ 31 | exit 1; \ 32 | fi; \ 33 | fi; \ 34 | else \ 35 | echo "creation of $$lang.po failed!" 1>&2; \ 36 | rm -f $$tmpdir/$$lang.new.po; \ 37 | fi 38 | 39 | en@quot.insert-header: insert-header.sin 40 | sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header 41 | 42 | en@boldquot.insert-header: insert-header.sin 43 | sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header 44 | 45 | mostlyclean: mostlyclean-quot 46 | mostlyclean-quot: 47 | rm -f *.insert-header 48 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/po/boldquot.sed: -------------------------------------------------------------------------------- 1 | s/"\([^"]*\)"/“\1”/g 2 | s/`\([^`']*\)'/‘\1’/g 3 | s/ '\([^`']*\)' / ‘\1’ /g 4 | s/ '\([^`']*\)'$/ ‘\1’/g 5 | s/^'\([^`']*\)' /‘\1’ /g 6 | s/“”/""/g 7 | s/“/“/g 8 | s/”/”/g 9 | s/‘/‘/g 10 | s/’/’/g 11 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/po/en@boldquot.header: -------------------------------------------------------------------------------- 1 | # All this catalog "translates" are quotation characters. 2 | # The msgids must be ASCII and therefore cannot contain real quotation 3 | # characters, only substitutes like grave accent (0x60), apostrophe (0x27) 4 | # and double quote (0x22). These substitutes look strange; see 5 | # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html 6 | # 7 | # This catalog translates grave accent (0x60) and apostrophe (0x27) to 8 | # left single quotation mark (U+2018) and right single quotation mark (U+2019). 9 | # It also translates pairs of apostrophe (0x27) to 10 | # left single quotation mark (U+2018) and right single quotation mark (U+2019) 11 | # and pairs of quotation mark (0x22) to 12 | # left double quotation mark (U+201C) and right double quotation mark (U+201D). 13 | # 14 | # When output to an UTF-8 terminal, the quotation characters appear perfectly. 15 | # When output to an ISO-8859-1 terminal, the single quotation marks are 16 | # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to 17 | # grave/acute accent (by libiconv), and the double quotation marks are 18 | # transliterated to 0x22. 19 | # When output to an ASCII terminal, the single quotation marks are 20 | # transliterated to apostrophes, and the double quotation marks are 21 | # transliterated to 0x22. 22 | # 23 | # This catalog furthermore displays the text between the quotation marks in 24 | # bold face, assuming the VT100/XTerm escape sequences. 25 | # 26 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/po/en@quot.header: -------------------------------------------------------------------------------- 1 | # All this catalog "translates" are quotation characters. 2 | # The msgids must be ASCII and therefore cannot contain real quotation 3 | # characters, only substitutes like grave accent (0x60), apostrophe (0x27) 4 | # and double quote (0x22). These substitutes look strange; see 5 | # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html 6 | # 7 | # This catalog translates grave accent (0x60) and apostrophe (0x27) to 8 | # left single quotation mark (U+2018) and right single quotation mark (U+2019). 9 | # It also translates pairs of apostrophe (0x27) to 10 | # left single quotation mark (U+2018) and right single quotation mark (U+2019) 11 | # and pairs of quotation mark (0x22) to 12 | # left double quotation mark (U+201C) and right double quotation mark (U+201D). 13 | # 14 | # When output to an UTF-8 terminal, the quotation characters appear perfectly. 15 | # When output to an ISO-8859-1 terminal, the single quotation marks are 16 | # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to 17 | # grave/acute accent (by libiconv), and the double quotation marks are 18 | # transliterated to 0x22. 19 | # When output to an ASCII terminal, the single quotation marks are 20 | # transliterated to apostrophes, and the double quotation marks are 21 | # transliterated to 0x22. 22 | # 23 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/po/insert-header.sin: -------------------------------------------------------------------------------- 1 | # Sed script that inserts the file called HEADER before the header entry. 2 | # 3 | # At each occurrence of a line starting with "msgid ", we execute the following 4 | # commands. At the first occurrence, insert the file. At the following 5 | # occurrences, do nothing. The distinction between the first and the following 6 | # occurrences is achieved by looking at the hold space. 7 | /^msgid /{ 8 | x 9 | # Test if the hold space is empty. 10 | s/m/m/ 11 | ta 12 | # Yes it was empty. First occurrence. Read the file. 13 | r HEADER 14 | # Output the file's contents by reading the next line. But don't lose the 15 | # current line while doing this. 16 | g 17 | N 18 | bb 19 | :a 20 | # The hold space was nonempty. Following occurrences. Do nothing. 21 | x 22 | :b 23 | } 24 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/po/quot.sed: -------------------------------------------------------------------------------- 1 | s/"\([^"]*\)"/“\1”/g 2 | s/`\([^`']*\)'/‘\1’/g 3 | s/ '\([^`']*\)' / ‘\1’ /g 4 | s/ '\([^`']*\)'$/ ‘\1’/g 5 | s/^'\([^`']*\)' /‘\1’ /g 6 | s/“”/""/g 7 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/po/remove-potcdate.sin: -------------------------------------------------------------------------------- 1 | # Sed script that remove the POT-Creation-Date line in the header entry 2 | # from a POT file. 3 | # 4 | # The distinction between the first and the following occurrences of the 5 | # pattern is achieved by looking at the hold space. 6 | /^"POT-Creation-Date: .*"$/{ 7 | x 8 | # Test if the hold space is empty. 9 | s/P/P/ 10 | ta 11 | # Yes it was empty. First occurrence. Remove the line. 12 | g 13 | d 14 | bb 15 | :a 16 | # The hold space was nonempty. Following occurrences. Do nothing. 17 | x 18 | :b 19 | } 20 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/po/stamp-po: -------------------------------------------------------------------------------- 1 | timestamp 2 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/src/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | 3 | #AUTOMAKE_OPTIONS = foreign 4 | # 5 | #ACLOCAL_M4 = $(top_srcdir)/config/aclocal.m4 6 | #AUTOHEADER = @AUTOHEADER@ --localdir=$(top_srcdir)/config 7 | 8 | if STATIC_PROGRAMS 9 | AM_LDFLAGS = -all-static 10 | endif 11 | 12 | INCLUDES = -DLOCALEDIR="\"$(datadir)/locale\"" 13 | RRD_DEFAULT_FONT=@RRD_DEFAULT_FONT@ 14 | AM_CPPFLAGS = -DRRD_DEFAULT_FONT=\"$(RRD_DEFAULT_FONT)\" -DNUMVERS=@NUMVERS@ 15 | AM_CFLAGS = @CFLAGS@ 16 | ## no including this by default @WERROR@ 17 | 18 | UPD_C_FILES = \ 19 | rrd_parsetime.c \ 20 | rrd_hw.c \ 21 | rrd_hw_math.c \ 22 | rrd_hw_update.c \ 23 | rrd_diff.c \ 24 | rrd_format.c \ 25 | rrd_info.c \ 26 | rrd_error.c \ 27 | rrd_open.c \ 28 | rrd_client.c \ 29 | rrd_nan_inf.c \ 30 | rrd_rpncalc.c \ 31 | rrd_utils.c \ 32 | rrd_update.c 33 | 34 | RRD_C_FILES = \ 35 | rrd_create.c \ 36 | hash_32.c \ 37 | rrd_version.c \ 38 | rrd_last.c \ 39 | rrd_lastupdate.c \ 40 | rrd_first.c \ 41 | rrd_restore.c \ 42 | rrd_dump.c \ 43 | rrd_flushcached.c \ 44 | rrd_fetch.c \ 45 | rrd_resize.c \ 46 | rrd_tune.c 47 | 48 | if BUILD_RRDGRAPH 49 | RRD_C_FILES += rrd_graph.c \ 50 | rrd_graph_helper.c \ 51 | rrd_xport.c \ 52 | rrd_gfx.c \ 53 | pngsize.c 54 | endif 55 | 56 | noinst_HEADERS = \ 57 | unused.h \ 58 | gettext.h \ 59 | rrd_getopt.h rrd_parsetime.h \ 60 | rrd_config_bottom.h rrd_i18n.h \ 61 | rrd_format.h rrd_tool.h rrd_xport.h rrd.h rrd_rpncalc.h \ 62 | rrd_hw.h rrd_hw_math.h rrd_hw_update.h \ 63 | fnv.h rrd_graph.h \ 64 | rrd_is_thread_safe.h 65 | 66 | if BUILD_LIBDBI 67 | RRD_C_FILES += rrd_fetch_libdbi.c 68 | endif 69 | 70 | if BUILD_GETOPT 71 | noinst_HEADERS += rrd_getopt.h 72 | UPD_C_FILES += rrd_getopt.c rrd_getopt1.c 73 | endif 74 | 75 | noinst_LTLIBRARIES = librrdupd.la 76 | 77 | lib_LTLIBRARIES = librrd.la 78 | if BUILD_MULTITHREAD 79 | lib_LTLIBRARIES += librrd_th.la 80 | endif 81 | 82 | librrdupd_la_SOURCES = $(UPD_C_FILES) rrd_not_thread_safe.c 83 | librrdupd_la_LIBADD = $(CORE_LIBS) 84 | 85 | librrd_la_SOURCES = $(RRD_C_FILES) 86 | librrd_la_DEPENDENCIES = librrdupd.la librrd.sym 87 | librrd_la_LIBADD = librrdupd.la $(ALL_LIBS) $(LIBINTL) 88 | librrd_la_LDFLAGS = -version-info @LIBVERS@ 89 | librrd_la_LDFLAGS += -export-symbols librrd.sym 90 | 91 | librrd_th_la_SOURCES = $(UPD_C_FILES) $(RRD_C_FILES) rrd_thread_safe.c 92 | librrd_th_la_DEPENDENCIES = librrd.sym 93 | librrd_th_la_CFLAGS = $(AM_CFLAGS) $(MULTITHREAD_CFLAGS) 94 | librrd_th_la_LDFLAGS = $(MULTITHREAD_LDFLAGS) -version-info @LIBVERS@ 95 | librrd_th_la_LDFLAGS += -export-symbols librrd.sym 96 | librrd_th_la_LIBADD = $(ALL_LIBS) $(LIBINTL) 97 | 98 | include_HEADERS = rrd.h rrd_format.h rrd_client.h 99 | 100 | bin_PROGRAMS = rrdtool rrdupdate rrdcached 101 | 102 | if BUILD_RRDCGI 103 | bin_PROGRAMS += rrdcgi 104 | endif 105 | 106 | rrdcgi_SOURCES = rrd_cgi.c 107 | rrdcgi_LDADD = librrd.la 108 | 109 | rrdupdate_SOURCES = rrdupdate.c 110 | rrdupdate_LDADD = librrdupd.la 111 | 112 | rrdtool_SOURCES = rrd_tool.c 113 | rrdtool_DEPENDENCIES = librrd.la 114 | rrdtool_LDADD = librrd.la 115 | 116 | rrdcached_SOURCES = rrd_daemon.c 117 | rrdcached_DEPENDENCIES = librrd_th.la 118 | rrdcached_CPPFLAGS = -DVERSION='"$(VERSION)"' -DLOCALSTATEDIR='"$(localstatedir)"' 119 | rrdcached_LDADD = librrd_th.la 120 | 121 | pkgconfigdir = $(libdir)/pkgconfig 122 | pkgconfig_DATA = librrd.pc 123 | 124 | # strftime is here because we do not usually need it. unices have propper 125 | # iso date support 126 | EXTRA_DIST= librrd.pc.in strftime.c strftime.h rrd_getopt.c rrd_getopt1.c rrd_getopt.h \ 127 | win32comp.c rrd_thread_safe_nt.c get_ver.awk librrd.sym.in.in plbasename.c plbasename.h 128 | 129 | 130 | librrd.sym: librrd.sym.in 131 | $(AM_V_GEN)grep -v LIBC_HAS_GETOPT_LONG librrd.sym.in >$@ 132 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/src/fnv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * fnv - Fowler/Noll/Vo- hash code 3 | * 4 | * @(#) $Revision: 1306 $ 5 | * @(#) $Id: fnv.h 1306 2008-03-15 10:39:48Z oetiker $ 6 | * @(#) $Source$ 7 | * 8 | *** 9 | * 10 | * Fowler/Noll/Vo- hash 11 | * 12 | * The basis of this hash algorithm was taken from an idea sent 13 | * as reviewer comments to the IEEE POSIX P1003.2 committee by: 14 | * 15 | * Phong Vo (http://www.research.att.com/info/kpv/) 16 | * Glenn Fowler (http://www.research.att.com/~gsf/) 17 | * 18 | * In a subsequent ballot round: 19 | * 20 | * Landon Curt Noll (http://reality.sgi.com/chongo/) 21 | * 22 | * improved on their algorithm. Some people tried this hash 23 | * and found that it worked rather well. In an EMail message 24 | * to Landon, they named it the ``Fowler/Noll/Vo'' or FNV hash. 25 | * 26 | * FNV hashes are architected to be fast while maintaining a low 27 | * collision rate. The FNV speed allows one to quickly hash lots 28 | * of data while maintaining a reasonable collision rate. See: 29 | * 30 | * http://reality.sgi.com/chongo/tech/comp/fnv/ 31 | * 32 | * for more details as well as other forms of the FNV hash. 33 | * 34 | *** 35 | * 36 | * NOTE: The FNV-0 historic hash is not recommended. One should use 37 | * the FNV-1 hash instead. 38 | * 39 | * To use the 32 bit FNV-0 historic hash, pass FNV0_32_INIT as the 40 | * Fnv32_t hashval argument to fnv_32_buf() or fnv_32_str(). 41 | * 42 | * To use the 64 bit FNV-0 historic hash, pass FNV0_64_INIT as the 43 | * Fnv64_t hashval argument to fnv_64_buf() or fnv_64_str(). 44 | * 45 | * To use the recommended 32 bit FNV-1 hash, pass FNV1_32_INIT as the 46 | * Fnv32_t hashval argument to fnv_32_buf() or fnv_32_str(). 47 | * 48 | * To use the recommended 64 bit FNV-1 hash, pass FNV1_64_INIT as the 49 | * Fnv64_t hashval argument to fnv_64_buf() or fnv_64_str(). 50 | * 51 | *** 52 | * 53 | * Please do not copyright this code. This code is in the public domain. 54 | * 55 | * LANDON CURT NOLL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 56 | * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO 57 | * EVENT SHALL LANDON CURT NOLL BE LIABLE FOR ANY SPECIAL, INDIRECT OR 58 | * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF 59 | * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 60 | * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 61 | * PERFORMANCE OF THIS SOFTWARE. 62 | * 63 | * By: 64 | * chongo /\oo/\ 65 | * http://reality.sgi.com/chongo/ 66 | * EMail: chongo_fnv at prime dot engr dot sgi dot com 67 | * 68 | * Share and Enjoy! :-) 69 | */ 70 | 71 | #if !defined(__FNV_H__) 72 | #define __FNV_H__ 73 | 74 | 75 | /* 76 | * 32 bit FNV-0 hash type 77 | */ 78 | typedef unsigned long Fnv32_t; 79 | 80 | 81 | /* 82 | * 32 bit FNV-0 zero initial basis 83 | * 84 | * This historic hash is not recommended. One should use 85 | * the FNV-1 hash and inital basis instead. 86 | */ 87 | #define FNV0_32_INIT ((Fnv32_t)0) 88 | 89 | 90 | /* 91 | * 32 bit FNV-1 non-zero initial basis 92 | * 93 | * The FNV-1 initial basis is the FNV-0 hash of the following 32 octets: 94 | * 95 | * chongo /\../\ 96 | * 97 | * Note that the \'s above are not back-slashing escape characters. 98 | * They are literal ASCII backslash 0x5c characters. 99 | */ 100 | #define FNV1_32_INIT ((Fnv32_t)0x811c9dc5) 101 | 102 | Fnv32_t fnv_32_buf( 103 | const void *, 104 | size_t, 105 | Fnv32_t); 106 | 107 | Fnv32_t fnv_32_str( 108 | const char *, 109 | Fnv32_t); 110 | 111 | unsigned long FnvHash( 112 | const char *); 113 | 114 | #endif /* __FNV_H__ */ 115 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/src/get_ver.awk: -------------------------------------------------------------------------------- 1 | # **************************************************************************** 2 | # RRDtool 1.2.19 Copyright by Tobi Oetiker, 1997-2007 3 | # **************************************************************************** 4 | # get_ver.awk AWK Script for non-configure builds 5 | # **************************************************************************** 6 | # $Id: get_ver.awk 1000 2007-14-02 05:51:34Z oetiker $ 7 | # **************************************************************************** 8 | BEGIN { 9 | # fetch rrdtool version number from input file and write them to STDOUT 10 | while ((getline < ARGV[1]) > 0) { 11 | if (match ($0, /^AC_INIT/)) { 12 | split($1, t, ","); 13 | my_ver_str = substr(t[2],2,length(t[2])-3); 14 | split(my_ver_str, v, "."); 15 | gsub("[^0-9].*$", "", v[3]); 16 | my_ver = v[1] "," v[2] "," v[3]; 17 | } 18 | if (match ($0, /^NUMVERS=/)) { 19 | split($1, t, "="); 20 | my_ver_num = t[2]; 21 | } 22 | } 23 | # read from from input file, replace placeholders, and write to STDOUT 24 | if (ARGV[2]) { 25 | while ((getline < ARGV[2]) > 0) { 26 | if (match ($0, /@@NUMVERS@@/)) { 27 | gsub("@@NUMVERS@@", my_ver_num, $0); 28 | } 29 | if (match ($0, /@@PACKAGE_VERSION@@/)) { 30 | gsub("@@PACKAGE_VERSION@@", "" my_ver_str "", $0); 31 | } 32 | print; 33 | } 34 | } else { 35 | print "RRD_VERSION = " my_ver ""; 36 | print "RRD_VERSION_STR = " my_ver_str ""; 37 | print "RRD_NUMVERS = " my_ver_num ""; 38 | } 39 | } 40 | 41 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/src/librrd.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: librrd 7 | Description: Library for the RRDtool 8 | Version: @PACKAGE_VERSION@ 9 | Libs: -L${libdir} -lrrd 10 | Cflags: -I${includedir} 11 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/src/librrd.sym.in.in: -------------------------------------------------------------------------------- 1 | rrd_add_ptr 2 | rrd_add_strdup 3 | rrd_clear_error 4 | rrd_close 5 | rrd_create 6 | rrd_create_r 7 | rrd_dontneed 8 | rrd_dump 9 | rrd_dump_r 10 | rrd_dump_cb_r 11 | rrd_fetch 12 | rrd_fetch_r 13 | rrd_flushcached 14 | rrd_first 15 | rrd_first_r 16 | rrd_flush 17 | rrd_free 18 | rrd_free_context 19 | rrd_free_ptrs 20 | rrd_freemem 21 | rrd_get_context 22 | rrd_get_error 23 | rrd_graph 24 | rrd_graph_v 25 | rrd_info 26 | rrd_info_free 27 | rrd_info_print 28 | rrd_info_push 29 | rrd_info_r 30 | rrd_init 31 | rrd_last 32 | rrd_last_r 33 | rrd_lastupdate 34 | rrd_lastupdate_r 35 | rrd_lock 36 | rrd_mkdir_p 37 | rrd_new_context 38 | rrd_open 39 | rrd_parsetime 40 | rrd_proc_start_end 41 | rrd_random 42 | rrd_read 43 | rrd_resize 44 | rrd_restore 45 | rrd_seek 46 | rrd_set_error 47 | rrd_set_to_DINF 48 | rrd_set_to_DNAN 49 | rrd_strerror 50 | rrd_strversion 51 | rrd_tell 52 | rrd_test_error 53 | rrd_tune 54 | rrd_update 55 | rrd_update_r 56 | rrd_update_v 57 | rrd_version 58 | rrd_write 59 | rrd_xport 60 | rrdc_connect 61 | rrdc_is_connected 62 | rrdc_disconnect 63 | rrdc_flush 64 | rrdc_stats_free 65 | rrdc_stats_get 66 | rrdc_update 67 | @RRD_GETOPT_LONG@ 68 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/src/plbasename.h: -------------------------------------------------------------------------------- 1 | #ifdef WIN32 2 | /* 3 | * 4 | * Cross-platform basename/dirname 5 | * 6 | * Copyright 2005 Syd Logan, All Rights Reserved 7 | * 8 | * This code is distributed without warranty. You are free to use this 9 | * code for any purpose, however, if this code is republished or 10 | * redistributed in its original form, as hardcopy or electronically, 11 | * then you must include this copyright notice along with the code. 12 | * 13 | */ 14 | 15 | // minor changes 2008 by Stefan Ludewig stefan.ludewig@exitgames.com for WIN32 version RRDtool 16 | 17 | #if !defined(__PL_BASENAME_H__) 18 | #define __PL_BASENAME_H__ 19 | 20 | /* 21 | path dirname basename 22 | "/usr/lib" "/usr" "lib" 23 | "/usr/" "/" "usr" 24 | "usr" "." "usr" 25 | "/" "/" "/" 26 | "." "." "." 27 | ".." "." ".." 28 | */ 29 | 30 | #if defined(__cplusplus) 31 | extern "C" { 32 | #endif 33 | 34 | const char *PL_basename(const char *name); 35 | const char *PL_dirname(const char *name); 36 | 37 | #define basename(name) ((char*)PL_basename(name)) 38 | #define dirname(name) ((char*)PL_dirname(name)) 39 | 40 | #if defined(__cplusplus) 41 | } 42 | #endif 43 | 44 | #endif 45 | #endif // WIN32 46 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/src/pngsize.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 3 | ***************************************************************************** 4 | * pngsize.c determine the size of a PNG image 5 | *****************************************************************************/ 6 | 7 | #include 8 | #include "rrd_tool.h" 9 | 10 | int PngSize( 11 | FILE * fd, 12 | long *width, 13 | long *height) 14 | { 15 | png_structp png_read_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, 16 | (png_voidp) NULL, 17 | /* we would need to point to error handlers 18 | here to do it properly */ 19 | (png_error_ptr) NULL, 20 | (png_error_ptr) NULL); 21 | 22 | png_infop info_ptr = png_create_info_struct(png_read_ptr); 23 | 24 | (*width) = 0; 25 | (*height) = 0; 26 | 27 | /* this is to make compile on aix work since they seem to define jmpbuf 28 | to be _jmpbuf which breaks compilation */ 29 | 30 | #ifndef png_jmpbuf 31 | #ifdef PNG_SETJMP_SUPPORTED 32 | # define png_jmpbuf(png_ptr) ((png_ptr)->PNG_jmpbuf) 33 | #else 34 | #ifdef jmpbuf 35 | #undef jmpbuf 36 | #endif 37 | # define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf) 38 | #endif 39 | #endif 40 | 41 | if (setjmp(png_jmpbuf(png_read_ptr))) { 42 | png_destroy_read_struct(&png_read_ptr, &info_ptr, (png_infopp) NULL); 43 | return 0; 44 | } 45 | 46 | png_init_io(png_read_ptr, fd); 47 | png_read_info(png_read_ptr, info_ptr); 48 | (*width) = png_get_image_width(png_read_ptr, info_ptr); 49 | (*height) = png_get_image_height(png_read_ptr, info_ptr); 50 | 51 | png_destroy_read_struct(&png_read_ptr, &info_ptr, NULL); 52 | if (*width > 0 && *height > 0) 53 | return 1; 54 | else 55 | return 0; 56 | } 57 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/src/rrd_client.h: -------------------------------------------------------------------------------- 1 | /** 2 | * RRDTool - src/rrd_client.h 3 | * Copyright (C) 2008 Florian octo Forster 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to 7 | * deal in the Software without restriction, including without limitation the 8 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 9 | * sell copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | * Authors: 24 | * Florian octo Forster 25 | **/ 26 | 27 | #ifndef __RRD_CLIENT_H 28 | #define __RRD_CLIENT_H 1 29 | 30 | #ifndef WIN32 31 | # ifdef HAVE_STDINT_H 32 | # include 33 | # else 34 | # ifdef HAVE_INTTYPES_H 35 | # include 36 | # else 37 | # error "you should have stdint.h or inttypes.h to compile this" 38 | # endif 39 | # endif 40 | #else 41 | # include 42 | typedef signed char int8_t; 43 | typedef unsigned char uint8_t; 44 | typedef signed int int16_t; 45 | typedef unsigned int uint16_t; 46 | typedef signed long int int32_t; 47 | typedef unsigned long int uint32_t; 48 | typedef signed long long int int64_t; 49 | typedef unsigned long long int uint64_t; 50 | #endif 51 | 52 | 53 | #ifndef RRDCACHED_DEFAULT_ADDRESS 54 | # define RRDCACHED_DEFAULT_ADDRESS "unix:/tmp/rrdcached.sock" 55 | #endif 56 | 57 | #define RRDCACHED_DEFAULT_PORT "42217" 58 | #define ENV_RRDCACHED_ADDRESS "RRDCACHED_ADDRESS" 59 | 60 | 61 | // Windows version has no daemon/client support 62 | 63 | #ifndef WIN32 64 | int rrdc_connect (const char *addr); 65 | int rrdc_is_connected(const char *daemon_addr); 66 | int rrdc_disconnect (void); 67 | 68 | int rrdc_update (const char *filename, int values_num, 69 | const char * const *values); 70 | 71 | int rrdc_flush (const char *filename); 72 | int rrdc_flush_if_daemon (const char *opt_daemon, const char *filename); 73 | 74 | #else 75 | # define rrdc_flush_if_daemon(a,b) 0 76 | # define rrdc_connect(a) 0 77 | # define rrdc_is_connected(a) 0 78 | # define rrdc_flush(a) 0 79 | # define rrdc_update(a,b,c) 0 80 | #endif 81 | 82 | struct rrdc_stats_s 83 | { 84 | const char *name; 85 | uint16_t type; 86 | #define RRDC_STATS_TYPE_GAUGE 0x0001 87 | #define RRDC_STATS_TYPE_COUNTER 0x0002 88 | uint16_t flags; 89 | union 90 | { 91 | uint64_t counter; 92 | double gauge; 93 | } value; 94 | struct rrdc_stats_s *next; 95 | }; 96 | typedef struct rrdc_stats_s rrdc_stats_t; 97 | 98 | int rrdc_stats_get (rrdc_stats_t **ret_stats); 99 | void rrdc_stats_free (rrdc_stats_t *ret_stats); 100 | 101 | #endif /* __RRD_CLIENT_H */ 102 | /* 103 | * vim: set sw=2 sts=2 ts=8 et fdm=marker : 104 | */ 105 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/src/rrd_diff.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 3 | * This code is stolen from rateup (mrtg-2.x) by Dave Rand 4 | ***************************************************************************** 5 | * diff calculate the difference between two very long integers available as 6 | * strings 7 | ***************************************************************************** 8 | * $Id: rrd_diff.c 2267 2012-01-24 10:08:48Z oetiker $ 9 | * $Log$ 10 | * Revision 1.4 2003/03/10 00:30:34 oetiker 11 | * handle cases with two negative numbers 12 | * -- Sasha Mikheev 13 | * 14 | * Revision 1.3 2002/04/01 18:31:22 oetiker 15 | * "!" takes a higher preference than "||" this means rrd_update N:: would 16 | * segfault -- Oliver Cook 17 | * 18 | * Revision 1.2 2002/02/01 20:34:49 oetiker 19 | * fixed version number and date/time 20 | * 21 | * Revision 1.1.1.1 2001/02/25 22:25:05 oetiker 22 | * checkin 23 | * 24 | * Revision 1.1 1998/10/08 18:21:45 oetiker 25 | * Initial revision 26 | * 27 | * Revision 1.3 1998/02/06 21:10:52 oetiker 28 | * removed max define .. it is now in rrd_tool.h 29 | * 30 | * Revision 1.2 1997/12/07 20:38:03 oetiker 31 | * ansified 32 | * 33 | * Revision 1.1 1997/11/28 23:31:59 oetiker 34 | * Initial revision 35 | * 36 | *****************************************************************************/ 37 | 38 | #include 39 | #include "rrd_tool.h" 40 | 41 | double rrd_diff( 42 | char *a, 43 | char *b) 44 | { 45 | char res[LAST_DS_LEN + 1], *a1, *b1, *r1, *fix; 46 | int c, x, m; 47 | char a_neg = 0, b_neg = 0; 48 | double result; 49 | 50 | while (!(isdigit((int) *a) || *a == 0)) { 51 | if (*a == '-') 52 | a_neg = 1; 53 | a++; 54 | } 55 | fix = a; 56 | while (isdigit((int) *fix)) 57 | fix++; 58 | *fix = 0; /* maybe there is some non digit data in the string */ 59 | while (!(isdigit((int) *b) || *b == 0)) { 60 | if (*b == '-') 61 | b_neg = 1; 62 | b++; 63 | } 64 | fix = b; 65 | while (isdigit((int) *fix)) 66 | fix++; 67 | *fix = 0; /* maybe there is some non digit data in the string */ 68 | if (!isdigit((int) *a) || !isdigit((int) *b)) 69 | return DNAN; 70 | if (a_neg + b_neg == 1) /* can not handle numbers with different signs yet */ 71 | return DNAN; 72 | a1 = &a[strlen(a) - 1]; 73 | m = max(strlen(a), strlen(b)); 74 | if (m > LAST_DS_LEN) 75 | return DNAN; /* result string too short */ 76 | 77 | r1 = &res[m + 1]; 78 | for (b1 = res; b1 <= r1; b1++) 79 | *b1 = ' '; 80 | b1 = &b[strlen(b) - 1]; 81 | r1[1] = 0; /* Null terminate result */ 82 | c = 0; 83 | for (x = 0; x < m; x++) { 84 | if (a1 >= a && b1 >= b) { 85 | *r1 = ((*a1 - c) - *b1) + '0'; 86 | } else if (a1 >= a) { 87 | *r1 = (*a1 - c); 88 | } else { 89 | *r1 = ('0' - *b1 - c) + '0'; 90 | } 91 | if (*r1 < '0') { 92 | *r1 += 10; 93 | c = 1; 94 | } else if (*r1 > '9') { /* 0 - 10 */ 95 | *r1 -= 10; 96 | c = 1; 97 | } else { 98 | c = 0; 99 | } 100 | a1--; 101 | b1--; 102 | r1--; 103 | } 104 | if (c) { 105 | r1 = &res[m + 1]; 106 | for (x = 0; isdigit((int) *r1) && x < m; x++, r1--) { 107 | *r1 = ('9' - *r1 + c) + '0'; 108 | if (*r1 > '9') { 109 | *r1 -= 10; 110 | c = 1; 111 | } else { 112 | c = 0; 113 | } 114 | } 115 | result = -atof(res); 116 | } else 117 | result = atof(res); 118 | 119 | if (a_neg + b_neg == 2) /* both are negatives, reverse sign */ 120 | result = -result; 121 | 122 | return result; 123 | } 124 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/src/rrd_first.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 3 | ***************************************************************************** 4 | * rrd_first Return 5 | ***************************************************************************** 6 | * Initial version by Burton Strauss, ntopSupport.com - 3/2005 7 | *****************************************************************************/ 8 | 9 | #include 10 | #include "rrd_tool.h" 11 | 12 | 13 | time_t rrd_first( 14 | int argc, 15 | char **argv) 16 | { 17 | int target_rraindex = 0; 18 | char *endptr; 19 | struct option long_options[] = { 20 | {"rraindex", required_argument, 0, 129}, 21 | {0, 0, 0, 0} 22 | }; 23 | 24 | optind = 0; 25 | opterr = 0; /* initialize getopt */ 26 | 27 | while (1) { 28 | int option_index = 0; 29 | int opt; 30 | 31 | opt = getopt_long(argc, argv, "", long_options, &option_index); 32 | 33 | if (opt == EOF) 34 | break; 35 | 36 | switch (opt) { 37 | case 129: 38 | target_rraindex = strtol(optarg, &endptr, 0); 39 | if (target_rraindex < 0) { 40 | rrd_set_error("invalid rraindex number"); 41 | return (-1); 42 | } 43 | break; 44 | default: 45 | rrd_set_error("usage rrdtool %s [--rraindex number] file.rrd", 46 | argv[0]); 47 | return (-1); 48 | } 49 | } 50 | 51 | if (optind >= argc) { 52 | rrd_set_error("not enough arguments"); 53 | return -1; 54 | } 55 | 56 | return (rrd_first_r(argv[optind], target_rraindex)); 57 | } 58 | 59 | 60 | time_t rrd_first_r( 61 | const char *filename, 62 | const int rraindex) 63 | { 64 | off_t rra_start, timer; 65 | time_t then = -1; 66 | rrd_t rrd; 67 | rrd_file_t *rrd_file; 68 | 69 | rrd_init(&rrd); 70 | rrd_file = rrd_open(filename, &rrd, RRD_READONLY); 71 | if (rrd_file == NULL) { 72 | goto err_free; 73 | } 74 | 75 | if ((rraindex < 0) || (rraindex >= (int) rrd.stat_head->rra_cnt)) { 76 | rrd_set_error("invalid rraindex number"); 77 | goto err_close; 78 | } 79 | 80 | rra_start = rrd_file->header_len; 81 | rrd_seek(rrd_file, 82 | (rra_start + 83 | (rrd.rra_ptr[rraindex].cur_row + 1) * 84 | rrd.stat_head->ds_cnt * sizeof(rrd_value_t)), SEEK_SET); 85 | timer = -(long)(rrd.rra_def[rraindex].row_cnt - 1); 86 | if (rrd.rra_ptr[rraindex].cur_row + 1 > rrd.rra_def[rraindex].row_cnt) { 87 | rrd_seek(rrd_file, rra_start, SEEK_SET); 88 | } 89 | then = (rrd.live_head->last_up - 90 | rrd.live_head->last_up % 91 | (rrd.rra_def[rraindex].pdp_cnt * rrd.stat_head->pdp_step)) + 92 | (timer * rrd.rra_def[rraindex].pdp_cnt * rrd.stat_head->pdp_step); 93 | err_close: 94 | rrd_close(rrd_file); 95 | err_free: 96 | rrd_free(&rrd); 97 | return (then); 98 | } 99 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/src/rrd_flushcached.c: -------------------------------------------------------------------------------- 1 | /** 2 | * RRDTool - src/rrd_flushcached.c 3 | * Copyright (C) 2008 Florian octo Forster 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation; only version 2 of the License is applicable. 8 | * 9 | * This program is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License along 15 | * with this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | * 18 | * Authors: 19 | * Florian octo Forster 20 | **/ 21 | 22 | #include "rrd_tool.h" 23 | #include "rrd_client.h" 24 | 25 | int rrd_flushcached (int argc, char **argv) 26 | { 27 | char *opt_daemon = NULL; 28 | int status; 29 | int i; 30 | 31 | /* initialize getopt */ 32 | optind = 0; 33 | opterr = 0; 34 | 35 | while (42) 36 | { 37 | int opt; 38 | static struct option long_options[] = 39 | { 40 | {"daemon", required_argument, 0, 'd'}, 41 | {0, 0, 0, 0} 42 | }; 43 | 44 | opt = getopt_long(argc, argv, "d:", long_options, NULL); 45 | 46 | if (opt == -1) 47 | break; 48 | 49 | switch (opt) 50 | { 51 | case 'd': 52 | if (opt_daemon != NULL) 53 | free (opt_daemon); 54 | opt_daemon = strdup (optarg); 55 | if (opt_daemon == NULL) 56 | { 57 | rrd_set_error ("strdup failed."); 58 | return (-1); 59 | } 60 | break; 61 | 62 | default: 63 | rrd_set_error ("Usage: rrdtool %s [--daemon ] ", 64 | argv[0]); 65 | return (-1); 66 | } 67 | } /* while (42) */ 68 | 69 | if ((argc - optind) < 1) 70 | { 71 | rrd_set_error ("Usage: rrdtool %s [--daemon ] [ ...]", argv[0]); 72 | return (-1); 73 | } 74 | 75 | /* try to connect to rrdcached */ 76 | status = rrdc_connect(opt_daemon); 77 | if (status != 0) goto out; 78 | 79 | if (! rrdc_is_connected(opt_daemon)) 80 | { 81 | rrd_set_error ("Daemon address unknown. Please use the \"--daemon\" " 82 | "option to set an address on the command line or set the " 83 | "\"%s\" environment variable.", 84 | ENV_RRDCACHED_ADDRESS); 85 | status = -1; 86 | goto out; 87 | } 88 | 89 | status = 0; 90 | for (i = optind; i < argc; i++) 91 | { 92 | status = rrdc_flush(argv[i]); 93 | if (status) 94 | { 95 | char *error; 96 | int remaining; 97 | 98 | error = strdup(rrd_get_error()); 99 | remaining = argc - optind - 1; 100 | 101 | rrd_set_error("Flushing of file \"%s\" failed: %s. Skipping " 102 | "remaining %i file%s.", argv[i], 103 | ((! error) || (*error == '\0')) ? "unknown error" : error, 104 | remaining, (remaining == 1) ? "" : "s"); 105 | free(error); 106 | break; 107 | } 108 | } 109 | 110 | out: 111 | if (opt_daemon) free(opt_daemon); 112 | 113 | return status; 114 | } /* int rrd_flush */ 115 | 116 | /* 117 | * vim: set sw=4 sts=4 et fdm=marker : 118 | */ 119 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/src/rrd_hw.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 3 | ***************************************************************************** 4 | * rrd_hw.h : Support for Holt-Winters Smoothing/ Aberrant Behavior Detection 5 | *****************************************************************************/ 6 | 7 | /* functions implemented in rrd_hw.c */ 8 | int update_aberrant_CF( 9 | rrd_t *rrd, 10 | rrd_value_t pdp_val, 11 | enum cf_en current_cf, 12 | unsigned long cdp_idx, 13 | unsigned long rra_idx, 14 | unsigned long ds_idx, 15 | unsigned short CDP_scratch_idx, 16 | rrd_value_t *seasonal_coef); 17 | int create_hw_contingent_rras( 18 | rrd_t *rrd, 19 | unsigned short period, 20 | unsigned long hashed_name); 21 | int lookup_seasonal( 22 | rrd_t *rrd, 23 | unsigned long rra_idx, 24 | unsigned long rra_start, 25 | rrd_file_t *rrd_file, 26 | unsigned long offset, 27 | rrd_value_t **seasonal_coef); 28 | void erase_violations( 29 | rrd_t *rrd, 30 | unsigned long cdp_idx, 31 | unsigned long rra_idx); 32 | int apply_smoother( 33 | rrd_t *rrd, 34 | unsigned long rra_idx, 35 | unsigned long rra_start, 36 | rrd_file_t *rrd_file); 37 | void reset_aberrant_coefficients( 38 | rrd_t *rrd, 39 | rrd_file_t *rrd_file, 40 | unsigned long ds_idx); 41 | void init_hwpredict_cdp( 42 | cdp_prep_t *); 43 | void init_seasonal_cdp( 44 | cdp_prep_t *); 45 | 46 | #define BURNIN_CYCLES 3 47 | 48 | /* a standard fixed-capacity FIFO queue implementation */ 49 | typedef struct FIFOqueue { 50 | rrd_value_t *queue; 51 | int capacity, head, tail; 52 | } FIFOqueue; 53 | 54 | int queue_alloc( 55 | FIFOqueue **q, 56 | int capacity); 57 | void queue_dealloc( 58 | FIFOqueue *q); 59 | void queue_push( 60 | FIFOqueue *q, 61 | rrd_value_t value); 62 | int queue_isempty( 63 | FIFOqueue *q); 64 | rrd_value_t queue_pop( 65 | FIFOqueue *q); 66 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/src/rrd_hw_math.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * rrd_hw_math.h Math functions for Holt-Winters computations 3 | *****************************************************************************/ 4 | 5 | #include "rrd.h" 6 | #include "rrd_format.h" 7 | 8 | /* since /usr/include/bits/mathcalls.h:265 defines gamma already */ 9 | #define gamma hw_gamma 10 | 11 | /***************************************************************************** 12 | * Functions for additive Holt-Winters 13 | *****************************************************************************/ 14 | 15 | rrd_value_t hw_additive_calculate_prediction( 16 | rrd_value_t intercept, 17 | rrd_value_t slope, 18 | int null_count, 19 | rrd_value_t seasonal_coef); 20 | 21 | rrd_value_t hw_additive_calculate_intercept( 22 | rrd_value_t alpha, 23 | rrd_value_t scratch, 24 | rrd_value_t seasonal_coef, 25 | unival *coefs); 26 | 27 | rrd_value_t hw_additive_calculate_seasonality( 28 | rrd_value_t gamma, 29 | rrd_value_t scratch, 30 | rrd_value_t intercept, 31 | rrd_value_t seasonal_coef); 32 | 33 | rrd_value_t hw_additive_init_seasonality( 34 | rrd_value_t seasonal_coef, 35 | rrd_value_t intercept); 36 | 37 | /***************************************************************************** 38 | * Functions for multiplicative Holt-Winters 39 | *****************************************************************************/ 40 | 41 | rrd_value_t hw_multiplicative_calculate_prediction( 42 | rrd_value_t intercept, 43 | rrd_value_t slope, 44 | int null_count, 45 | rrd_value_t seasonal_coef); 46 | 47 | rrd_value_t hw_multiplicative_calculate_intercept( 48 | rrd_value_t alpha, 49 | rrd_value_t scratch, 50 | rrd_value_t seasonal_coef, 51 | unival *coefs); 52 | 53 | rrd_value_t hw_multiplicative_calculate_seasonality( 54 | rrd_value_t gamma, 55 | rrd_value_t scratch, 56 | rrd_value_t intercept, 57 | rrd_value_t seasonal_coef); 58 | 59 | rrd_value_t hw_multiplicative_init_seasonality( 60 | rrd_value_t seasonal_coef, 61 | rrd_value_t intercept); 62 | 63 | /***************************************************************************** 64 | * Math functions common to additive and multiplicative Holt-Winters 65 | *****************************************************************************/ 66 | 67 | rrd_value_t hw_calculate_slope( 68 | rrd_value_t beta, 69 | unival *coefs); 70 | 71 | rrd_value_t hw_calculate_seasonal_deviation( 72 | rrd_value_t gamma, 73 | rrd_value_t prediction, 74 | rrd_value_t observed, 75 | rrd_value_t last); 76 | 77 | rrd_value_t hw_init_seasonal_deviation( 78 | rrd_value_t prediction, 79 | rrd_value_t observed); 80 | 81 | 82 | /* Function container */ 83 | 84 | typedef struct hw_functions_t { 85 | rrd_value_t ( 86 | *predict) ( 87 | rrd_value_t intercept, 88 | rrd_value_t slope, 89 | int null_count, 90 | rrd_value_t seasonal_coef); 91 | 92 | rrd_value_t ( 93 | *intercept) ( 94 | rrd_value_t alpha, 95 | rrd_value_t observed, 96 | rrd_value_t seasonal_coef, 97 | unival *coefs); 98 | 99 | rrd_value_t ( 100 | *slope) ( 101 | rrd_value_t beta, 102 | unival *coefs); 103 | 104 | rrd_value_t ( 105 | *seasonality) ( 106 | rrd_value_t gamma, 107 | rrd_value_t observed, 108 | rrd_value_t intercept, 109 | rrd_value_t seasonal_coef); 110 | 111 | rrd_value_t ( 112 | *init_seasonality) ( 113 | rrd_value_t seasonal_coef, 114 | rrd_value_t intercept); 115 | 116 | rrd_value_t ( 117 | *seasonal_deviation) ( 118 | rrd_value_t gamma, 119 | rrd_value_t prediction, 120 | rrd_value_t observed, 121 | rrd_value_t last); 122 | 123 | rrd_value_t ( 124 | *init_seasonal_deviation) ( 125 | rrd_value_t prediction, 126 | rrd_value_t observed); 127 | 128 | rrd_value_t identity; 129 | } hw_functions_t; 130 | 131 | 132 | #undef gamma 133 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/src/rrd_hw_update.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * rrd_hw_update.h Functions for updating a Holt-Winters RRA 3 | ****************************************************************************/ 4 | 5 | int update_hwpredict( 6 | rrd_t *rrd, 7 | unsigned long cdp_idx, 8 | unsigned long rra_idx, 9 | unsigned long ds_idx, 10 | unsigned short CDP_scratch_idx, 11 | hw_functions_t * functions); 12 | 13 | int update_seasonal( 14 | rrd_t *rrd, 15 | unsigned long cdp_idx, 16 | unsigned long rra_idx, 17 | unsigned long ds_idx, 18 | unsigned short CDP_scratch_idx, 19 | rrd_value_t *seasonal_coef, 20 | hw_functions_t * functions); 21 | 22 | int update_devpredict( 23 | rrd_t *rrd, 24 | unsigned long cdp_idx, 25 | unsigned long rra_idx, 26 | unsigned long ds_idx, 27 | unsigned short CDP_scratch_idx); 28 | 29 | int update_devseasonal( 30 | rrd_t *rrd, 31 | unsigned long cdp_idx, 32 | unsigned long rra_idx, 33 | unsigned long ds_idx, 34 | unsigned short CDP_scratch_idx, 35 | rrd_value_t *seasonal_dev, 36 | hw_functions_t * functions); 37 | 38 | int update_failures( 39 | rrd_t *rrd, 40 | unsigned long cdp_idx, 41 | unsigned long rra_idx, 42 | unsigned long ds_idx, 43 | unsigned short CDP_scratch_idx, 44 | hw_functions_t * functions); 45 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/src/rrd_i18n.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * RRDtool 1.4.7 Copyright by Takao Fujiwara, 2008 3 | ***************************************************************************** 4 | * rrd_i18n.h Common Header File 5 | *****************************************************************************/ 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | 11 | #ifndef _RRD_I18N_H 12 | #define _RRD_I18N_H 13 | 14 | #ifdef ENABLE_NLS 15 | # ifdef _LIBC 16 | # include 17 | # else 18 | # include "gettext.h" 19 | # define _(String) gettext (String) 20 | # endif 21 | #else 22 | # define _(String) (String) 23 | #endif 24 | 25 | #define N_(String) String 26 | 27 | #endif 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/src/rrd_is_thread_safe.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 3 | * This file: Copyright 2003 Peter Stamfest 4 | * & Tobias Oetiker 5 | * Distributed under the GPL 6 | ***************************************************************************** 7 | * rrd_is_thread_safe.c Poisons some nasty function calls using GNU cpp 8 | ***************************************************************************** 9 | * $Id: rrd_is_thread_safe.h 2267 2012-01-24 10:08:48Z oetiker $ 10 | *************************************************************************** */ 11 | 12 | #ifndef _RRD_IS_THREAD_SAFE_H 13 | #define _RRD_IS_THREAD_SAFE_H 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | #undef strerror 20 | 21 | #if( 2 < __GNUC__ ) 22 | #pragma GCC poison strtok asctime ctime gmtime localtime tmpnam strerror 23 | #endif 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | #endif /*_RRD_IS_THREAD_SAFE_H */ 29 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/src/rrd_last.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 3 | ***************************************************************************** 4 | * rrd_last.c 5 | ***************************************************************************** 6 | * Initial version by Russ Wright, @Home Network, 9/28/98 7 | *****************************************************************************/ 8 | 9 | #include "rrd_tool.h" 10 | #include "rrd_client.h" 11 | 12 | time_t rrd_last( 13 | int argc, 14 | char **argv) 15 | { 16 | char *opt_daemon = NULL; 17 | int status; 18 | 19 | optind = 0; 20 | opterr = 0; /* initialize getopt */ 21 | 22 | while (42) { 23 | int opt; 24 | int option_index = 0; 25 | static struct option long_options[] = { 26 | {"daemon", required_argument, 0, 'd'}, 27 | {0, 0, 0, 0} 28 | }; 29 | 30 | opt = getopt_long(argc, argv, "d:", long_options, &option_index); 31 | 32 | if (opt == EOF) 33 | break; 34 | 35 | switch (opt) { 36 | case 'd': 37 | if (opt_daemon != NULL) 38 | free (opt_daemon); 39 | opt_daemon = strdup (optarg); 40 | if (opt_daemon == NULL) 41 | { 42 | rrd_set_error ("strdup failed."); 43 | return (-1); 44 | } 45 | break; 46 | 47 | default: 48 | rrd_set_error ("Usage: rrdtool %s [--daemon ] ", 49 | argv[0]); 50 | return (-1); 51 | break; 52 | } 53 | } /* while (42) */ 54 | 55 | if ((argc - optind) != 1) { 56 | rrd_set_error ("Usage: rrdtool %s [--daemon ] ", 57 | argv[0]); 58 | return (-1); 59 | } 60 | 61 | status = rrdc_flush_if_daemon(opt_daemon, argv[optind]); 62 | if (opt_daemon) free(opt_daemon); 63 | if (status) return (-1); 64 | 65 | return (rrd_last_r (argv[optind])); 66 | } 67 | 68 | time_t rrd_last_r( 69 | const char *filename) 70 | { 71 | time_t lastup = -1; 72 | rrd_file_t *rrd_file; 73 | 74 | rrd_t rrd; 75 | 76 | rrd_init(&rrd); 77 | rrd_file = rrd_open(filename, &rrd, RRD_READONLY); 78 | if (rrd_file != NULL) { 79 | lastup = rrd.live_head->last_up; 80 | rrd_close(rrd_file); 81 | } 82 | rrd_free(&rrd); 83 | return (lastup); 84 | } 85 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/src/rrd_nan_inf.c: -------------------------------------------------------------------------------- 1 | int done_nan = 0; 2 | int done_inf = 0; 3 | 4 | double dnan; 5 | double dinf; 6 | 7 | #if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) 8 | #include 9 | #include "rrd.h" 10 | 11 | #define NAN_FUNC (double)fmod(0.0,0.0) 12 | #define INF_FUNC (double)fabs((double)log(0.0)) 13 | 14 | #else 15 | #include "rrd.h" 16 | 17 | #define NAN_FUNC (double)(0.0/0.0) 18 | #define INF_FUNC (double)(1.0/0.0) 19 | 20 | #endif 21 | 22 | double rrd_set_to_DNAN( 23 | void) 24 | { 25 | if (!done_nan) { 26 | dnan = NAN_FUNC; 27 | done_nan = 1; 28 | } 29 | return dnan; 30 | } 31 | 32 | double rrd_set_to_DINF( 33 | void) 34 | { 35 | if (!done_inf) { 36 | dinf = INF_FUNC; 37 | done_inf = 1; 38 | } 39 | return dinf; 40 | } 41 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/src/rrd_not_thread_safe.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 3 | * This file: Copyright 2003 Peter Stamfest 4 | * & Tobias Oetiker 5 | * Distributed under the GPL 6 | ***************************************************************************** 7 | * rrd_not_thread_safe.c Contains routines used when thread safety is not 8 | * an issue 9 | ***************************************************************************** 10 | * $Id: rrd_not_thread_safe.c 2267 2012-01-24 10:08:48Z oetiker $ 11 | *************************************************************************** */ 12 | #include "rrd.h" 13 | #include "rrd_tool.h" 14 | #define MAXLEN 4096 15 | #define ERRBUFLEN 256 16 | 17 | /* The global context is very useful in the transition period to even 18 | more thread-safe stuff, it can be used whereever we need a context 19 | and do not need to worry about concurrency. */ 20 | static rrd_context_t global_ctx = { 21 | "", 22 | "" 23 | }; 24 | 25 | /* #include */ 26 | 27 | rrd_context_t *rrd_get_context( 28 | void) 29 | { 30 | return &global_ctx; 31 | } 32 | 33 | /* how ugly that is!!! - make sure strerror is what it should be. It 34 | might be redefined to help in keeping other modules thread safe by 35 | silently turning misplaced strerror into rrd_strerror, but here 36 | this turns recursive! */ 37 | #undef strerror 38 | const char *rrd_strerror( 39 | int err) 40 | { 41 | return strerror(err); 42 | } 43 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/src/rrd_parsetime.h: -------------------------------------------------------------------------------- 1 | #ifndef __PARSETIME_H__ 2 | #define __PARSETIME_H__ 3 | 4 | #include 5 | 6 | #include "rrd.h" 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/src/rrd_rpncalc.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 3 | **************************************************************************** 4 | * rrd_rpncalc.h RPN calculator functions 5 | ****************************************************************************/ 6 | #ifndef _RRD_RPNCALC_H 7 | #define _RRD_RPNCALC_H 8 | 9 | /* WARNING: if new operators are added, they MUST be added at the very end of the list. 10 | * This is because COMPUTE (CDEF) DS store OP nodes by number (name is not 11 | * an option due to limited par array size). OP nodes must have the same 12 | * numeric values, otherwise the stored numbers will mean something different. */ 13 | enum op_en { OP_NUMBER = 0, OP_VARIABLE, OP_INF, OP_PREV, OP_NEGINF, 14 | OP_UNKN, OP_NOW, OP_TIME, OP_ADD, OP_MOD, OP_SUB, OP_MUL, 15 | OP_DIV, OP_SIN, OP_DUP, OP_EXC, OP_POP, 16 | OP_COS, OP_LOG, OP_EXP, OP_LT, OP_LE, OP_GT, OP_GE, OP_EQ, OP_IF, 17 | OP_MIN, OP_MAX, OP_LIMIT, OP_FLOOR, OP_CEIL, 18 | OP_UN, OP_END, OP_LTIME, OP_NE, OP_ISINF, OP_PREV_OTHER, OP_COUNT, 19 | OP_ATAN, OP_SQRT, OP_SORT, OP_REV, OP_TREND, OP_TRENDNAN, 20 | OP_ATAN2, OP_RAD2DEG, OP_DEG2RAD, 21 | OP_PREDICT,OP_PREDICTSIGMA, 22 | OP_AVG, OP_ABS, OP_ADDNAN 23 | }; 24 | 25 | typedef struct rpnp_t { 26 | enum op_en op; 27 | double val; /* value for a OP_NUMBER */ 28 | long ptr; /* pointer into the gdes array for OP_VAR */ 29 | double *data; /* pointer to the current value from OP_VAR DAS */ 30 | long ds_cnt; /* data source count for data pointer */ 31 | long step; /* time step for OP_VAR das */ 32 | } rpnp_t; 33 | 34 | /* a compact representation of rpnp_t for computed data sources */ 35 | typedef struct rpn_cdefds_t { 36 | char op; /* rpn operator type */ 37 | short val; /* used by OP_NUMBER and OP_VARIABLE */ 38 | } rpn_cdefds_t; 39 | 40 | #define MAX_VNAME_LEN 255 41 | #define DEF_NAM_FMT "%255[-_A-Za-z0-9]" 42 | 43 | /* limit imposed by sizeof(rpn_cdefs_t) and rrd.ds_def.par */ 44 | #define DS_CDEF_MAX_RPN_NODES (int)(sizeof(unival)*10 / sizeof(rpn_cdefds_t)) 45 | 46 | typedef struct rpnstack_t { 47 | double *s; 48 | long dc_stacksize; 49 | long dc_stackblock; 50 | } rpnstack_t; 51 | 52 | void rpnstack_init( 53 | rpnstack_t *rpnstack); 54 | void rpnstack_free( 55 | rpnstack_t *rpnstack); 56 | 57 | void parseCDEF_DS( 58 | const char *def, 59 | rrd_t *rrd, 60 | int ds_idx); 61 | long lookup_DS( 62 | void *rrd_vptr, 63 | char *ds_name); 64 | 65 | short rpn_compact( 66 | rpnp_t *rpnp, 67 | rpn_cdefds_t **rpnc, 68 | short *count); 69 | rpnp_t *rpn_expand( 70 | rpn_cdefds_t *rpnc); 71 | void rpn_compact2str( 72 | rpn_cdefds_t *rpnc, 73 | ds_def_t *ds_def, 74 | char **str); 75 | rpnp_t *rpn_parse( 76 | void *key_hash, 77 | const char *const expr, 78 | long (*lookup) (void *, 79 | char *)); 80 | short rpn_calc( 81 | rpnp_t *rpnp, 82 | rpnstack_t *rpnstack, 83 | long data_idx, 84 | rrd_value_t *output, 85 | int output_idx); 86 | 87 | #endif 88 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/src/rrd_thread_safe.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 3 | * This file: Copyright 2003 Peter Stamfest 4 | * & Tobias Oetiker 5 | * Distributed under the GPL 6 | ***************************************************************************** 7 | * rrd_thread_safe.c Contains routines used when thread safety is required 8 | ***************************************************************************** 9 | * $Id: rrd_thread_safe.c 2267 2012-01-24 10:08:48Z oetiker $ 10 | *************************************************************************** */ 11 | 12 | #include 13 | #include 14 | /* #include */ 15 | #include "rrd.h" 16 | #include "rrd_tool.h" 17 | 18 | /* Key for the thread-specific rrd_context */ 19 | static pthread_key_t context_key; 20 | 21 | /* Once-only initialisation of the key */ 22 | static pthread_once_t context_key_once = PTHREAD_ONCE_INIT; 23 | 24 | /* Free the thread-specific rrd_context - we might actually use 25 | rrd_free_context instead... 26 | */ 27 | static void context_destroy_context( 28 | void *ctx_) 29 | { 30 | rrd_context_t *ctx = ctx_; 31 | 32 | if (ctx) 33 | rrd_free_context(ctx); 34 | } 35 | 36 | /* Allocate the key */ 37 | static void context_get_key( 38 | void) 39 | { 40 | pthread_key_create(&context_key, context_destroy_context); 41 | } 42 | 43 | rrd_context_t *rrd_get_context( 44 | void) 45 | { 46 | rrd_context_t *ctx; 47 | 48 | pthread_once(&context_key_once, context_get_key); 49 | ctx = pthread_getspecific(context_key); 50 | if (!ctx) { 51 | ctx = rrd_new_context(); 52 | pthread_setspecific(context_key, ctx); 53 | } 54 | return ctx; 55 | } 56 | 57 | #ifdef HAVE_STRERROR_R 58 | const char *rrd_strerror( 59 | int err) 60 | { 61 | rrd_context_t *ctx = rrd_get_context(); 62 | char *ret = "unknown error"; 63 | 64 | *ctx->lib_errstr = '\0'; 65 | 66 | /* Even though POSIX/XSI requires "strerror_r" to return an "int", some 67 | * systems (e.g. the GNU libc) return a "char *" _and_ ignore the second 68 | * argument ... -tokkee */ 69 | #ifdef STRERROR_R_CHAR_P 70 | ret = strerror_r(err, ctx->lib_errstr, sizeof(ctx->lib_errstr)); 71 | if ((! ret) || (*ret == '\0')) { 72 | if (*ctx->lib_errstr != '\0') 73 | ret = ctx->lib_errstr; 74 | else { 75 | /* according to the manpage this should not happen - 76 | let's handle it somehow sanely anyway */ 77 | snprintf(ctx->lib_errstr, sizeof(ctx->lib_errstr), 78 | "unknown error %i - strerror_r did not return anything", 79 | err); 80 | ctx->lib_errstr[sizeof(ctx->lib_errstr) - 1] = '\0'; 81 | ret = ctx->lib_errstr; 82 | } 83 | } 84 | #else /* ! STRERROR_R_CHAR_P */ 85 | if (strerror_r(err, ctx->lib_errstr, sizeof(ctx->lib_errstr))) { 86 | snprintf(ctx->lib_errstr, sizeof(ctx->lib_errstr), 87 | "unknown error %i - strerror_r returned with errno = %i", 88 | err, errno); 89 | ctx->lib_errstr[sizeof(ctx->lib_errstr) - 1] = '\0'; 90 | } 91 | ret = ctx->lib_errstr; 92 | #endif 93 | return ret; 94 | } 95 | #else 96 | #undef strerror 97 | const char *rrd_strerror( 98 | int err) 99 | { 100 | static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; 101 | rrd_context_t *ctx; 102 | 103 | ctx = rrd_get_context(); 104 | pthread_mutex_lock(&mtx); 105 | strncpy(ctx->lib_errstr, strerror(err), sizeof(ctx->lib_errstr)); 106 | ctx->lib_errstr[sizeof(ctx->lib_errstr) - 1] = '\0'; 107 | pthread_mutex_unlock(&mtx); 108 | return ctx->lib_errstr; 109 | } 110 | #endif 111 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/src/rrd_tool.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 3 | ***************************************************************************** 4 | * rrd_tool.h Common Header File 5 | *****************************************************************************/ 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | #ifndef _RRD_TOOL_H 11 | #define _RRD_TOOL_H 12 | 13 | #if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) 14 | #include "../win32/config.h" 15 | #else 16 | #ifdef HAVE_CONFIG_H 17 | #include "../rrd_config.h" 18 | #endif 19 | #endif 20 | 21 | #include "rrd.h" 22 | 23 | #if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) 24 | 25 | /* Win32 only includes */ 26 | 27 | #include /* for _isnan */ 28 | #include /* for chdir */ 29 | 30 | struct tm *localtime_r( 31 | const time_t *timep, 32 | struct tm *result); 33 | char *ctime_r( 34 | const time_t *timep, 35 | char *result); 36 | struct tm *gmtime_r( 37 | const time_t *timep, 38 | struct tm *result); 39 | char *strtok_r( 40 | char *str, 41 | const char *sep, 42 | char **last); 43 | 44 | #else 45 | 46 | /* unix-only includes */ 47 | #if !defined(isnan) && !defined(HAVE_ISNAN) 48 | int isnan( 49 | double value); 50 | #endif 51 | 52 | #endif 53 | 54 | /* local include files -- need to be after the system ones */ 55 | #ifdef HAVE_GETOPT_LONG 56 | #define _GNU_SOURCE 57 | #include 58 | #else 59 | #include "rrd_getopt.h" 60 | #endif 61 | 62 | #include "rrd_format.h" 63 | 64 | #ifndef max 65 | #define max(a,b) ((a) > (b) ? (a) : (b)) 66 | #endif 67 | 68 | #ifndef min 69 | #define min(a,b) ((a) < (b) ? (a) : (b)) 70 | #endif 71 | 72 | #define DIM(x) (sizeof(x)/sizeof(x[0])) 73 | 74 | char *sprintf_alloc( 75 | char *, 76 | ...); 77 | 78 | /* HELPER FUNCTIONS */ 79 | 80 | int PngSize( 81 | FILE *, 82 | long *, 83 | long *); 84 | 85 | int rrd_create_fn( 86 | const char *file_name, 87 | rrd_t *rrd); 88 | int rrd_fetch_fn (const char *filename, 89 | enum cf_en cf_idx, 90 | time_t *start, 91 | time_t *end, 92 | unsigned long *step, 93 | unsigned long *ds_cnt, 94 | char ***ds_namv, 95 | rrd_value_t **data); 96 | 97 | 98 | #ifdef HAVE_LIBDBI 99 | int rrd_fetch_fn_libdbi(const char *filename, enum cf_en cf_idx, 100 | time_t *start,time_t *end, 101 | unsigned long *step, 102 | unsigned long *ds_cnt, 103 | char ***ds_namv, 104 | rrd_value_t **data); 105 | #endif 106 | 107 | #define RRD_READONLY (1<<0) 108 | #define RRD_READWRITE (1<<1) 109 | #define RRD_CREAT (1<<2) 110 | #define RRD_READAHEAD (1<<3) 111 | #define RRD_COPY (1<<4) 112 | #define RRD_EXCL (1<<5) 113 | 114 | enum cf_en cf_conv( 115 | const char *string); 116 | enum dst_en dst_conv( 117 | char *string); 118 | long ds_match( 119 | rrd_t *rrd, 120 | char *ds_nam); 121 | off_t rrd_get_header_size( 122 | rrd_t *rrd); 123 | double rrd_diff( 124 | char *a, 125 | char *b); 126 | 127 | #endif /* _RRD_TOOL_H */ 128 | 129 | #ifdef __cplusplus 130 | } 131 | #endif 132 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/src/rrd_version.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 3 | ***************************************************************************** 4 | * rrd_version Return 5 | ***************************************************************************** 6 | * Initial version by Burton Strauss, ntopSupport.com - 5/2005 7 | *****************************************************************************/ 8 | 9 | #include "rrd_tool.h" 10 | 11 | double rrd_version( 12 | void) 13 | { 14 | return NUMVERS; 15 | } 16 | 17 | char *rrd_strversion( 18 | void) 19 | { 20 | return PACKAGE_VERSION; 21 | } 22 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/src/rrd_xport.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 3 | **************************************************************************** 4 | * rrd_xport.h contains XML related constants 5 | ****************************************************************************/ 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | #ifndef _RRD_XPORT_H 11 | #define _RRD_XPORT_H 12 | 13 | #define XML_ENCODING "ISO-8859-1" 14 | #define ROOT_TAG "xport" 15 | #define META_TAG "meta" 16 | #define META_START_TAG "start" 17 | #define META_STEP_TAG "step" 18 | #define META_END_TAG "end" 19 | #define META_ROWS_TAG "rows" 20 | #define META_COLS_TAG "columns" 21 | #define LEGEND_TAG "legend" 22 | #define LEGEND_ENTRY_TAG "entry" 23 | #define DATA_TAG "data" 24 | #define DATA_ROW_TAG "row" 25 | #define COL_TIME_TAG "t" 26 | #define COL_DATA_TAG "v" 27 | 28 | 29 | #endif 30 | 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/src/rrdupdate.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 3 | ***************************************************************************** 4 | * rrdupdate.c Main program for the (standalone) rrdupdate utility 5 | ***************************************************************************** 6 | * $Id: rrdupdate.c 2267 2012-01-24 10:08:48Z oetiker $ 7 | *****************************************************************************/ 8 | 9 | #if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) && !defined(HAVE_CONFIG_H) 10 | #include "../win32/config.h" 11 | #else 12 | #ifdef HAVE_CONFIG_H 13 | #include "../rrd_config.h" 14 | #endif 15 | #endif 16 | 17 | #include "rrd.h" 18 | 19 | int main( 20 | int argc, 21 | char **argv) 22 | { 23 | rrd_update(argc, argv); 24 | if (rrd_test_error()) { 25 | printf("RRDtool " PACKAGE_VERSION 26 | " Copyright by Tobi Oetiker, 1997-2010\n\n" 27 | "Usage: rrdupdate filename\n" 28 | "\t\t\t[--template|-t ds-name:ds-name:...]\n" 29 | "\t\t\ttime|N:value[:value...]\n\n" 30 | "\t\t\tat-time@value[:value...]\n\n" 31 | "\t\t\t[ time:value[:value...] ..]\n\n"); 32 | 33 | printf("ERROR: %s\n", rrd_get_error()); 34 | rrd_clear_error(); 35 | return 1; 36 | } 37 | return 0; 38 | } 39 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/src/strftime.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** STRFTIME.H - For older compilers which lack strftime() 3 | ** 4 | ** Note: To avoid name collision with newer compilers, the function name 5 | ** strftime_() is used. 6 | */ 7 | 8 | #ifndef STRFTIME__H 9 | #define STRFTIME__H 10 | 11 | #include /* for size_t */ 12 | #include /* for struct tm */ 13 | 14 | size_t strftime_( 15 | char *s, 16 | size_t maxs, 17 | const char *f, 18 | const struct tm *t); 19 | 20 | #if defined(TZNAME_STD) && defined(TZNAME_DST) 21 | extern char *tzname_[2]; 22 | #endif 23 | 24 | #endif /* STRFTIME__H */ 25 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/src/unused.h: -------------------------------------------------------------------------------- 1 | /* define a macro to wrap variables that would 2 | otherwise generate UNUSED variable warnings 3 | Note that GCC's attribute unused only supresses the warning, so 4 | it is perfectly safe to declare something unused although it is not. 5 | */ 6 | 7 | #ifdef UNUSED 8 | #elif defined(__GNUC__) 9 | # define UNUSED(x) x __attribute__((unused)) 10 | #elif defined(__LCLINT__) 11 | # define UNUSED(x) /*@unused@*/ x 12 | #else 13 | # define UNUSED(x) x 14 | #endif 15 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/src/win32comp.c: -------------------------------------------------------------------------------- 1 | /* compatibility routines, non reentrant .... */ 2 | 3 | #include 4 | #include 5 | 6 | struct tm *localtime_r( 7 | const time_t *t, 8 | struct tm *r) 9 | { 10 | struct tm *temp; 11 | 12 | temp = localtime(t); 13 | memcpy(r, temp, sizeof(struct tm)); 14 | return (r); 15 | } 16 | 17 | struct tm *gmtime_r( 18 | const time_t *t, 19 | struct tm *r) 20 | { 21 | struct tm *temp; 22 | 23 | temp = gmtime(t); 24 | memcpy(r, temp, sizeof(struct tm)); 25 | return r; 26 | } 27 | 28 | char *ctime_r( 29 | const time_t *t, 30 | char *buf) 31 | { 32 | char *temp; 33 | 34 | temp = asctime(localtime(t)); 35 | strcpy(buf, temp); 36 | return (buf); 37 | } 38 | 39 | /* 40 | s 41 | Points to the string from which to extract tokens. 42 | 43 | delim 44 | Points to a null-terminated set of delimiter characters. 45 | 46 | save_ptr 47 | Is a value-return parameter used by strtok_r() to record its progress through s1. 48 | */ 49 | 50 | 51 | char *strtok_r( 52 | char *s, 53 | const char *delim, 54 | char **save_ptr) 55 | { 56 | char *token; 57 | 58 | if (s == NULL) 59 | s = *save_ptr; 60 | 61 | /* Scan leading delimiters. */ 62 | s += strspn(s, delim); 63 | if (*s == '\0') { 64 | *save_ptr = s; 65 | return NULL; 66 | } 67 | 68 | /* Find the end of the token. */ 69 | token = s; 70 | s = strpbrk(token, delim); 71 | if (s == NULL) { 72 | /* This token finishes the string. */ 73 | *save_ptr = token; 74 | while (**save_ptr != '\0') 75 | (*save_ptr)++; 76 | } else { 77 | /* Terminate the token and make *SAVE_PTR point past it. */ 78 | *s = '\0'; 79 | *save_ptr = s + 1; 80 | } 81 | return token; 82 | } 83 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/win32/README: -------------------------------------------------------------------------------- 1 | Win32 Build Instructions: 2 | 3 | 1) Make sure that the contrib file has all the required files for RRDtool 4 | 2) Open rrd.sln from Visual Studio 5 | 3) Select the 'Release' Build Type 6 | 4) Build the Solution 7 | 5) rrdtool.exe, and rrdupdate.exe will be located in the Release directory 8 | 6) To install, copy the two binaries, along with the host of DLL files to 9 | their permanent location 10 | 7) To build the ActiveState perl module. Follow the instructions under 11 | the README file under 'binding/perl-shared' 12 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/win32/config.h: -------------------------------------------------------------------------------- 1 | /* config.h.msvc. Hand-tweaked config.h for MSVC compiler. */ 2 | #ifndef CONFIG_H 3 | #define CONFIG_H 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | /* realloc does not support NULL as argument */ 12 | 13 | #define HAVE_STRFTIME 1 14 | #define HAVE_TIME_H 1 15 | #define HAVE_LOCALE_H 1 16 | #define HAVE_TZSET 1 17 | #define HAVE_SETLOCALE 1 18 | #define HAVE_MATH_H 1 19 | #define HAVE_FLOAT_H 1 20 | #define HAVE_MEMMOVE 1 21 | #define HAVE_MALLOC_H 1 22 | #define HAVE_MKTIME 1 23 | #define HAVE_STRFTIME 1 24 | #define HAVE_STRING_H 1 25 | #define HAVE_STDLIB_H 1 26 | #define HAVE_VSNPRINTF 1 27 | #define HAVE_SYS_TYPES_H 1 28 | #define HAVE_SYS_STAT_H 1 29 | #define HAVE_RRD_GRAPH 1 30 | 31 | /* Define to 1 if you have the ANSI C header files. */ 32 | #define STDC_HEADERS 1 33 | 34 | #define NUMVERS 1.4050 35 | #define PACKAGE_NAME "rrdtool" 36 | #define PACKAGE_VERSION "1.4.5" 37 | #define PACKAGE_STRING PACKAGE_NAME " " PACKAGE_VERSION 38 | 39 | #define isinf(a) (_fpclass(a) == _FPCLASS_NINF || _fpclass(a) == _FPCLASS_PINF) 40 | #define isnan _isnan 41 | #define finite _finite 42 | #define snprintf _snprintf 43 | //#define vsnprintf _vsnprintf 44 | //#define strftime strftime_ 45 | 46 | #define NO_NULL_REALLOC 1 47 | #if NO_NULL_REALLOC 48 | # define rrd_realloc(a,b) ( (a) == NULL ? malloc( (b) ) : realloc( (a) , (b) )) 49 | #else 50 | # define rrd_realloc(a,b) realloc((a), (b)) 51 | #endif 52 | 53 | /* Vertical label angle: 90.0 (default) or 270.0 */ 54 | #define RRDGRAPH_YLEGEND_ANGLE 90.0 55 | 56 | #define RRD_DEFAULT_FONT "Courier" 57 | 58 | /* #define DEBUG 1 */ 59 | 60 | __inline int round(double a){int x = (a + 0.5); return x;} 61 | 62 | #endif /* CONFIG_H */ 63 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/win32/rrd.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual C++ Express 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rrdlib", "rrdlib.vcproj", "{CC158E1D-1364-43CA-9B2D-4AF54225C7CA}" 5 | EndProject 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rrdtool", "rrdtool.vcproj", "{11CD05F8-E5E1-476E-A75F-A112655D4E94}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rrdupdate", "rrdupdate.vcproj", "{3AAE1E07-78D7-420D-968B-D2087D732D3B}" 9 | ProjectSection(ProjectDependencies) = postProject 10 | {11CD05F8-E5E1-476E-A75F-A112655D4E94} = {11CD05F8-E5E1-476E-A75F-A112655D4E94} 11 | EndProjectSection 12 | EndProject 13 | Global 14 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 15 | Debug|Win32 = Debug|Win32 16 | DebugDLL|Win32 = DebugDLL|Win32 17 | Release|Win32 = Release|Win32 18 | ReleaseDLL|Win32 = ReleaseDLL|Win32 19 | Static Debug|Win32 = Static Debug|Win32 20 | EndGlobalSection 21 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 22 | {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.Debug|Win32.ActiveCfg = Debug|Win32 23 | {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.Debug|Win32.Build.0 = Debug|Win32 24 | {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32 25 | {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.DebugDLL|Win32.Build.0 = DebugDLL|Win32 26 | {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.Release|Win32.ActiveCfg = Release|Win32 27 | {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.Release|Win32.Build.0 = Release|Win32 28 | {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32 29 | {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32 30 | {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.Static Debug|Win32.ActiveCfg = Static Debug|Win32 31 | {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.Static Debug|Win32.Build.0 = Static Debug|Win32 32 | {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Debug|Win32.ActiveCfg = Debug|Win32 33 | {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Debug|Win32.Build.0 = Debug|Win32 34 | {11CD05F8-E5E1-476E-A75F-A112655D4E94}.DebugDLL|Win32.ActiveCfg = Debug|Win32 35 | {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Release|Win32.ActiveCfg = Release|Win32 36 | {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Release|Win32.Build.0 = Release|Win32 37 | {11CD05F8-E5E1-476E-A75F-A112655D4E94}.ReleaseDLL|Win32.ActiveCfg = Release|Win32 38 | {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Static Debug|Win32.ActiveCfg = Static Debug|Win32 39 | {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Static Debug|Win32.Build.0 = Static Debug|Win32 40 | {3AAE1E07-78D7-420D-968B-D2087D732D3B}.Debug|Win32.ActiveCfg = Debug|Win32 41 | {3AAE1E07-78D7-420D-968B-D2087D732D3B}.Debug|Win32.Build.0 = Debug|Win32 42 | {3AAE1E07-78D7-420D-968B-D2087D732D3B}.DebugDLL|Win32.ActiveCfg = Debug|Win32 43 | {3AAE1E07-78D7-420D-968B-D2087D732D3B}.Release|Win32.ActiveCfg = Release|Win32 44 | {3AAE1E07-78D7-420D-968B-D2087D732D3B}.Release|Win32.Build.0 = Release|Win32 45 | {3AAE1E07-78D7-420D-968B-D2087D732D3B}.ReleaseDLL|Win32.ActiveCfg = Release|Win32 46 | {3AAE1E07-78D7-420D-968B-D2087D732D3B}.Static Debug|Win32.ActiveCfg = Static Debug|Win32 47 | {3AAE1E07-78D7-420D-968B-D2087D732D3B}.Static Debug|Win32.Build.0 = Static Debug|Win32 48 | EndGlobalSection 49 | GlobalSection(SolutionProperties) = preSolution 50 | HideSolutionNode = FALSE 51 | EndGlobalSection 52 | EndGlobal 53 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/win32/rrdtool.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual C++ Express 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rrdtool", "rrdtool.vcproj", "{11CD05F8-E5E1-476E-A75F-A112655D4E94}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Release|Win32 = Release|Win32 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Debug|Win32.ActiveCfg = Debug|Win32 13 | {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Debug|Win32.Build.0 = Debug|Win32 14 | {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Release|Win32.ActiveCfg = Release|Win32 15 | {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Release|Win32.Build.0 = Release|Win32 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /rrdtool-1.4.7/win32/rrdupdate.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual C++ Express 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rrdupdate", "rrdupdate.vcproj", "{3AAE1E07-78D7-420D-968B-D2087D732D3B}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Release|Win32 = Release|Win32 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {3AAE1E07-78D7-420D-968B-D2087D732D3B}.Debug|Win32.ActiveCfg = Debug|Win32 13 | {3AAE1E07-78D7-420D-968B-D2087D732D3B}.Debug|Win32.Build.0 = Debug|Win32 14 | {3AAE1E07-78D7-420D-968B-D2087D732D3B}.Release|Win32.ActiveCfg = Release|Win32 15 | {3AAE1E07-78D7-420D-968B-D2087D732D3B}.Release|Win32.Build.0 = Release|Win32 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # setup.py 4 | # 5 | # python-rrdtool distutil setup 6 | # 7 | # Primary author: Hye-Shik Chang 8 | # Maintainer: Piotr Banaszkiewicz 9 | # 10 | # This file is part of python-rrdtool. 11 | # 12 | # python-rrdtool is free software; you can redistribute it and/or modify 13 | # it under the terms of the GNU Lesser General Public License as published 14 | # by the Free Software Foundation; either version 2 of the License, or 15 | # (at your option) any later version. 16 | # 17 | # python-rrdtool is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | # GNU Lesser General Public License for more details. 21 | 22 | from distutils.core import setup, Extension, Command 23 | from distutils.command.build import build 24 | from distutils.command.build_ext import build_ext 25 | from distutils.spawn import find_executable 26 | import os 27 | import os.path 28 | 29 | 30 | SOURCE = "rrdtool-1.4.7" 31 | RRDBASE = os.environ.get('LOCALBASE', SOURCE + '/src') 32 | library_dir = os.environ.get('BUILDLIBDIR', os.path.join(RRDBASE, '.libs')) 33 | include_dir = os.environ.get('INCDIR', RRDBASE) 34 | 35 | 36 | class configure(build): 37 | def run(self): 38 | executable = find_executable("configure", path=SOURCE) 39 | if executable: 40 | import subprocess 41 | executable = os.path.abspath(executable) 42 | subprocess.check_call(executable, cwd=os.path.dirname(executable)) 43 | build.run(self) # running parent, even though it seems empty 44 | 45 | 46 | class BuildConfigure(Command): 47 | description = "Generate configuration files using ./configure (autoconf)" 48 | 49 | def initialize_options(self): 50 | pass 51 | 52 | def finalize_options(self): 53 | pass 54 | 55 | def run(self): 56 | if not os.path.exists(os.path.join(SOURCE, "config.status")): 57 | executable = find_executable("configure", path=SOURCE) 58 | if executable: 59 | import subprocess 60 | executable = os.path.abspath(executable) 61 | os.chmod(executable, 0777) 62 | subprocess.check_call(executable, cwd=os.path.dirname(executable)) 63 | 64 | 65 | class BuildExtension(build_ext): 66 | def run(self): 67 | for cmd_name in self.get_sub_commands(): 68 | self.run_command(cmd_name) 69 | 70 | build_ext.run(self) 71 | 72 | sub_commands = [("build_configure", None)] + build_ext.sub_commands 73 | 74 | 75 | setup( 76 | name="python-rrdtool", 77 | version="1.4.7", 78 | description="Working Python RRDTool binding", 79 | author="Piotr Banaszkiewicz", 80 | author_email="piotr@banaszkiewicz.org", 81 | license="LGPL", 82 | url="https://github.com/pbanaszkiewicz/python-rrdtool", 83 | long_description=open("README.rst", "r").read(), 84 | classifiers=[ 85 | "Development Status :: 5 - Production/Stable", 86 | "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)", 87 | "Topic :: Software Development :: Libraries :: Python Modules", 88 | "Topic :: System :: Archiving", 89 | "Topic :: System :: Monitoring", 90 | "Topic :: Utilities", 91 | ], 92 | cmdclass={"build_configure": BuildConfigure, "build_ext": BuildExtension}, 93 | ext_modules=[ 94 | Extension( 95 | "rrdtoolmodule", 96 | [SOURCE + "/bindings/python/rrdtoolmodule.c"], 97 | libraries=['rrd'], 98 | library_dirs=[library_dir], 99 | include_dirs=[include_dir], 100 | ) 101 | ] 102 | ) 103 | --------------------------------------------------------------------------------