Smokeping::RRDtools(3)      SmokePing      Smokeping::RRDtools(3)



NNAAMMEE
       Smokeping::RRDtools - Tools for RRD file handling

SSYYNNOOPPSSIISS
        use Smokeping::RRDtools;
        use RRDs;

        my $file = '/path/to/file.rrd';

        # get the create arguments that $file was created with
        my $create = Smokeping::RRDtools::info2create($file);

        # use them to create a new file
        RRDs::create('/path/to/file2.rrd', @$create);

        # or compare them against another create list
        my @create = ('--step', 60, 'DS:ds0:GAUGE:120:0:U', 'RRA:AVERAGE:0.5:1:1008');
        my ($fatal, $comparison) = Smokeping::RRDtools::compare($file, \@create);
        print "Fatal: " if $fatal;
        print "Create arguments didn't match: $comparison\n" if $comparison;

        Smokeping::RRDtools::tuneds($file, \@create);

DDEESSCCRRIIPPTTIIOONN
       This module offers three functions, "info2create", "com-
       pare" and "tuneds". The first can be used to recreate the
       arguments that an RRD file was created with. The second
       checks if an RRD file was created with the given argu-
       ments. The thirds tunes the DS parameters according to the
       supplied create string.

       The function "info2create" must be called with one argu-
       ment: the path to the interesting RRD file. It will return
       an array reference of the argument list that can be fed to
       "RRDs::create".  Note that this list will never contain
       the "start" parameter, but it wwiillll contain the "step"
       parameter.

       The function "compare" must be called with two arguments:
       the path to the interesting RRD file, and a reference to
       an argument list that could be fed to "RRDs::create". The
       function will then simply compare the result of "info2cre-
       ate" with this argument list. It will return an array of
       two values: "(fatal, text)" where  "fatal" is 1 if it
       found a fatal difference, and 0 if not.  The "text" will
       contain an error message if "fatal == 1" and a possible
       warning message if "fatal == 0". If "fatal == 0" and
       "text" is "undef", all the arguments matched.

       Note that if there is a "start" parameter in the argument
       list, "compare" disregards it. If "step" isn't specified,
       "compare" will use the "rrdtool" default of 300 seconds.
       "compare" ignores non-matching DS parameters since
       "tuneds" will fix them.

       "tuneds" talks on stderr about the parameters it fixes.

NNOOTTEESS
       This module is not particularly specific to Smokeping, it
       is just distributed with it.

BBUUGGSS
       Probably.

CCOOPPYYRRIIGGHHTT
       Copyright (c) 2005 by Niko Tyni.

AAUUTTHHOORR
       Niko Tyni <ntyni@iki.fi>

LLIICCEENNSSEE
       This program is free software; you can redistribute it
       and/or modify it under the terms of the GNU General Public
       License as published by the Free Software Foundation;
       either version 2 of the License, or (at your option) any
       later version.

       This program is distributed in the hope that it will be
       useful, but WITHOUT ANY WARRANTY; without even the implied
       warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
       PURPOSE.  See the GNU General Public License for more
       details.

       You should have received a copy of the GNU General Public
       License along with this program; if not, write to the Free
       Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
       02139, USA.

SSEEEE AALLSSOO
       _R_R_D_s(3)



2.0.9                       2006-03-24     Smokeping::RRDtools(3)
