diff --git a/reference/rrd/book.xml b/reference/rrd/book.xml index b8bb3436e8..b9c2d8c989 100644 --- a/reference/rrd/book.xml +++ b/reference/rrd/book.xml @@ -1,21 +1,20 @@ - - + RRDtool RRD &reftitle.intro; - + The PECL/rrd extension provides bindings to the RRDtool C library. RRDtool is the open source industry standard, high performance data logging and graphing system for time series data. - - + + The RRDtool homepage is &url.rrd;. - + &reference.rrd.setup; @@ -26,7 +25,6 @@ &reference.rrd.rrdgraph; &reference.rrd.rrdupdater; - - -
+
&reftitle.install; - + &pecl.info; &url.pecl.package;rrd - +
- - - + rrd_create Creates rrd database file @@ -14,9 +13,9 @@ stringfilename arrayoptions - + Creates the rdd database file. - + @@ -25,18 +24,18 @@ filename - + Filename for newly created rrd file. - + options - + Options for rrd create - list of strings. See man page of rrd create for whole list of options. - + @@ -44,12 +43,11 @@ &reftitle.returnvalues; - + &return.success; - + - - - + rrd_error Gets latest error message @@ -11,11 +10,11 @@ &reftitle.description; stringrrd_error - + - + Returns latest global rrd error message. - + @@ -25,13 +24,12 @@ &reftitle.returnvalues; - + Latest error message. - + - - - + rrd_fetch Fetch the data for graph as array @@ -14,11 +13,11 @@ stringfilename arrayoptions - + Gets data for graph output from RRD database file as array. This function has same result as rrd_graph, but fetched data are returned as array, no image file is created. - + @@ -27,17 +26,17 @@ filename - + RRD database file name. - + options - + Array of options for resolution specification. - + @@ -45,13 +44,12 @@ &reftitle.returnvalues; - + Returns information about retrieved graph data. - + - - - + rrd_first Gets the timestamp of the first sample from rrd file @@ -14,9 +13,9 @@ stringfile intraaindex0 - + Returns the first data sample from the specified RRA of the RRD file. - + @@ -25,17 +24,17 @@ file - + RRD database file name. - + raaindex - + The index number of the RRA that is to be examined. Default value is 0. - + @@ -43,13 +42,12 @@ &reftitle.returnvalues; - + Integer number of unix timestamp,&return.falseforfailure;. - + - - - + rrd_graph Creates image from a data @@ -14,9 +13,9 @@ stringfilename arrayoptions - + Creates image for a particular data from RRD file. - + @@ -25,21 +24,21 @@ filename - + The filename to output the graph to. This will generally end in either .png, .svg or .eps, depending on the format you want to output. - + options - + Options for generating image. See man page of rrd graph for all possible options. All options (data definitions, variable definitions, etc.) are allowed. - + @@ -47,12 +46,11 @@ &reftitle.returnvalues; - + Array with information about generated image is returned,&return.falseforfailure;. - + - - - + rrd_info Gets information about rrd file @@ -13,9 +12,9 @@ arrayrrd_info stringfilename - + Returns information about particular RRD database file. - + @@ -24,9 +23,9 @@ file - + RRD database file name. - + @@ -34,14 +33,13 @@ &reftitle.returnvalues; - + Array with information about requested RRD file,&return.falseforfailure;. - + - - - + rrd_last Gets unix timestamp of the last sample @@ -13,9 +12,9 @@ intrrd_last stringfilename - + Returns the UNIX timestamp of the most recent update of the RRD database. - + @@ -24,9 +23,9 @@ filename - + RRD database file name. - + @@ -34,13 +33,12 @@ &reftitle.returnvalues; - + Integer as unix timestamp of the most recent data from the RRD database. - + - - - + rrd_lastupdate Gets information about last updated data @@ -13,10 +12,10 @@ arrayrrd_lastupdate stringfilename - + Gets array of the UNIX timestamp and the values stored for each date in the most recent update of the RRD database file. - + @@ -25,9 +24,9 @@ file - + RRD database file name. - + @@ -35,12 +34,11 @@ &reftitle.returnvalues; - + Array of information about last update,&return.falseforfailure;. - + - - - + rrd_restore Restores the RRD file from XML dump @@ -15,9 +14,9 @@ stringrrd_file arrayoptions - + Restores the RRD file from the XML dump. - + @@ -26,25 +25,25 @@ xml_file - + XML filename with the dump of the original RRD database file. - + rrd_file - + Restored RRD database file name. - + options - + Array of options for restoring. See man page for rrd restore. - + @@ -52,12 +51,11 @@ &reftitle.returnvalues; - + &return.success; - + - - - + rrd_tune Tunes some RRD database file header options @@ -14,10 +13,10 @@ stringfilename arrayoptions - + Change some options in the RRD dabase header file. E.g. renames the source for the data etc. - + @@ -26,18 +25,18 @@ filename - + RRD database file name. - + options - + Options with RRD database file properties which will be changed. See rrd tune man page for details. - + @@ -45,13 +44,12 @@ &reftitle.returnvalues; - + &return.success; - + - - - + rrd_update Updates the RRD database @@ -14,10 +13,10 @@ stringfilename arrayoptions - + Updates the RRD database file. The input data is time interpolated according to the properties of the RRD database file. - + @@ -26,18 +25,18 @@ filename - + RRD database file name. This database will be updated. - + options - + Options for updating the RRD database. This is list of strings. See man page of rrd update for whole list of options. - + @@ -45,12 +44,11 @@ &reftitle.returnvalues; - + &return.success; - + - - - + rrd_version Gets information about underlying rrdtool library @@ -11,11 +10,11 @@ &reftitle.description; stringrrd_version - + - + Returns information about underlying rrdtool library. - + @@ -25,13 +24,12 @@ &reftitle.returnvalues; - + String with rrdtool version number e.g. "1.4.3". - + - - - + rrd_xport Exports the information about RRD database @@ -13,11 +12,11 @@ arrayrrd_xport arrayoptions - + Exports the information about RRD database file. This data can be converted to XML file via user space PHP script and then restored back as RRD database file. - + @@ -26,9 +25,9 @@ options - + Array of options for the export, see rrd xport man page. - + @@ -36,13 +35,12 @@ &reftitle.returnvalues; - + Array with information about RRD database file,&return.falseforfailure;. - + - - - + rrdc_disconnect Close any outstanding connection to rrd caching daemon @@ -11,20 +10,20 @@ &reftitle.description; voidrrdc_disconnect - + - + Close any outstanding connection to rrd caching daemon. - - + + This function is automatically called when the whole PHP process is terminated. It depends on used SAPI. For example, it's called automatically at the end of command line script. - - + + It's up user whether he wants to call this function at the end of every request or otherwise. - + @@ -34,13 +33,12 @@ &reftitle.returnvalues; - + &return.void; - + - - - + The RRDCreator class RRDCreator @@ -10,9 +9,9 @@
&reftitle.intro; - + Class for creation of RRD database file. - +
@@ -48,7 +47,6 @@ &reference.rrd.entities.rrdcreator;
- - - + RRDCreator::addArchive Adds RRA - archive of data values for each data source @@ -13,12 +12,12 @@ public voidRRDCreator::addArchive stringdescription - + Adds RRA definition by description of archive. Archive consists of a number of data values or statistics for each of the defined data-sources (DS). Data sources are defined by method RRDCreator::addDataSource. You need call this method for each requested archive. - + @@ -27,10 +26,10 @@ description - + Definition of archive - RRA. This has same format as RRA definition in rrd create command. See man page of rrd create for more details. - + @@ -38,12 +37,11 @@ &reftitle.returnvalues; - + &return.void; - + - - - + RRDCreator::addDataSource Adds data source definition for RRD database @@ -13,11 +12,11 @@ public voidRRDCreator::addDataSource stringdescription - + RRD can accept input from several data sources (DS), e.g incoming and outgoing traffic. This method adds data source by description. You need call this method for each data source. - + @@ -26,10 +25,10 @@ description - + Definition of data source - DS. This has same format as DS definition in rrd create command. See man page of rrd create for more details. - + @@ -37,12 +36,11 @@ &reftitle.returnvalues; - + &return.void; - + - - - + RRDCreator::__construct Creates new RRDCreator instance @@ -15,9 +14,9 @@ stringstartTime intstep0 - + Creates new RRDCreator instance. - + @@ -26,33 +25,32 @@ path - + Path for newly created RRD database file. - + startTime - + Time for the first value in RRD database. Parameter supports all formats which are supported by rrd create call. - + intstep - + Base interval in seconds with which data will be fed into the RRD database. - + - - - + RRDCreator::save Saves the RRD database to a file @@ -11,11 +10,11 @@ &reftitle.description; public boolRRDCreator::save - + - + Saves the RRD database into file, which name is defined by RRDCreator::__construct. - + @@ -25,12 +24,11 @@ &reftitle.returnvalues; - + &return.success; - + - - - + The RRDGraph class RRDGraph @@ -11,9 +10,9 @@
&reftitle.intro; - + Class for exporting data from RRD database to image file. - +
@@ -49,7 +48,6 @@ &reference.rrd.entities.rrdgraph;
- - - + RRDGraph::__construct Creates new RRDGraph instance @@ -13,10 +12,10 @@ public RRDGraph::__construct stringpath - + Creates new RRDGraph instance. This instance is responsible for rendering the result of RRD database query into image. - + @@ -25,16 +24,15 @@ path - + Full path for the newly created image. - + - - - + RRDGraph::save Saves the result of query into image @@ -11,12 +10,12 @@ &reftitle.description; public arrayRRDGraph::save - + - + Saves the result of RRD database query into image defined by RRDGraph::__construct. - + @@ -26,12 +25,11 @@ &reftitle.returnvalues; - + Returns array with information about generated image,&return.falseforfailure;. - + - - - + RRDGraph::saveVerbose Saves the RRD database query into image and returns the verbose @@ -13,13 +12,13 @@ &reftitle.description; public arrayRRDGraph::saveVerbose - + - + Saves the RRD database query into image file defined by method RRDGraph::__construct and returns the verbose information about generated graph, if "-" is used as image filename, image data are also returned in result array. - + @@ -29,12 +28,11 @@ &reftitle.returnvalues; - + Returns array with detailed information about generated image,&return.falseforfailure;. - + - - - + RRDGraph::setOptions Sets the options for rrd graph export @@ -13,9 +12,9 @@ public voidRRDGraph::setOptions arrayoptions - + - + @@ -24,11 +23,11 @@ options - + List of options for the image generation from the RRD database file. It can be list of strings or list of strings with keys for better readability. Read the rrd graph man pages for list of available options. - + @@ -36,11 +35,11 @@ &reftitle.returnvalues; - - &return.void; - + + &return.void; + - + &reftitle.examples; @@ -81,10 +80,10 @@ $graphObj->setOptions(array( ?> ]]> - + Don't use key value syntax for same rrd option. It looks more readable, but it doesn't work. - + setOptions(array( ?> ]]> - + In nature of php it's same as - + setOptions(array( - - - + The RRDUpdater class RRDUpdater @@ -11,9 +10,9 @@
&reftitle.intro; - + Class for updating RDD database file. - +
@@ -49,7 +48,6 @@ &reference.rrd.entities.rrdupdater;
- - - + RRDUpdater::__construct Creates new RRDUpdater instance @@ -13,10 +12,10 @@ public RRDUpdater::__construct stringpath - + Creates new RRDUpdater instance. This instance is responsible for updating the RRD database file. - + @@ -25,16 +24,15 @@ path - + Filesystem path for RRD database file, which will be updated. - + - - - + &reftitle.setup;
&reftitle.required; - + You need to install librrd first to be able to use PECL/rrd. Most common option is using of librrd-dev package from your favourite Linux distro. PECL/rrd is tested with librrd 1.4.3, older or newer versions might or might not work for you. - + - + Librrd and hence extension itself aren't mostly thread safe. There are many global and shared states in librrd. It can be dangerous use this extension in multi threaded environments like Apache2 mpm worker. If there are many parallel requests, one request can change some global librrd state of other runnig requests. - +
&reftitle.install; - + &pecl.info; - &url.pecl.package;rrd. - + &url.pecl.package;rrd. +
-