on 10-Mar-2015 12:12
Problem this snippet solves:
Here's a way to monitor a specified pool's stats using a custom tmsh script.
Code :
proc script::run {} { if { $tmsh::argc != 3 } { puts "Usage: run cli script show_pool.tcl" } else { set poolname [lindex $tmsh::argv 1] set interval [lindex $tmsh::argv 2] } # tmsh::show allows a script to front the builtin show command while { true } { tmsh::clear_screen puts [tmsh::show /ltm pool $poolname] tmsh::reset-stats /ltm pool $poolname after $interval } }