TCL issue

Unanswered Question
Aug 30th, 2007

Help me please with getting rid of the following error message:

c1841#tclsh tftp://

Loading eemsample.tcl from (via FastEthernet0/1): !

[OK - 171 bytes]

unknown namespace in import pattern "::cisco::eem::*"

while executing

"namespace import ::cisco::eem::*"

(file "tftp://" line 4)


eemsample.tcl content:

namespace import ::cisco::eem::*

action_syslog priority info msg "..."

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Joe Clarke Thu, 08/30/2007 - 08:37

As I said in the other thread, you can't use EEM libraries as-is in tclsh scripts. If you want to make use of EEM constructs, your best bet is to convert the tclsh script to an EEM TCL Policy. In this case, it would be:


namespace import ::cisco::eem::*

namespace import ::cisco::lib::*

action_syslog priority info msg "This is a test"

Then to run this script, create a directory on flash called eem_policies, then copy this script into the eem_policies directory. Then add the following configuration commands:

event manager directory user policy flash:/eem_policies

event manager policy eemsample.tcl type user

Then to run the policy, run the following command from EXEC mode:

event manager run eemsample.tcl


This Discussion