Forum Discussion
Jay_Nielson_410
Mar 16, 2012Nimbostratus
.Net Monitoring throughput Suggestions needed
I think I have the pertenant code below and the error message it generates is on .get_performance_graph_csv_statistics(Query). I have tried various valid performance graph name "memory", "CPU" and "th...
Mar 16, 2012
I just tested out the code by setting the array size to 1 instead of 5 and it works for me. Here's something that should get you going:
void getPerformanceGraphCSV()
{
iControl.SystemStatisticsPerformanceGraph[] graph_list =
m_interfaces.SystemStatistics.get_performance_graph_list();
for(int i=0; i < graph_list.Length; i++)
{
iControl.SystemStatisticsPerformanceStatisticQuery[] queries =
new iControl.SystemStatisticsPerformanceStatisticQuery[1];
queries[0] = new iControl.SystemStatisticsPerformanceStatisticQuery();
queries[0].object_name = graph_list[ i ].graph_name;
queries[0].start_time = 0;
queries[0].end_time = 0;
queries[0].interval = 0;
queries[0].maximum_rows = 0;
iControl.SystemStatisticsPerformanceGraphDataCSV[] graph_dataA =
m_interfaces.SystemStatistics.get_performance_graph_csv_statistics(queries);
for (int j = 0; j < graph_dataA.Length; j++)
{
Console.WriteLine("--------------------------------------------------");
Console.WriteLine("Graph : " + graph_dataA[j].object_name);
Console.WriteLine("Start Time : " + graph_dataA[j].start_time);
Console.WriteLine("End Time : " + graph_dataA[j].end_time);
Console.WriteLine("Interval : " + graph_dataA[j].interval);
Console.WriteLine("--------------------------------------------------");
String csv_data = System.Text.Encoding.ASCII.GetString(graph_dataA[j].statistic_data);
Console.WriteLine(csv_data);
}
}
}
Hope this helps...
-Joe
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects