To Delete Massive IP SLA Configurations with Tcl

Version 1

    Had an issue where I needed an effective solution to delete massive IP SLA Configurations.   I found that the most effective solution was to use Cisco TCL or “Tickle” scripting.  To run the below script, enter “TCLSH” at the Enable prompt and change the numerical values with in the for loop to meet your needs.   Warning, this can be CPU intensive. So Test it and tune it to your needs

     

    # ------------- Start Cut here ----------------

    #

    #

    # To delete Ip sla configurations from routers

    #

    # at enable prompt enter "Tclsh"

    # then paste below

    #

     

    for { set i 1 } { $i <= 2883 } {incr i} {

     

     

    #

    #

    # we will delete ip sla - to max number defined above

    #

     

    ios_config "no ip sla $i"

     

    # echo the blow string to screen with the deleted number

     

    puts "Deleting: ip sla $i"

     

     

    }

     

     

    #---------- End Cut -------------