RRDp(3)                             rrdtool                            RRDp(3)



[1mNAME[0m
       RRDp - Attach rrdtool from within a perl script via a set of pipes;

[1mSYNOPSIS[0m
       use [1mRRDp[0m

       [1mRRDp::start [4m[22mpath[24m [4mto[24m [4mrrdtool[24m [4mexecutable[0m

       [1mRRDp::cmd  [4m[22mrrdtool[24m [4mcommandline[0m

       $answer = [1mRRD::read[0m

       $status = [1mRRD::end[0m

       [1m$RRDp::user[22m,  [1m$RRDp::sys[22m, [1m$RRDp::real[0m

[1mDESCRIPTION[0m
       With this module you can safely communicate with the rrdtool.

       After every [1mRRDp::cmd [22myou have to issue an [1mRRDp::read [22mcommand to get
       [1mrrdtool[22ms answer to your command. The answer is returned as a pointer,
       in order to speed things up. If the last command did not return any
       data, [1mRRDp::read [22mwill return an undefined variable.

       If you import the PERFORMANCE variables into your namespace, you can
       access rrdtools internal performance measurements.

       use [1mRRDp[0m
               Load the RRDp::pipe module.

       [1mRRDp::start [4m[22mpath[24m [4mto[24m [4mrrdtool[24m [4mexecutable[0m
               start rrdtool. The argument must be the path to the rrdtool
               executable

       [1mRRDp::cmd [4m[22mrrdtool[24m [4mcommandline[0m
               pass commands on to rrdtool. check the rrdtool documentation
               for more info on the rrdtool commands.

       $answer = [1mRRDp::read[0m
               read rrdtools response to your command. Note that the $answer
               variable will only contain a pointer to the returned data. The
               reason for this is, that rrdtool can potentially return quite
               excessive amounts of data and we don't want to copy this around
               in memory. So when you want to access the contents of $answer
               you have to use $$answer which dereferences the variable.

       $status = [1mRRDp::end[0m
               terminates rrdtool and returns rrdtools status ...

       [1m$RRDp::user[22m,  [1m$RRDp::sys[22m, [1m$RRDp::real[0m
               these variables will contain totals of the user time, system
               time and real time as seen by rrdtool.  User time is the time
               rrdtool is running, System time is the time spend in system
               calls and real time is the total time rrdtool has been running.

               The difference between user + system and real is the time spent
               waiting for things like the hard disk and new input from the
               perl script.

[1mEXAMPLE[0m
        use RRDp;
        RRDp::start "/usr/local/bin/rrdtool";
        RRDp::cmd   qw(create demo.rrd --step 100
                      DS:in:GAUGE:100:U:U
                      RRA:AVERAGE:0.5:1:10);
        $answer = RRDp::read;
        print $$answer;
        ($usertime,$systemtime,$realtime) =  ($RRDp::user,$RRDp::sys,$RRDp::real);

[1mSEE ALSO[0m
       For more information on how to use rrdtool, check the manpages.

[1mAUTHOR[0m
       Tobias Oetiker <oetiker@ee.ethz.ch>



1.0.41                            2003-02-19                           RRDp(3)
