downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

rrd_first> <rrd_error
[edit] Last updated: Fri, 17 May 2013

view this page in

rrd_fetch

(PECL rrd >= 0.9.0)

rrd_fetchFetch the data for graph as array.

Beschreibung

array rrd_fetch ( string $filename , array $options )

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.

Parameter-Liste

filename

RRD database file name.

options

Array of options for resolution specification.

Rückgabewerte

Returns information about retrieved graph data.



add a note add a note User Contributed Notes rrd_fetch - [1 notes]
up
-4
Andrew Hodel
1 year ago
There is a third required argument to this function, if you pass just the 2 listed here the function will return no data.

The third argument is the number of results you want, if you want everything simply pass count($OPTSARRAY) as arg3.

<?php
$opts
= array ( "AVERAGE", "--start", '-1d');
print_r(rrd_fetch('./rrds/file.rrd', $opts, count($opts)));
?>

 
show source | credits | stats | sitemap | contact | advertising | mirror sites