cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2201
Views
0
Helpful
2
Replies

Using Joe Clarke's Automatic port shutdown TCL scripts

VRizk
Level 1
Level 1

Hello,

I'm copying the steps here : http://www.mathewjbray.com/uncategorized/cisco-automatic-port-shutdown-and-dead-vlan-setting/

I put both TCL scripts on the switch and then went to enter in the following as stated:

event manager environment suspend_ports_days 21
event manager environment suspend_ports_config flash:/susp_ports.dat
event manager environment suspend_quarantine_vlan 3333
event manager directory user policy "flash:/policies"
no event manager policy sl_suspend_ports.tcl
event manager policy sl_suspend_ports.tcl
no event manager policy tm_suspend_ports.tcl
event manager policy tm_suspend_ports.tcl

 

When I go to enter this I get the following:

S3560-LAB-L101(config)#event manager environment suspend_ports_days 1
S3560-LAB-L101(config)#event manager directory user policy "flash:/policies"
S3560-LAB-L101(config)# no event manager policy sl_suspend_ports.tcl
EEM configuration: No policy sl_suspend_ports.tcl registered
S3560-LAB-L101(config)# event manager policy sl_suspend_ports.tcl
S3560-LAB-L101(config)# no event manager policy tm_suspend_ports.tcl
EEM configuration: No policy tm_suspend_ports.tcl registered
S3560-LAB-L101(config)# event manager policy tm_suspend_ports.tcl
EEM Register event failed:missing close-brace
    while compiling
"put [ open "flash:policies/tm_suspect_ports.tcl" w+ ]"

EEM configuration: failed to retrieve intermediate registration result for policy tm_suspend_ports.tcl

 

Is there something wrong with the TCL scripts? I didn't put in the quarantine vlan commands because I don't want to have any quarantines, just want them shut down.

1 Accepted Solution

Accepted Solutions

Joe Clarke
Cisco Employee
Cisco Employee

It seems your tm_suspend_ports.tcl policy contains more than the actual policy code itself.  It appears that you have code in there that use tclsh to create the file on flash.  Make sure you have only the contents listed on the blog.

View solution in original post

2 Replies 2

Joe Clarke
Cisco Employee
Cisco Employee

It seems your tm_suspend_ports.tcl policy contains more than the actual policy code itself.  It appears that you have code in there that use tclsh to create the file on flash.  Make sure you have only the contents listed on the blog.

Thank you Joe! Got it to work :)