mirror of
https://github.com/librenms/librenms.git
synced 2024-09-28 22:06:25 +00:00
41 lines
854 B
PHP
41 lines
854 B
PHP
|
<?php
|
||
|
|
||
|
function rrdtool_update($rrdfile, $rrdupdate)
|
||
|
{
|
||
|
return rrdtool("update", $rrdfile, $rrdupdate);
|
||
|
}
|
||
|
|
||
|
function rrdtool_create($rrdfile, $rrdupdate)
|
||
|
{
|
||
|
return rrdtool("create", $rrdfile, $rrdupdate);
|
||
|
}
|
||
|
|
||
|
function rrdtool_fetch($rrdfile, $rrdupdate)
|
||
|
{
|
||
|
return rrdtool("fetch", $rrdfile, $rrdupdate);
|
||
|
}
|
||
|
|
||
|
function rrdtool_graph($rrdfile, $rrdupdate)
|
||
|
{
|
||
|
return rrdtool("graph", $rrdfile, $rrdupdate);
|
||
|
}
|
||
|
|
||
|
function rrdtool_last($rrdfile, $rrdupdate)
|
||
|
{
|
||
|
return rrdtool("last", $rrdfile, $rrdupdate);
|
||
|
}
|
||
|
|
||
|
function rrdtool_lastupdate($rrdfile, $rrdupdate)
|
||
|
{
|
||
|
return rrdtool("lastupdate", $rrdfile, $rrdupdate);
|
||
|
}
|
||
|
|
||
|
function rrdtool($command, $file, $options)
|
||
|
{
|
||
|
global $config; global $debug;
|
||
|
if ($config['debug']) { echo($config['rrdtool'] . " $command $file $options \n"); }
|
||
|
return shell_exec($config['rrdtool'] . " $command $file $options");
|
||
|
}
|
||
|
|
||
|
?>
|