lisanwan_54895
Jul 21, 2010Nimbostratus
Problem with Statistics
Hi,
I want to retrieve the information of the performance below Overview in the web, such as Memory Used, System CPU Usage, Active Connections, New Connections, etc..
I'm using iControl API in C application. My BIG-IP's version is "10.1.0.3341.1084".
I want to use System/Statistics->get_performance_graph_list and get_performance_table_list to retrieve the information, but I always get the wrong message "Something is wrong in XML document(11, 2)". I don't know why.
Is the way I had found right? If I did it in a wrong way, how can I retrieve the information of the performance? Thank you!
Following is the class I wrote several days before.
namespace Statistics{
using System.Diagnostics;
using System.Xml.Serialization;
using System;
using System.Web.Services.Protocols;
using System.ComponentModel;
using System.Web.Services;
///
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="System.StatisticsBinding", Namespace="urn:iControl")]
[System.Xml.Serialization.SoapIncludeAttribute(typeof(PerformanceGraph))]
[System.Xml.Serialization.SoapIncludeAttribute(typeof(PerformanceTable))]
public class SystemStatistics : System.Web.Services.Protocols.SoapHttpClientProtocol
{
///
public SystemStatistics() {
this.Url = "";
}
///
[System.Web.Services.Protocols.SoapRpcMethodAttribute("urn:iControl:System/Statistics", RequestNamespace="urn:iControl:System/Statistics", ResponseNamespace="urn:iControl:System/Statistics")]
[return: System.Xml.Serialization.SoapElementAttribute("return")]
public PerformanceGraph[] get_performance_graph_list() {
object[] results = this.Invoke("get_performance_graph_list", new object[0]);
return ((PerformanceGraph[])(results[0]));
}
///
public System.IAsyncResult Beginget_performance_graph_list(System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("get_performance_graph_list", new object[0], callback, asyncState);
}
///
public PerformanceGraph[] Endget_performance_graph_list(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((PerformanceGraph[])(results[0]));
}
///
[System.Web.Services.Protocols.SoapRpcMethodAttribute("urn:iControl:System/Statistics", RequestNamespace = "urn:iControl:System/Statistics", ResponseNamespace = "urn:iControl:System/Statistics")]
[return: System.Xml.Serialization.SoapElementAttribute("return")]
public PerformanceTable[] get_performance_table_list()
{
object[] results = this.Invoke("get_performance_table_list", new object[0]);
return ((PerformanceTable[])(results[0]));
}
///
public System.IAsyncResult Beginget_performance_table_list(System.AsyncCallback callback, object asyncState)
{
return this.BeginInvoke("get_performance_table_list", new object[0], callback, asyncState);
}
///
public PerformanceTable[] Endget_performance_table_list(System.IAsyncResult asyncResult)
{
object[] results = this.EndInvoke(asyncResult);
return ((PerformanceTable[])(results[0]));
}
///
[System.Web.Services.Protocols.SoapRpcMethodAttribute("urn:iControl:System/Statistics", RequestNamespace = "urn:iControl:System/Statistics", ResponseNamespace = "urn:iControl:System/Statistics")]
[return: System.Xml.Serialization.SoapElementAttribute("return")]
public string[] get_list_of_hosts()
{
object[] results = this.Invoke("get_list_of_hosts", new object[0]);
return ((string[])(results[0]));
}
///
public System.IAsyncResult Beginget_list_of_hosts(System.AsyncCallback callback, object asyncState)
{
return this.BeginInvoke("get_list_of_hosts", new object[0], callback, asyncState);
}
///
public string[] Endget_list_of_hosts(System.IAsyncResult asyncResult)
{
object[] results = this.EndInvoke(asyncResult);
return ((string[])(results[0]));
}
///
[System.Web.Services.Protocols.SoapRpcMethodAttribute("urn:iControl:System/Statistics", RequestNamespace = "urn:iControl:System/Statistics", ResponseNamespace = "urn:iControl:System/Statistics")]
[return: System.Xml.Serialization.SoapElementAttribute("return")]
public string get_version()
{
object[] results = this.Invoke("get_version", new object[0]);
return ((string)(results[0]));
}
///
public System.IAsyncResult Beginget_version(System.AsyncCallback callback, object asyncState)
{
return this.BeginInvoke("get_version", new object[0], callback, asyncState);
}
///
public string Endget_version(System.IAsyncResult asyncResult)
{
object[] results = this.EndInvoke(asyncResult);
return ((string)(results[0]));
}
}
public class PerformanceGraph
{
public string graph_name; //The key or name of the graph
public string graph_title; //The title of the graph as appeared in the GUI's Performance Graph
public string graph_description; //The text description of this graph
};
public class PerformanceTable
{
public string table_name; //The key or name of the table.
public string table_description; //String The text description of this table.
};
}