Forum Discussion
How to list VIPs and associated Pool members?
I have several F5 devices running versions 11.4.1 HF3 to 11.6.1 HF2.
I found other similar questions that have been answered, but the commands don't seem to work with these versions.
My customer is asking for a list of IPs used on their devices, VIPs and Pool members.
- Anesh
Cirrostratus
Have u tried below
tmsh show ltm virtual detail | egrep "Virtual Server: | Destination | Ltm::Pool: | Ltm::Pool Member: " | grep -v "Destination IP Bypasses" | sed 's/Ltm:://g;s/|//g;s/Destination\s*/Destination/g'
- Anesh
Cirrostratus
Tried this in 11.5.x, should work in other version mentioned by you as well, the only change in the command i made is the switch -E
tmsh show ltm virtual detail | grep -E "Virtual Server: | Destination | Ltm::Pool: | Ltm::Pool Member: | Ltm::ClientSSL Profile" | grep -v "Destination IP Bypasses" | sed 's/Ltm:://g;s/|//g;s/Destination\s*/Destination/g'
- f51
Cumulonimbus
Tried in v13 Getting below error
Syntax Error: "sed", grep is currently the only filter that is supported
- Jate00
Nimbostratus
This may not be the place to ask, but can you tell me what the pipe character enclosed in the quoted sting does?
thanks
- Nathan_F__F5_
Employee
Hi Jate00,
I did not write the command but I may be able to help. Are you referring to the pipe character that sits between "Virtual Server:" and "Destination" for example? If you are then I believe that pipe is basically just telling the grep command to search for each of those strings individually.
For example, with the pipe between "Virtual Server:" and "Destination" grep knows to search for "Virtual Server:" and "Destination" separately. Without the pipe between them grep would be searching for "Virtual Server: Destination" as if it were one string instead of two and would not find a match because there is no string that matches "Virtual Server: Destination".
-Nathan F
- jaikumar_f5
Noctilucent
egrep and grep -E are same. Its an extended. Lets say you want to search multiple variables in a line or a file (basically an input). You can simply use grep -E "variable1 | variable2 | variable3"
Example:
If a file has the below 5 lines in it.
The file has 4 entries first line second line third line fourth line
#cat file | grep first
first line
#cat file | grep -E "first | second"
first line second line
#cat file | grep line
first line second line third line fourth line
Hope you got the idea.
- Jate00
Nimbostratus
Thanks guys, it does make sense now.
- Rose
Altostratus
I have tried with these 2 commands, but it doesn't give an outpuT after the command is entered. This is on the 12.x.x version
show ltm virtual detail | grep "Virtual Server: | Destination | Ltm::Pool: | Ltm::Pool Member: | IP Address" | grep -v "Destination IP Bypasses" | grep 's/Ltm:://g;s/|//g;s/Destination\s*/Destination/g'
show ltm virtual detail | grep -E "Virtual Server: | Destination | Ltm::Pool: | Ltm::Pool Member: | IP Address" | grep -v "Destination IP Bypasses" | grep 's/Ltm:://g;s/|//g;s/Destination\s*/Destination/g'
- rbenford2311
Nimbostratus
You need to redirect to a file to view output.
>> filename
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