Forum Discussion
one line command to get virtual server status
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?
- AlexBCT
Cumulonimbus
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
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