Forum Discussion
Need help in finding pools with only only one pool member
- Nov 29, 2023
I would start with:
From cil - in bash...
tmsh list ltm pool all members
and start my filter with
tmsh list ltm pool all members |egrep 'ltm pool|address'
if you dont need/use ipv6
tmsh list ltm pool all members |egrep 'ltm pool|address' |egrep -v 'any6'
that should get you close
- Nov 29, 2023
You can achieve this using a simple bash script. For example:
# Author: Michael Saleem # Filename: f5-list-pools-based-on-member-quantity.sh # Purpose: This script will list all pools containing a specified number of pool members #!/bin/bash POOL_MEMBER_QUANTITY=1 POOLS=$(tmsh list ltm pool one-line | awk '{print $3}') for POOL in $POOLS; do POOL_MEMBER_COUNT=$(tmsh list ltm pool $POOL one-line | awk -F':' '{print NF -1}';) if [ "$POOL_MEMBER_COUNT" = "$POOL_MEMBER_QUANTITY" ] then echo $POOL fi done
Hello,
I am getting error as below:
Syntax Error: "egrep", grep is currently the only filter that is supported
need to be in bash for egrep to work -
the line also includes "tmsh" as a precurser - execute the command in that shell.
- Shoaib_020Nov 29, 2023
Altostratus
Thank you very much but this command will show the for common partition. How to check for specific partition.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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