Show Pool Stats

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
       }
}
Published Mar 10, 2015
Version 1.0
  • Using BIGIP LTM v.11.5.3. This script gives the following error: "Syntax Error: incomplete command."