note 113153 added to function.rrd-fetch
| From: | stephanecharette at gmail dot com | Date: | Fri, 06 Sep 2013 05:50:59 +0000 |
| Subject: | note 113153 added to function.rrd-fetch | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-196178@lists.php.net to get a copy of this message | ||
For example, this worked for me:
<?php
$result = rrd_fetch( "mydata.rrd", array( "AVERAGE", "--resolution",
"60", "--start", "-1d", "--end", "start+1h" ) );
?>
This will fetch all fields. You then have to use something like this to get to a specified rrd
field:
<?php
foreach ( $result["data"]["myfield"] as $key => $value )
{
echo "At timestamp $key, the value for myfield is $value.\n";
}
?>
----
Server IP: 69.147.83.199
Probable Submitter: 154.20.63.248
----
Manual Page -- http://php.net/manual/en/function.rrd-fetch.php
Edit -- https://master.php.net/note/edit/113153
Del: integrated -- https://master.php.net/note/delete/113153/integrated
Del: useless -- https://master.php.net/note/delete/113153/useless
Del: bad code -- https://master.php.net/note/delete/113153/bad+code
Del: spam -- https://master.php.net/note/delete/113153/spam
Del: non-english -- https://master.php.net/note/delete/113153/non-english
Del: in docs -- https://master.php.net/note/delete/113153/in+docs
Del: other reasons-- https://master.php.net/note/delete/113153
Reject -- https://master.php.net/note/reject/113153
Search -- https://master.php.net/manage/user-notes.php