Forum Discussion
nate_fielding_6
Nimbostratus
Aug 08, 2006getting members of a pool
I am trying to get a list of members of a certain pool to printout on a command line. i am using this code below to print out the name of the pools i am using and other information about the pool:
string[] poolList = f5Pool.get_list();
ITCMLocalLBPoolPoolStatisticsEntry[] poolstats = f5Pool.get_pool_statistics(poolList);
for (int poolIdx = 0; poolIdx < poolList.Length ; poolIdx++)
{
Console.WriteLine("\n" + poolList[poolIdx]);
Console.Write(poolstatspoolIdx].stats.connection_stats.current_connections + "\t");
Console.Write(poolstatspoolIdx].stats.connection_stats.maximum_connections + "\t");
Console.Write(poolstats[poolIdx].stats.connection_stats.total_connections + "\t");
Console.Write(poolstats[poolIdx].stats.thruput_stats.packets_in + "\t");
Console.Write(poolstats[poolIdx].stats.thruput_stats.packets_out + "\t");
Console.Write(poolstats[poolIdx].stats.thruput_stats.bits_in + "\t");
Console.Write(poolstats[poolIdx].stats.thruput_stats.bits_out + "\t");
}
I tried using get_member_list() to pass a string value in it, and it would come up with an inner exception error but when I made the string a toupper() it would go through but it would not pass a value.
If anyone can help me get the members of a pool to print out it would be very helpfull. I am using C.
Thanks,
Nate
4 Replies
- What did the exception state? Invalid parameters will result in a SOAPFault with the approprate BIG-IP error message embedded in it. Pool names are case sensitive, so odds are uppercasing the pool name, would not cause a match.
If you could post the code that isn't working, I might be able to see what's going on. Otherwise I'm just guessing. If you could also pass us the contents of the exception that will help as well.
-Joe - nate_fielding_6
Nimbostratus
string members = poolList[poolIdx]; ITCMCommonIPPortDefinition[] memberstest = f5Pool.get_member_list(members);
That is the code I am using to call the pool name. But i get this error
"Cannot assign object of type System.String to an object of type System.Int64"
But when I use this code :string members = poolList[poolIdx]; members = members.ToUpper(); ITCMCommonIPPortDefinition[] memberstest = f5Pool.get_member_list(members);
I get no problems except that no value gets past.
get_member_list requires a string pool_name and that is what I am passing.
ex. first pool from the get_list I used in code in frist post is called "Web_Tone"
even if I doITCMCommonIPPortDefinition[] memberstest = f5Pool.get_member_list("Web_Tone" );
I get the inner exception error. - nate_fielding_6
Nimbostratus
Ok i figured out my problem. I was using someone elses code and when they were referencing the CommonIPDeffiniton they put the adress as a long rather then a string.
Joe thanks for taking the time to help, I accually got the idea to check this from another post in this forum. - That would do it.
-Joe
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