array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'uk', ), 'this' => array ( 0 => 'rrdupdater.update.php', 1 => 'RRDUpdater::update', 2 => 'Update the RRD database file', ), 'up' => array ( 0 => 'class.rrdupdater.php', 1 => 'RRDUpdater', ), 'prev' => array ( 0 => 'rrdupdater.construct.php', 1 => 'RRDUpdater::__construct', ), 'next' => array ( 0 => 'book.scoutapm.php', 1 => 'ScoutAPM', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/rrd/rrdupdater/update.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

RRDUpdater::update

(PECL rrd >= 0.9.0)

RRDUpdater::updateUpdate the RRD database file

Опис

public RRDUpdater::update(array $values, string $time = time() ): bool

Updates 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");
?>