cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1153
Views
0
Helpful
1
Replies

EEM vs direct TCL execution

SCOTT TUDOR
Level 1
Level 1

What is the best practice for running TCL scripts in IOS? should they be run through EEM (using the eve man run xx.tcl) or directly? EEM allows you to run it with low priority which is a big benefit for scripts that can put a load on the CPU but bugs like CSCsm37007 (and other nuances) have to be dealt with. On the flip side, what other processes run at Medium/Low priority that could be affected by direct TCL execution? Thoughts?  Thanks in advance.

1 Reply 1

Joe Clarke
Cisco Employee
Cisco Employee

It depends on what your script will be doing as to whether or not to use tclsh or EEM Tcl.  For a script that needs UDP socket access or direct terminal manipulation (e.g. screen refresh, single-character reading, etc.) then tclsh is the way to go.  If you need to do complex command interaction, want to easily send email, and get the benefit of the EEM security and scheduling perks, then EEM is the way to go.  In general, I find EEM Tcl to be a bit richer for the scripts I write.  This is especially true if you consider not using the none ED, and rather use the enhanced CLI ED to add your command to the parser tree.  So, instead of typing "event manager run script.tcl", you can create a truly custom command such as "show scott tudor" that supports context-sensitve help and tab completion.