Difference between revisions of "RRDTool"

Jump to navigation Jump to search
797 bytes added ,  13:51, 9 March 2010
→‎Update Database: Populated (section previously blank)
m (Added some section headings)
(→‎Update Database: Populated (section previously blank))
Line 56: Line 56:


== Update Database ==
== Update Database ==
The following updates an RRD file with a number of (one or more) time:value pairs.  The number of pairs is limited by the maximum command length the calling script can handle.  Time should be in Unix seconds since Epoch (1/1/1970 00:00:00 UTC) format (you'll need to account for daylight savings if converting from a local time value).
<pre>
rrdtool update svr-cpu.rrd 1268138780:3.99 1268138800:4.16 1268138820:3.33 1268138840:3.94
</pre>
It can be useful to know when an RRD was last updated (eg so your script knows where its meant to be updating from, though this should be an interval later than the time returned).  Note that if you've defined more than one dataset in an RRD then you'll get the latest update if the DSs aren't being updated in sync.
<pre>
rrdtool last svr-cpu.rrd
</pre>


== Retrieve From Database ==
== Retrieve From Database ==

Navigation menu