For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

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

1 Comment

  • Using BIGIP LTM v.11.5.3. This script gives the following error: "Syntax Error: incomplete command."