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_101863
Feb 28, 2005Historic F5 Account
Here'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);
}
Hope this helps.
Loc
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
