Number of active and inactive vips

Hello All,

Is there anyway command which can tell number of active and inactive vips on LTM? Also real server attached to it?

I can count is manually but it is manual effort and will take a lot of time. So just wanted to confirm is there any way?

Thanks.

You can try cli tmsh list ltm virtual enabled/disabled and do grep

eg:

For disabled VS count

tmsh list ltm virtual disabled| grep disabled | wc -l

To list enabled VS

tmsh list ltm virtual enabled  | grep -B1 enabled

Kunjan,

Thanks for answer. But I am getting error ‘Syntax Error: “-B1” unsupported option’. Any suggestion?

Thanks

Are you running this on BigIP CLI? Which version of BigIP are you on? Can try egrep instead grep?

Can you also run grep --version ?

Kunjan,

egrep also doesn’t work.

Yes I am using CLI and code 11.5.1.

Thanks

Interesting, it works for me in 11.5.1. Can you run

grep --version

?

try putting a space in i.e. ‘-B 1’

Thanks Kunjan and arpydays… after putting space as suggested by arpydays it worked.