Forum Discussion
tmsh command
Hello, i am searching for tmsh command which list all virtual server with a special http profile (for example http_profile_1). Any idea ? Thank you ! Nick
- Lee_Sutcliffe
Nacreous
This may not not be ideal, let me know how you get on
list ltm virtual profiles | grep -B 2 /Common/http
(tmos) list ltm virtual profiles | grep -B 2 /Common/http ltm virtual vs_80 { profiles { /Common/http { -- ltm virtual vs_443 { profiles { /Common/http {
- TechT
Nimbostratus
try this - tmsh list ltm virtual | grep http_profile_1 -A "line no"
eg : tmsh list ltm virtual | grep http_profile_1 -A 5
*line no : depends on the line you want to display
- Nicholas_Teo
Nimbostratus
Tested this out and it seems to be working for me:
list ltm virtual profiles { http_profile_1 } | grep -B 2 "http_profile_1" | grep ltm virtual
If you run the command outside of tmsh you can use some more tools to help you. Then you can try something like this which enables you to search for anything in the server config:
tmsh list ltm virtual one-line | grep PROFILE-NAME | awk {'print $3'}
or if you have partitions in your big-ip:
tmsh list ltm virtual /PARTITION/* one-line | grep PROFILE-NAME | awk {'print $3'}
EDIT: If you have partitions you have to insert a \ before the *. This editor seems to remove it when i post it here.
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