Jump to content

Prep for GTM Upgrade or Change


i-SupportU
 Share

Recommended Posts

There has been a few times when an upgrade broke an application but I didn't know since logs looked good and everything appeared to be good.

So now I run a before (B4) and an after test and then I compare to get more details on status changes and what is affected vs just knowing the number of available WideIPs isn't the same.

GTM CHANGE B4
rm -rf /var/tmp/*B4.txt
rm -rf /var/tmp/*AFTER.txt
tmsh save sys config
tmsh load sys config verify
tmsh save sys ucs /var/tmp/$HOSTNAME"."$(date +%Y%m%d)B4.ucs
qkview -s0
date > /var/tmp/$HOSTNAME"."$(date +%Y%m%d)B4.txt
echo "F5 MasterKey:" >> /var/tmp/$HOSTNAME"."$(date +%Y%m%d)B4.txt
f5mku -K >> /var/tmp/$HOSTNAME"."$(date +%Y%m%d)B4.txt
echo "."
echo "Number of Available WideIPs:" >> /var/tmp/$HOSTNAME"."$(date +%Y%m%d)B4.txt
tmsh show /gtm wideip | egrep 'Gtm::|WideIP|Availability|State|Reason' | grep -c ': available' >> /var/tmp/$HOSTNAME"."$(date +%Y%m%d)B4.txt
tmsh show /gtm wideip | egrep 'Gtm::|WideIP|Availability|State|Reason' > /var/tmp/$HOSTNAME"."$(date +%Y%m%d)wideipB4.txt
echo "."
echo "Number of Available Pools:" >> /var/tmp/$HOSTNAME"."$(date +%Y%m%d)B4.txt
tmsh show /gtm pool | egrep 'Gtm::|Pool|Availability|State|Reason' | grep -c ': available' >> /var/tmp/$HOSTNAME"."$(date +%Y%m%d)B4.txt
tmsh show /gtm pool | egrep 'Gtm::Pool|Availability|Reason' > /var/tmp/$HOSTNAME"."$(date +%Y%m%d)poolsB4.txt
echo "."
echo "Number of Available Servers:" >> /var/tmp/$HOSTNAME"."$(date +%Y%m%d)B4.txt
tmsh show /gtm server all | egrep 'Gtm::|Server|Availability|State|Reason' | grep -c ': available' >> /var/tmp/$HOSTNAME"."$(date +%Y%m%d)B4.txt
tmsh show /gtm server all | egrep 'Gtm::Server|Availability|Reason' > /var/tmp/$HOSTNAME"."$(date +%Y%m%d)serversB4.txt
echo "."
echo "iQuery:"
tmsh show /gtm iquery | egrep 'Gtm::IQuery|Server|State' | grep -c 'connected' >> /var/tmp/$HOSTNAME"."$(date +%Y%m%d)B4.txt
tmsh show /gtm iquery | egrep 'Gtm::IQuery|Server|State' > /var/tmp/$HOSTNAME"."$(date +%Y%m%d)iQueryB4.txt
echo "."
echo "Number of Available Data Centers:" >> /var/tmp/$HOSTNAME"."$(date +%Y%m%d)B4.txt
tmsh show gtm datacenter all | egrep 'Gtm::|Datacenter|Availability|State|Reason|Connections' | grep -c ': available' >> /var/tmp/$HOSTNAME"."$(date +%Y%m%d)B4.txt
tmsh show gtm datacenter all | egrep 'Gtm::|Datacenter|Availability|State|Reason|Connections' > /var/tmp/$HOSTNAME"."$(date +%Y%m%d)dcB4.txt

cat /var/tmp/$HOSTNAME"."$(date +%Y%m%d)B4.txt

GTM CHANGE AFTER
date > /var/tmp/$HOSTNAME"."$(date +%Y%m%d)AFTER.txt
echo "F5 MasterKey:" >> /var/tmp/$HOSTNAME"."$(date +%Y%m%d)AFTER.txt
f5mku -K >> /var/tmp/$HOSTNAME"."$(date +%Y%m%d)AFTER.txt
echo "."
echo "Number of Available WideIPs:" >> /var/tmp/$HOSTNAME"."$(date +%Y%m%d)AFTER.txt
tmsh show /gtm wideip | egrep 'Gtm::|WideIP|Availability|State|Reason' | grep -c ': available' >> /var/tmp/$HOSTNAME"."$(date +%Y%m%d)AFTER.txt
tmsh show /gtm wideip | egrep 'Gtm::|WideIP|Availability|State|Reason' > /var/tmp/$HOSTNAME"."$(date +%Y%m%d)wideipAFTER.txt
tmsh reset-stats gtm wideip
echo "."
echo "Number of Available Pools:" >> /var/tmp/$HOSTNAME"."$(date +%Y%m%d)AFTER.txt
tmsh show /gtm pool | egrep 'Gtm::|Pool|Availability|State|Reason' | grep -c ': available' >> /var/tmp/$HOSTNAME"."$(date +%Y%m%d)AFTER.txt
tmsh show /gtm pool | egrep 'Gtm::Pool|Availability|Reason' > /var/tmp/$HOSTNAME"."$(date +%Y%m%d)poolsAFTER.txt
tmsh reset-stats gtm pool
echo "."
echo "Number of Available Servers:" >> /var/tmp/$HOSTNAME"."$(date +%Y%m%d)AFTER.txt
tmsh show /gtm server all | egrep 'Gtm::|Server|Availability|State|Reason' | grep -c ': available' >> /var/tmp/$HOSTNAME"."$(date +%Y%m%d)AFTER.txt
tmsh show /gtm server all | egrep 'Gtm::Server|Availability|Reason' > /var/tmp/$HOSTNAME"."$(date +%Y%m%d)serversAFTER.txt
tmsh reset-stats gtm server
echo "."
echo "iQuery:"
tmsh show /gtm iquery | egrep 'Gtm::IQuery|Server|State' | grep -c 'connected' >> /var/tmp/$HOSTNAME"."$(date +%Y%m%d)AFTER.txt
tmsh show /gtm iquery | egrep 'Gtm::IQuery|Server|State' > /var/tmp/$HOSTNAME"."$(date +%Y%m%d)iQueryAFTER.txt
tmsh reset-stats gtm iquery
echo "."
echo "Number of Available Data Centers:" >> /var/tmp/$HOSTNAME"."$(date +%Y%m%d)AFTER.txt
tmsh show gtm datacenter all | egrep 'Gtm::|Datacenter|Availability|State|Reason|Connections' | grep -c ': available' >> /var/tmp/$HOSTNAME"."$(date +%Y%m%d)AFTER.txt
tmsh show gtm datacenter all | egrep 'Gtm::|Datacenter|Availability|State|Reason|Connections' > /var/tmp/$HOSTNAME"."$(date +%Y%m%d)dcAFTER.txt
tmsh reset-stats gtm datacenter

cat /var/tmp/$HOSTNAME"."$(date +%Y%m%d)AFTER.txt

GTM COMPARE
diff /var/tmp/*wideipB4.txt /var/tmp/*wideipAFTER.txt
diff /var/tmp/*poolsB4.txt /var/tmp/*poolsAFTER.txt
diff /var/tmp/*serversB4.txt /var/tmp/*serversAFTER.txt
diff /var/tmp/*iQueryB4.txt /var/tmp/*iQueryAFTER.txt
diff /var/tmp/*dcB4.txt /var/tmp/*dcAFTER.txt

Link to comment
Share on other sites

 Share

×
×
  • Create New...