cancel
Showing results for 
Search instead for 
Did you mean: 

one line command to get virtual server status

Macaron
Altostratus
Altostratus

Hi guys, I am trying to get the offline virtual server status in one line from F5 cmd line. The command "tmsh show ltm virtual all-properties" shows all the virtual server properties. Can we extract somehow this "Availability : offline" from the output?

1 REPLY 1

AlexBCT
MVP
MVP

Hi Macaron,

 

Would the following help? Basically it's filtering the output to either contain the words "Virtual Server" or "Availability".

 

tmsh show ltm virtual all-properties | grep 'Virtual Server\|Availability'

 

This makes the output look like this:

 

Ltm::Virtual Server: vs1

 Availability   : available

Ltm::Virtual Server: vs2

 Availability   : available

Ltm::Virtual Server: vpn_vs

 Availability   : unknown

Ltm::Virtual Server: vpn_vs_dtls

 Availability   : unknown

Ltm::Virtual Server: vs3

 Availability   : offline

Ltm::Virtual Server: vs4

 Availability   : unknown