123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158 |
- <?php
- // $Id: class_debug.inc,v 1.1 2002/12/29 16:19:36 dijkstra Exp $
- require_once("class_graph.inc");
- class DEBUG_Graph extends Graph {
- function DEBUG_Graph() {
- // get all the sensible defaults from our parent class
- $this->init();
- }
- function execute($url) {
- $this->url2options($url);
- // Four major display modes:
- // if=brief|bits|packets|all
- $this->shortcut = array_merge($this->shortcut, array(
- "debug" => array(
- "brief" => array(
- "dsdefinition" => array(
- 'DEF:d0='.$this->get("rrdfile").':debug0:AVERAGE'),
- "graphdefinition" => array(
- 'COMMENT:" min avg max last\n"',
- 'LINE1:d0#000000:"d0 "',
- 'GPRINT:d0:MIN:" %6.2lf "',
- 'GPRINT:d0:AVERAGE:"%6.2lf "',
- 'GPRINT:d0:MAX:"%6.2lf "',
- 'GPRINT:d0:LAST:"%6.2lf \n"')),
- "detailed" => array(
- "dsdefinition" => array(
- 'DEF:d0='.$this->get("rrdfile").':debug0:AVERAGE',
- 'DEF:d1='.$this->get("rrdfile").':debug1:AVERAGE',
- 'DEF:d2='.$this->get("rrdfile").':debug2:AVERAGE',
- 'DEF:d3='.$this->get("rrdfile").':debug3:AVERAGE',
- 'DEF:d4='.$this->get("rrdfile").':debug4:AVERAGE',
- 'DEF:d5='.$this->get("rrdfile").':debug5:AVERAGE',
- 'DEF:d6='.$this->get("rrdfile").':debug6:AVERAGE',
- 'DEF:d7='.$this->get("rrdfile").':debug7:AVERAGE',
- 'DEF:d8='.$this->get("rrdfile").':debug8:AVERAGE',
- 'DEF:d9='.$this->get("rrdfile").':debug9:AVERAGE',
- 'DEF:d10='.$this->get("rrdfile").':debug10:AVERAGE',
- 'DEF:d11='.$this->get("rrdfile").':debug11:AVERAGE',
- 'DEF:d12='.$this->get("rrdfile").':debug12:AVERAGE',
- 'DEF:d13='.$this->get("rrdfile").':debug13:AVERAGE',
- 'DEF:d14='.$this->get("rrdfile").':debug14:AVERAGE',
- 'DEF:d15='.$this->get("rrdfile").':debug15:AVERAGE',
- 'DEF:d16='.$this->get("rrdfile").':debug16:AVERAGE',
- 'DEF:d17='.$this->get("rrdfile").':debug17:AVERAGE',
- 'DEF:d18='.$this->get("rrdfile").':debug18:AVERAGE',
- 'DEF:d19='.$this->get("rrdfile").':debug19:AVERAGE'),
- "graphdefinition" => array(
- 'COMMENT:" min avg max last\n"',
- 'LINE1:d0#000000:"d0 "',
- 'GPRINT:d0:MIN:" %6.2lf "',
- 'GPRINT:d0:AVERAGE:"%6.2lf "',
- 'GPRINT:d0:MAX:"%6.2lf "',
- 'GPRINT:d0:LAST:"%6.2lf \n"',
- 'LINE1:d1#000111:"d1 "',
- 'GPRINT:d1:MIN:" %6.2lf "',
- 'GPRINT:d1:AVERAGE:"%6.2lf "',
- 'GPRINT:d1:MAX:"%6.2lf "',
- 'GPRINT:d1:LAST:"%6.2lf \n"',
- 'LINE1:d2#000222:"d2 "',
- 'GPRINT:d2:MIN:" %6.2lf "',
- 'GPRINT:d2:AVERAGE:"%6.2lf "',
- 'GPRINT:d2:MAX:"%6.2lf "',
- 'GPRINT:d2:LAST:"%6.2lf \n"',
- 'LINE1:d3#000333:"d3 "',
- 'GPRINT:d3:MIN:" %6.2lf "',
- 'GPRINT:d3:AVERAGE:"%6.2lf "',
- 'GPRINT:d3:MAX:"%6.2lf "',
- 'GPRINT:d3:LAST:"%6.2lf \n"',
- 'LINE1:d4#000444:"d4 "',
- 'GPRINT:d4:MIN:" %6.2lf "',
- 'GPRINT:d4:AVERAGE:"%6.2lf "',
- 'GPRINT:d4:MAX:"%6.2lf "',
- 'GPRINT:d4:LAST:"%6.2lf \n"',
- 'LINE1:d5#000555:"d5 "',
- 'GPRINT:d5:MIN:" %6.2lf "',
- 'GPRINT:d5:AVERAGE:"%6.2lf "',
- 'GPRINT:d5:MAX:"%6.2lf "',
- 'GPRINT:d5:LAST:"%6.2lf \n"',
- 'LINE1:d6#000666:"d6 "',
- 'GPRINT:d6:MIN:" %6.2lf "',
- 'GPRINT:d6:AVERAGE:"%6.2lf "',
- 'GPRINT:d6:MAX:"%6.2lf "',
- 'GPRINT:d6:LAST:"%6.2lf \n"',
- 'LINE1:d7#000777:"d7 "',
- 'GPRINT:d7:MIN:" %6.2lf "',
- 'GPRINT:d7:AVERAGE:"%6.2lf "',
- 'GPRINT:d7:MAX:"%6.2lf "',
- 'GPRINT:d7:LAST:"%6.2lf \n"',
- 'LINE1:d8#000888:"d8 "',
- 'GPRINT:d8:MIN:" %6.2lf "',
- 'GPRINT:d8:AVERAGE:"%6.2lf "',
- 'GPRINT:d8:MAX:"%6.2lf "',
- 'GPRINT:d8:LAST:"%6.2lf \n"',
- 'LINE1:d9#000999:"d9 "',
- 'GPRINT:d9:MIN:" %6.2lf "',
- 'GPRINT:d9:AVERAGE:"%6.2lf "',
- 'GPRINT:d9:MAX:"%6.2lf "',
- 'GPRINT:d9:LAST:"%6.2lf \n"',
- 'LINE1:d10#111999:"d10 "',
- 'GPRINT:d10:MIN:" %6.2lf "',
- 'GPRINT:d10:AVERAGE:"%6.2lf "',
- 'GPRINT:d10:MAX:"%6.2lf "',
- 'GPRINT:d10:LAST:"%6.2lf \n"',
- 'LINE1:d11#222999:"d11 "',
- 'GPRINT:d11:MIN:" %6.2lf "',
- 'GPRINT:d11:AVERAGE:"%6.2lf "',
- 'GPRINT:d11:MAX:"%6.2lf "',
- 'GPRINT:d11:LAST:"%6.2lf \n"',
- 'LINE1:d12#333999:"d12 "',
- 'GPRINT:d12:MIN:" %6.2lf "',
- 'GPRINT:d12:AVERAGE:"%6.2lf "',
- 'GPRINT:d12:MAX:"%6.2lf "',
- 'GPRINT:d12:LAST:"%6.2lf \n"',
- 'LINE1:d13#444999:"d13 "',
- 'GPRINT:d13:MIN:" %6.2lf "',
- 'GPRINT:d13:AVERAGE:"%6.2lf "',
- 'GPRINT:d13:MAX:"%6.2lf "',
- 'GPRINT:d13:LAST:"%6.2lf \n"',
- 'LINE1:d14#555999:"d14 "',
- 'GPRINT:d14:MIN:" %6.2lf "',
- 'GPRINT:d14:AVERAGE:"%6.2lf "',
- 'GPRINT:d14:MAX:"%6.2lf "',
- 'GPRINT:d14:LAST:"%6.2lf \n"',
- 'LINE1:d15#666999:"d15 "',
- 'GPRINT:d15:MIN:" %6.2lf "',
- 'GPRINT:d15:AVERAGE:"%6.2lf "',
- 'GPRINT:d15:MAX:"%6.2lf "',
- 'GPRINT:d15:LAST:"%6.2lf \n"',
- 'LINE1:d16#777999:"d16 "',
- 'GPRINT:d16:MIN:" %6.2lf "',
- 'GPRINT:d16:AVERAGE:"%6.2lf "',
- 'GPRINT:d16:MAX:"%6.2lf "',
- 'GPRINT:d16:LAST:"%6.2lf \n"',
- 'LINE1:d17#888999:"d17 "',
- 'GPRINT:d17:MIN:" %6.2lf "',
- 'GPRINT:d17:AVERAGE:"%6.2lf "',
- 'GPRINT:d17:MAX:"%6.2lf "',
- 'GPRINT:d17:LAST:"%6.2lf \n"',
- 'LINE1:d18#999999:"d18 "',
- 'GPRINT:d18:MIN:" %6.2lf "',
- 'GPRINT:d18:AVERAGE:"%6.2lf "',
- 'GPRINT:d18:MAX:"%6.2lf "',
- 'GPRINT:d18:LAST:"%6.2lf \n"',
- 'LINE1:d19#aaa999:"d19 "',
- 'GPRINT:d19:MIN:" %6.2lf "',
- 'GPRINT:d19:AVERAGE:"%6.2lf "',
- 'GPRINT:d19:MAX:"%6.2lf "',
- 'GPRINT:d19:LAST:"%6.2lf \n"' )))));
- $this->graphdefaults = array_merge($this->graphdefaults,
- $this->shortcut["debug"]["brief"]);
- $this->graphsettings["rawcmdline"] .=" -v 'debug'";
- $this->url2options($url);
- }
- }
- ?>
|