Upgrade Verification - CLI tips and tricks
I mentioned recently in a conversation that I use to use the CLI to generate a snapshot of the bigip run state for pre/post comparison after an upgrade. By accident, I ran across these scripts today so here they are for your enjoyment. They are circa big-ip v12 so update as needed, feel free to post updated versions in the reply and i will tick them as the answer even. Pre-Change (Now supports partitions) # tmsh -c "cd /; show ltm virtual recursive" | awk '/Ltm::Virtual/ { printf $NF } /(Availability|State)/ { printf ":"$NF } /Reason/ { print ":"$NF} ' > bigip-virtual-state.pre # tmsh -c "cd /; show ltm pool recursive" | awk '/Ltm::Pool/ { printf $NF } /(Availability|State)/ { printf ":"$NF } /Reason/ { print ":"$NF} ' > bigip-pool-state.pre Post Change # tmsh -c "cd /; show ltm virtual recursive" | awk '/Ltm::Virtual/ { printf $NF } /(Availability|State)/ { printf ":"$NF } /Reason/ { print ":"$NF} ' > bigip-virtual-state.post # tmsh -c "cd /; show ltm pool recursive" | awk '/Ltm::Pool/ { printf $NF } /(Availability|State)/ { printf ":"$NF } /Reason/ { print ":"$NF} ' > bigip-pool-state.post Comparison # diff bigip-virtual-state.pre bigip-virtual-state.post # diff bigip-pool-state.pre bigip-pool-state.post586Views2likes1CommentIs it possible to run shell script with user TMSH access
The resource admin with TMOS access want to run shell script (.sh), I already find the way to run on the TMSH mode. But I can't find the way. (Also try to find Ansible module linux on cli but not work) Anyone, can suggest me please. Thank you826Views0likes2CommentsUsing tmsh commands in tcl script not working
I have been messing around with some tcl stuff. I want to change the order of vips in a pool on the GTM. How would I inject this command into the tcl script ? Here is the cmd I want to use ultimately - tmsh::modify /gtm pool poolname members modify { :https { order 1 }} Here the test bed script that I put together: modify script flip.tcl { proc script::run {} { tmsh::modify /gtm pool poolmen members modify { :https { order 1 }} } Its saves without error but I executed I get this error: flip.tcl: script failed to complete: can't eval proc: "script::run" members: required brace is missing "{" while executing "tmsh::modify /gtm pool sdx-pq1-pool members modify { 10.15.10.200:https { order 1 }}" (procedure "script::run" line 3) invoked from within "script::run" line:1 script did not successfully complete, status:1 any help will be great! thanks256Views0likes1Comment