Forum Discussion

ramesh_455's avatar
ramesh_455
Icon for Nimbostratus rankNimbostratus
Dec 09, 2008

Question about iControl response for get_performance_graph_csv_statistics

I am trying to retrieve the performance stats via iControl get_performance_graph_csv_statistics API in System.Statistics.wsdl.

 

 

I am running a cron job that invokes the script every min.

 

 

My algorithm is as follows

 

 

1) Retrieve the current time of the F5 in gmt ( get_time from System.SystemInfo.wsdl )

 

2) Compute the nearest completed min of the value received from step 1.

 

( for eg if step 1 returns 1228842365, I use 1228842360 )

 

3) Set the start time of the query to the last received end_time

 

4) Set the end time of the query to value received from step 2

 

5) make the query.

 

 

I can see the values retrieved successfully.

 

 

For e.g.

 

 

[ 0 ] => stdClass Object

 

(

 

[object_name] => CPU

 

[start_time] => 1228842360

 

[end_time] => 1228842420

 

[interval] => 60

 

[statistic_data] => timestamp,"CPU 0","CPU 1"

 

1228842360,3.9500000000e+00,0.0000000000e+00

 

1228842420,2.2080000000e+00,0.0000000000e+00

 

 

)

 

 

Now for the next min, I set the starttime to 1228842420 and endtime to 1228842480. And I receive the response

 

 

[ 0 ] => stdClass Object

 

(

 

[object_name] => CPU

 

[start_time] => 1228842420

 

[end_time] => 1228842480

 

[interval] => 60

 

[statistic_data] => timestamp,"CPU 0","CPU 1"

 

1228842420,3.8200000000e+00,0.0000000000e+00

 

1228842480,2.0680000000e+00,0.0000000000e+00

 

 

)

 

 

 

As you can see I receive 2 responses to the timestamp 1228842420

 

3.95 as a part of first query and 3.82 as a part of second query.

 

 

How to determine which one has the correct value?

 

3 Replies

  • Will you believe that both answers might be right?

     

     

    The performance graphs are averages over time and use rrdtool under the seams to build the graphs. From my understanding of rrdtool (and it's predecessor mrtg), it uses a sliding normalization for it's data. The most recent data will have more data points per time period and as the time gets older they prune and average those values out so a constant data size can be maintained. If that is the case, then it might make sense that during the averaging process, the data for a specific timestamp may change as time goes by.

     

     

    I'll have to verify if this is the case for the performance graphs. I'll let you know what I find.

     

     

    -Joe
  • When I query for the performance data, I query for the previous minute. I get the current time and retrieve the completed minute from the time. Also when I checked the rrd database and I see the data getting collected for 10 secs duration and then grouped into 60 secs buckets e.t.c. Does RRD database normalize all the previously stored data every time? For testing purposes I waiting for 10 secs after expiration of a minute and tried the same test. I do see the same results.
  • There is a really good rrdtool explanation here: http://www.vandenbogaerdt.nl/rrdtool/process.php