RRD 函数
在线手册:中文  英文

rrd_fetch

(PECL rrd >= 0.9.0)

rrd_fetchFetch the data for graph as array.

说明

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.

参数

filename

RRD database file name.

options

Array of options for resolution specification.

返回值

Returns information about retrieved graph data.


RRD 函数
在线手册:中文  英文

用户评论:

Andrew Hodel (2011-08-16 06:33:22)

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'$optscount($opts)));
?>

易百教程