Forum Discussion
tmsh command to filter VIP with "current connection" count
- Apr 23, 2021
Does this work for you?
It shows a list of all virtual servers with a current client side connection count of greater than 0.
tmsh -q -c "cd / ; show /ltm virtual recursive field-fmt" | grep "ltm\ virtual\|clientside.cur-conns" | awk '/clientside.cur-conns\ [1-9]/ { print $2, a}{a=$3}'or if you want all virtual servers ordered by number of current connections
tmsh -q -c "cd / ; show /ltm virtual recursive field-fmt" | grep "ltm\ virtual\|clientside.cur-conns" | awk '/clientside.cur-conns/ { print $2, a}{a=$3}' | sort -nIf you really want the IP address, you can replace "virtual" with "virtual-address" in the commands above to get the VIP instead of the virtual server name displayed
Rob
Does this work for you?
It shows a list of all virtual servers with a current client side connection count of greater than 0.
tmsh -q -c "cd / ; show /ltm virtual recursive field-fmt" | grep "ltm\ virtual\|clientside.cur-conns" | awk '/clientside.cur-conns\ [1-9]/ { print $2, a}{a=$3}'or if you want all virtual servers ordered by number of current connections
tmsh -q -c "cd / ; show /ltm virtual recursive field-fmt" | grep "ltm\ virtual\|clientside.cur-conns" | awk '/clientside.cur-conns/ { print $2, a}{a=$3}' | sort -nIf you really want the IP address, you can replace "virtual" with "virtual-address" in the commands above to get the VIP instead of the virtual server name displayed
Rob
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