[rrd-users] rrdtool-php fetch from multi-dimensional rrd

This is a discussion on [rrd-users] rrdtool-php fetch from multi-dimensional rrd within the RRD Users forums, part of the Networking and Network Related category; I am trying to fetch a single value from an rrd which looks like: root[]# rrdtool fetch ns3_everyone_net_loss_8.rrd AVERAGE -...


Go Back   Usenet Forums > Networking and Network Related > RRD Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 1 Week Ago
Big Wave Dave
 
Posts: n/a
Default [rrd-users] rrdtool-php fetch from multi-dimensional rrd

I am trying to fetch a single value from an rrd which looks like:

root[]# rrdtool fetch ns3_everyone_net_loss_8.rrd AVERAGE -r 300 --start -1h
loss avg
max dev min

1209524400: 0.0000000000e+00 6.3632673333e+01 6.3914106667e+01
2.9694000000e-01 6.3377886667e+01
1209524700: 0.0000000000e+00 6.3609073333e+01 6.3764490000e+01
2.2424000000e-01 6.3343113333e+01
1209525000: 0.0000000000e+00 6.3925940000e+01 6.4463660000e+01
5.1203666667e-01 6.3272236667e+01
1209525300: 0.0000000000e+00 6.3800846667e+01 6.4178926667e+01
4.3552000000e-01 6.3319680000e+01
1209525600: 0.0000000000e+00 6.3664453333e+01 6.3935806667e+01
3.6324000000e-01 6.3310033333e+01
1209525900: 0.0000000000e+00 6.3633103333e+01 6.3983836667e+01
3.8791666667e-01 6.3341893333e+01
1209526200: 0.0000000000e+00 6.3832333333e+01 6.4199280000e+01
3.8102333333e-01 6.3422730000e+01
1209526500: 0.0000000000e+00 6.5081620000e+01 6.7784940000e+01
1.5541266667e+00 6.3637560000e+01
1209526800: nan nan nan nan nan
1209527100: nan nan nan nan nan
1209527400: nan nan nan nan nan
1209527700: nan nan nan nan nan
1209528000: nan nan nan nan nan


I am trying to grab the value from the 1st line of the "avg" column,
in php code such as:
--snip--
$opts = array ( "AVERAGE", "--start", "-1h" );
$ret3 = rrd_fetch("/path/to/server1.rrd", $opts, count($opts));
$tmp3 = $ret3[data][1][2]; echo "<td> $tmp3 \n</td>";
--snip--

I have this basicly working identically for a one-dimensional rrd, so
I must be pretty close. Am I not calling the column aspect properly?
Reviewing the rrd-beginners seems to hint that the above is the proper
syntax.

Any help would be greatly appreciated!

Thanks,
Dave

_______________________________________________
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:18 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0