Forum Discussion
tarsier_90410
Nimbostratus
Aug 25, 2009way to list pools?
I am trying to find a way for an irule (9.x LTM) to query for a list of all pools on the system, but so far have not found a way to do so. Is this possible?
David_Larsen
Employee
Nov 03, 2009So with some help from an awk guru we have come up with the following to fix the :any issue. There are two different options. The easiest one is to implement the 'b db bigpipe.displayservicenames false' setting then use the following to create the file:
b pool all |grep "POOL MEMBER" | awk '{sub(":any",":0",$4);print "\""$4"\","}' | sort >/var/class/pool_member_status_list.class
The other option is to use the following and develop a list of services that are used in your environment and convert them to port numbers as follows:
b pool all |grep "POOL MEMBER" | sort |awk '
BEGIN{
list["http"]=80
list["https"]=443
list["any"]=0
list["ftp"]=21
list["ssh"]=23
}
{
x=split($4,ar,":")
if(list[ar[2]] == "")
list[ar[2]]=ar[2]
print "\"" ar[1] ":" list[ar[2]] "\","
}' >/var/class/pool_member_status_list.class
Hope this helps some. David
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
