PHP - Manual: RRDUpdater::update
2024-12-21
(PECL rrd >= 0.9.0)
RRDUpdater::update — Update the RRD database file
$values
, string $time
= time()
): boolUpdates the RRD file defined via RRDUpdater::__construct(). The file is updated with a specific values.
values
Data for update. Key is data source name.
time
Time value for updating the RRD with a particular data. Default value is current time.
成功时返回 true
, 或者在失败时返回 false
。
Throws a Exception on error.
示例 #1 RRDUpdater::update() examples
<?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");
?>