Forum Discussion
jaikumar_f5
MVP
This is interesting, can you share us the snapshot of GUI network map and also the below command,
Put the below code in a /var/tmp/virtual-status file. And simple run it by bash /var/tmp/virtual-status
tmsh show ltm virtual > /var/tmp/virtual-status
echo -n "Total Virtual Servers : " ; cat /var/tmp/virtual-status | grep Availability | wc -l
echo -n "Virtual Servers Available : "; cat /var/tmp/virtual-status | grep "Availability : available" | wc -l | tr -d '\n'; echo -n " (Disabled: ";cat /var/tmp/virtual-status | grep -A1 "Availability : available" | grep disabled | wc -l | tr -d '\n' ; echo -n ")";
echo -ne "\nVirtual Servers Unavailable : "; cat /var/tmp/virtual-status | grep "Availability : unavailable" | wc -l | tr -d '\n'; echo -n " (Disabled: "; cat /var/tmp/virtual-status | grep -A1 "Availability : unavailable" | grep disabled | wc -l | tr -d '\n' ; echo -n ")";
echo -ne "\nVirtual Servers Offline : "; cat /var/tmp/virtual-status | grep "Availability : offline" | wc -l | tr -d '\n'; echo -n " (Disabled: "; cat /var/tmp/virtual-status | grep -A1 "Availability : unavailable" | grep disabled | wc -l | tr -d '\n' ; echo -n ")";
echo -ne "\nVirtual Servers Unknown : "; cat /var/tmp/virtual-status | grep "Availability : unknown" | wc -l | tr -d '\n'; echo -n " (Disabled: "; cat /var/tmp/virtual-status | grep -A1 "Availability : unavailable" | grep disabled | wc -l | tr -d '\n' ; echo -n ")";
Nikoolayy1
Jun 14, 2021MVP
Nice script jaikumar_f5 ! I will also copy it for some automations. If there is a real difference maybe the web can be restarted with bigstart restart httpd/tomcat or even "mcpd reload" as there could be discrepancy between the GUI and bigip.conf but your script will confirm that.