Forum Discussion
wayney_128269
Nimbostratus
Feb 28, 2005BigIP server connections?
Hello,
Is there a method that tells me how many connections a load balanced server has?
thanks
- Loc_Pham_101863Historic F5 AccountYes, there are methods that return statistics for every object type exposed by iControl. In v9.x, for example, please check out the following methods:
- wayney_128269
Nimbostratus
Do you have any sample code that enumerations current connections? - The SDK contains numerous examples containing statistics enumeration. Check out the ones for LocalLB NodeAddress, Pool, and VSStats. They are available in every language supported so dig down into the one of your choice. Do a grep/findstr for get_statistics and you should be set.
- Loc_Pham_101863Historic F5 AccountHere's a snippet of C code that gets statistics for all node addresses, and prints them out to the console. You can get stats for other objects similarly.
try { Console.WriteLine("=============================================="); Console.WriteLine("Getting node address statistics..."); Console.WriteLine("------------------"); LocalLBNodeAddressNodeAddressStatistics naStatList = nodeAddressObj.get_all_statistics(); CommonTimeStamp ts = naStatList.time_stamp; Console.WriteLine("Statistics Timestamp: " + months[ts.month-1] + " " + ts.day + " " + ts.hour + ":" + ts.minute + ":" + ts.second + " " + ts.year); LocalLBNodeAddressNodeAddressStatisticEntry [] naStatistics = naStatList.statistics; for (int i = 0; i < naStatistics.Length; i++) { Console.WriteLine ("[" + i + "] Statistics for Node address: " + naStatistics[ i ].node_address); CommonStatistic [] stats = naStatistics[ i ].statistics; for (int j = 0; j < stats.Length; j++) { ulong stat = ((ulong) stats[j].value.high << 32) | (uint) stats[j].value.low; Console.WriteLine (" [" + j + "] " + stats[j].type.ToString() + ": " + stat); } } Console.WriteLine("=============================================="); } catch (System.Web.Services.Protocols.SoapHeaderException soapHdrEx) { printException(soapHdrEx); }
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