Forum Discussion

David_Murphy_22's avatar
David_Murphy_22
Icon for Nimbostratus rankNimbostratus
Oct 12, 2007

System::Statistics ???

I read, "... data behind the Performance graphs are available via iControl with the following methods: System::Statistics::get_performance_graph_list()

 

System::Statistics::get_performance_graph_csv_statistics()

 

"

 

 

Question: I was hoping to get at least 30-days worth of historical data (like the GUI provides); is it possible to request 30 or more days of sample historical data with this method?

 

 

Considering the screen output:

 

 

Requesting Graph: activecons

 

===================================

 

Object Name: activecons

 

Start Time : 1192040640

 

End Time : 1192127280

 

Interval : 240

 

Statistics : stored in file 'activecons-20070911_134710.csv'

 

===================================

 

 

I think there is 24hours of sample data being placed in the csv-file that is written.

 

 

Question: I was hoping to get 30-days worth of samples (like the GUI provides); is it possible to request 30 or more days of sample historical data?

 

 

Thanks

1 Reply

  • That sample application for pulling the performance stats uses the default values for start and end time (meaning the last 24 hours).

     

     

    Take a look at the documentation for those methods and there are detailed explanations on what to put in for start and end time to adjust your query windows.

     

     

    http://devcentral.f5.com/wiki/default.aspx/iControl/System__Statistics__PerformanceStatisticQuery.html

     

    Click here

     

     

     

    The docs for the PerformanceStatisticQuery detail how the member data works.

     

     

    A struct that describes a query for details of a statistical graph or table. If the user specifies a start_time, end_time, and interval that does not exactly match the corresponding value used within the database, the database will attempt to use to closest time or interval as requested. The actual values used will be returned to the user on output. For querying purposes, the start_time can be specified as: 0: in which case by default, it means 24 hours ago. N: where N represents the number of seconds since Jan 1, 1970. -N: where -N represents the number of seconds before now, for example: -3600 means 3600 seconds ago, or now - 3600 seconds For querying purposes, the end_time can be specified as: 0: in which case by default, it means now. N: where N represents the number of seconds since Jan 1, 1970. -N: where -N represents the number of seconds before now, for example: -3600 means 3600 seconds ago, or now - 3600 seconds

     

     

     

    From that description, if you pass in -(60*60*24*30) = -2592000 for start_time and 0 for end_time, you should get the last 30 days of data.

     

     

    Make sure if you are querying that large a data set, that you set the interval to something reasonable to limit the size of the data set. If you make your interval 1 second, you will get 2,592,000 records back which will likely be pretty slow. If you need a very granular set of data, try downloading in chunks with different windows for start_time and end_time.

     

     

    Hope this helps...

     

     

    -Joe