Or if some pictu res are missing, then the mirror may not have picked up the contents of the inc directory.rrdtool - [workdir]| function It is pretty easy to gather status information from all sorts of things, ranging from the temperature in your office to the number of octets which have passed through the FDDI interface of your router.
Normally when using graph, xport or fetch the data you see will come from an actual rrd file.
See the examples directory for more ways to use this extension.
Unfortunately, you may not always be able to fetch data at exactly the time you want to.
Therefore RRDtool lets you update the log file at any time you want.
# $start : timestamp # $end : timestamp # $step : seconds # $cols : number of returned columns # $names : arrayref with the names of the columns # $data : arrayref of arrayrefs with the data (first index is time, second is column) RRDs::times returns two integers which are the number of seconds since epoch (1970-01-01) for the supplied "start" and "end" arguments, respectively.
When calling with '-' as the filename then the contents of the graph will be returned in the hash as well (key 'image'). The keys of the hash are concatenated strings of a timestamp, RRA index, and data source name for each consolidated data point (CDP) written to disk as a result of the current update call. RRDs::fetch is the most complex of the pack regarding return values. Two normal integers, a pointer to an array and a pointer to an array of pointers. print "Start: ", scalar localtime($start), " ($start)\n"; print "Step size: $step seconds\n"; print "DS names: ", join (", ", @$names)."\n"; print "Data points: ", $#$data 1, "\n"; print "Data:\n"; for my $line (@$data) my ($start,$end,$step,$cols,$names,$data) = RRDs::xport ...
Using a custom callback, you can supply your own code for handling the data requests from graph, xport and fetch.
To do this, you have to first write a fetch function in perl, and then register this function using .
The RRDs::times function takes two parameters: a "start" and "end" time.
Some people who like the look of rrd charts, therefore export their data from a database and then load it into an rrd file just to be able to call rrdgraph on it.
But it is not so trivial to store this data in an efficient and systematic manner. It lets you log and analyze the data you gather from all kinds of data-sources (DS).