Forum Discussion
Mubasher_Sultan
Nimbostratus
Jan 14, 2014How to use Grep command to identify the particular VS and their state?
Hi Folks,
I want to identify the VS servers having the string e.g., TO2 and their "Availability" or "State"
I am using the below command
show /ltm virtual all-properties | grep -i "to...
qe_102628
Nimbostratus
Jan 14, 2014grep works on a linefeed boundary, whereas the tmsh output contains multiple lines.
While you can't do this in tmsh since the grep doesn't support -A there, you could use something like this on the command line:
tmsh show ltm virtual|grep ^Ltm:: -A5|grep -e 'Ltm::\|\ \ Availability\|\ \ State'
here's me running that:
[root@snk-5:Active:Standalone] config tmsh show ltm virtual|grep ^Ltm:: -A5|grep -e '^Ltm::\|^\ \ Availability\|^\ \ State'
Ltm::Virtual Server: next4p81
Availability : unknown
State : enabled
Ltm::Virtual Server: next4p82
Availability : unknown
State : enabled
Ltm::Virtual Server: next6p81
Availability : unknown
State : enabled
Ltm::Virtual Server: next6p82
Availability : unknown
State : enabled
[root@snk-5:Active:Standalone] config
Sreenivasa_P
Nimbostratus
Jul 11, 2016how to read before and after line like in v10 we have command -a5 or -b5 but its not working in v11
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects