RRDUpdater::update
PHP function
Edit on GitHub ✎
(PECL rrd >= 0.9.0)
Update the RRD database file
Description
RRDUpdater::update(array $values, string $time = time()): bool
Updates the RRD file defined via RRDUpdater::__construct. The file is updated with a specific values.
Parameters
valuesData for update. Key is data source name.
timeTime value for updating the RRD with a particular data. Default value is current time.
Return Values
Success
Errors/Exceptions
Throws a Exception on error.
Examples
RRDUpdater::update examples
php
<?php
$updator = new RRDUpdater("speed.rrd");
//updates the data source "speed" with value "12411"
//for time defined by timestamp "920807700"
$updator->update(array("speed" => "12411"), "920807700");
?>