Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k
New Member

TCL issue

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

c1841#tclsh tftp://10.1.0.27/eemsample.tcl

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

[OK - 171 bytes]

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

while executing

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

(file "tftp://10.1.0.27/eemsample.tcl" line 4)

c1841#

eemsample.tcl content:

namespace import ::cisco::eem::*

action_syslog priority info msg "..."

2 REPLIES
Cisco Employee

Re: TCL issue

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:

::cisco::eem::event_register_none

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

New Member

dude thnx it saved my day :P

dude thnx it saved my day :P

569
Views
5
Helpful
2
Replies
CreatePlease to create content