Forum Discussion
May 02, 2014
Hi,
here is a one-liner on this subject. Just replace the name of the wideip, please. In my sample I used the wideip of "www.sub.lb-net.bit". Thanks, Stephan tmsh list gtm wideip www.sub.lb-net.bit one-line | grep -E -o 'pools \{ ([^ ]+ \{ [^\}]+ \} )+\}' | \
sed -r -e 's/^pools //g' -e 's/(^\{ | \}$)//g' -e 's/\{[^\}]+\}//g' -e 's/[[:space:]]$//g' -e 's/[[:space:]]+/\n/g' | \
awk '{print "tmsh list gtm pool",$1,"one-line"}' | bash +x | grep -E -o 'members \{ ([^ ]+ \{ [^\}]+ \} )+\}' | \
sed -r -e 's/^members //g' -e 's/(^\{ | \}$)//g' -e 's/\{[^\}]+\}//g' -e 's/[[:space:]]$//g' -e 's/[[:space:]]+/\n/g' | \
awk -F ":" '{print "tmsh list gtm server",$1,"virtual-servers \{",$2,"\}"}' 2>/dev/null | bash +x | awk '/destination/ {print $2}'
10.131.131.142:http
10.131.131.141:http