Forum Discussion
mehdis_60232
Nimbostratus
Jun 19, 2008getting Node statistics : LocalLBNodeAdress.cs (SDK)
Hello,
in NodeAdressmain.cs i can't use those two methods:
-get_object_status
-get_statistics
When i try to use it, i have the exeptio...
mehdis_60232
Nimbostratus
Jun 26, 2008
void getNodeInfo(string[] node_list)
{
// Get Session Status
NodeAddress.LocalLBSessionStatus[] session_status_list =
NodeAddress.get_session_status(node_list);
// Get Enabled State
NodeAddress.CommonEnabledState[] enabled_state_list = NodeAddress.get_session_enabled_state(node_list);
try
{
Console.WriteLine("Previous Get Object Status");
// Get Object Status
NodeAddress.LocalLBObjectStatus[] object_status_list =
NodeAddress.get_object_status(node_list);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message.ToString());
Console.WriteLine(ex.ToString());
Console.WriteLine("After Get Object Status");
Console.Read();
}
// Get Monitor Status
NodeAddress.LocalLBMonitorStatus[] monitor_status_list =
NodeAddress.get_monitor_status(node_list);
// Get Connection Limit
NodeAddress.CommonULong64[] connection_limit_list =
NodeAddress.get_connection_limit(node_list);
//Get Ratio
long[] ratio_list =
NodeAddress.get_ratio(node_list);
//
Get Statistics
NodeAddress.LocalLBNodeAddressNodeAddressStatistics statistics =
NodeAddress.get_statistics(node_list);
for (int i = 0; i < node_list.Length; i++)
{
Console.WriteLine("NODE " + node_list);
Console.WriteLine(" Session Status : " + session_status_list);
Console.WriteLine(" Enabled State : " + enabled_state_list);
Console.WriteLine(" Monitor Status : " + monitor_status_list);
Console.WriteLine(" Availability : " + object_status_list).availability_status);
Console.WriteLine(" Connection Limit : " + build64(connection_limit_list));
Console.WriteLine(" Ratio : " + ratio_list);
Console.WriteLine(" Statistics :");
NodeAddress.CommonStatistic[] statistic_list = statistics.statistics.statistics;
for (int j = 0; j < statistic_list.Length; j++)
{
Console.WriteLine(" " +
statistic_list[j].type.ToString() + " : " + build64(statistic_list[j].value));
}
}
LocalLBNodeAdress :
///
[System.Web.Services.Protocols.SoapRpcMethodAttribute("urn:iControl:LocalLB/NodeAddress", RequestNamespace="urn:iControl:LocalLB/NodeAddress", ResponseNamespace="urn:iControl:LocalLB/NodeAddress")]
[return: System.Xml.Serialization.SoapElementAttribute("return")]
public LocalLBNodeAddressNodeAddressStatistics get_all_statistics() {
object[] results = this.Invoke("get_all_statistics", new object[0]);
return ((LocalLBNodeAddressNodeAddressStatistics)(results[0]));
}
///
public System.IAsyncResult Beginget_all_statistics(System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("get_all_statistics", new object[0], callback, asyncState);
}
///
public LocalLBNodeAddressNodeAddressStatistics Endget_all_statistics(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((LocalLBNodeAddressNodeAddressStatistics)(results[0]));
}
//////////////////////////////:
///
[System.Web.Services.Protocols.SoapRpcMethodAttribute("urn:iControl:LocalLB/NodeAddress", RequestNamespace="urn:iControl:LocalLB/NodeAddress", ResponseNamespace="urn:iControl:LocalLB/NodeAddress")]
[return: System.Xml.Serialization.SoapElementAttribute("return")]
public LocalLBObjectStatus[] get_object_status(string[] node_addresses) {
object[] results = this.Invoke("get_object_status", new object[] {node_addresses});
return ((LocalLBObjectStatus[])(results[0]));
}
///
public System.IAsyncResult Beginget_object_status(string[] node_addresses, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("get_object_status", new object[] {node_addresses}, callback, asyncState);
}
///
public LocalLBObjectStatus[] Endget_object_status(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((LocalLBObjectStatus[])(results[0]));
}
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
