IT. Expert System.

PHP

Procedural PECL/rrd example


Procedural PECL/rrd example

Example #1 Procedural usage of rrd

<?php
$rrdFile 
dirname(__FILE__) . "/speed.rrd";

//create rrd file
rrd_create($rrdFile,
 array(
  
"--start",920804400,
  
"DS:speed:COUNTER:600:U:U",
  
"RRA:AVERAGE:0.5:1:24",
  
"RRA:AVERAGE:0.5:6:10"
  
)
);

//update rrd file
rrd_update($rrdFile,
 array(
  
"920804700:12345",
  
"920805000:12357"
  
)
);

//graph output
rrd_graph(dirname(__FILE__) . "/speed.png",
 array(
  
"--start""920804400",
  
"--end""920808000",
  
"--vertical-label""m/s",
  
"DEF:myspeed=$rrdFile:speed:AVERAGE",
  
"CDEF:realspeed=myspeed,1000,*",
  
"LINE2:realspeed#FF0000"
 
)
);
?>



Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 487 / . Delta: 0.01382 с