⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rrd_fetch.php

📁 监控软件rrdtools
💻 PHP
字号:
<? ## the following line is only needed if built as a self-contained ## extension.  If you build the rrdtool module as an embedded ## extension, the rrd_* functions will always be available, so you ## do not need the dl() call. dl("rrdtool.so"); ## ## demonstration of the rrd_fetch() command ##  $opts = array ( "AVERAGE", "--start", "-1h" );  $ret = rrd_fetch("/dir/router-port2.rrd", $opts, count($opts));   ##  ## if $ret is an array, rrd_fetch() succeeded  ##   if ( is_array($ret) )  {      echo "Start time    (epoch): $ret[start]\n";      echo "End time      (epoch): $ret[end]\n";      echo "Step interval (epoch): $ret[step]\n";      ##      ## names of the DS's (data sources) will be       ## contained in the array $ret[ds_namv][..]      ##      for($i = 0; $i < count($ret[ds_namv]); $i++)      {          $tmp = $ret[ds_namv][$i];          echo "$tmp \n";      }      ##      ## all data will be packed into the      ## $ret[data][..]  array      ##      for($i = 0; $i < count($ret[data]); $i++)      {          $tmp = $ret[data][$i];          echo "$hi\n";      }  }  else  {      $err = rrd_error();      echo "fetch() ERROR: $err\n";  }?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -