Forum Discussion
tmsh list by description
Hi,
I'm looking for an option in command line (tmsh) to list all virtual servers with a specific description. Do I have to script something is there an existing tmsh options to do it?
Thanks
Pat
5 Replies
- Or_A_157009
Cirrus
tmsh list ltm virtual all | grep 'specific description'
should do the work...
- Michael_Jenkins
Cirrostratus
While it's not my own answer (taken and modified from and answer on this question), this may help with that you're looking for..
- This would give you any virtual matching that description
(it's not the prettiest output but it gives you the whole config for that virtual)tmsh list ltm virtual | grep '' - This would give you the virtual name and description line:
tmsh list ltm virtual | awk '/(ltm virtual|)/' | grep -B1 "" - This would give you a slightly cleaner version of the previous one
tmsh list ltm virtual | awk '/(ltm virtual|)/' | grep -B1 "" | sed -e 's/{//g;s/--//g;s/\n//g'
- This would give you any virtual matching that description
- PatPerron_18894
Nimbostratus
Hi,
So the answer is no, is there no tmsh command line to do it.
Thanks for your help, I'll try to get a command line to do what want.
I need to get the complete configuration of all VS with a specific description.
Thanks
Pat
- arpydays
Nimbostratus
try this, this should print the VS config for a particular description
tmsh list ltm virtual | awk 'BEGIN {RS="ltm"} /"description"/ {print "ltm"$0}'
cheers
- PatPerron_18894
Nimbostratus
Hi,
Thank you arpy... That's exactly what I need!
Pat
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