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?
JRahm
Admin
Aug 27, 2009True. So I eliminated as many appends as I could and reran the test without the pool member section, then added it back in for a test as well. So here are the final numbers, followed by the more-optimized version:
1) Original Version - 493901 avg cycles
2) Changed sets to appends - 436453 avg cycles
3) Minimized append statements - 414210 avg cycles
Definite savings! Adding the pool member code, however, shoots it back up (650614 avg cycles), and will do more so depending on how many pools & pool members you have.
when HTTP_REQUEST {
set response " \
BigIP Server Pool StatusServer Pool Status \
en[clock format [clock seconds]]60"
if { [HTTP::uri] eq "/status" } {
foreach { selectedpool } [class get pooltest] {
set thispool [getfield $selectedpool " " 1]
if { [catch {
if { [active_members $thispool] < 1 } {
append response "$thispool status$thispool is \
DOWN"
} else {
append response "$thispool status$thispool is \
UP"
Member Status Section for "UP" pools"
append response "$thispool member status foreach { pmem } [members -list $thispool] {
append response "Pool Member [join $pmem ":"] is \
[LB::status pool $thispool member [getfield $pmem " " 1] [getfield $pmem " " 2] ]
"
}
append response "\]\]>"
End Member Status Section
}
} errmsg ] } {
append response "$thispool ERROR \
Invalid pool name: $thispool"
}
}
append response ""
HTTP::respond 200 content $response "Content-Type" "text/xml"
}
}
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
