Developing Embedded Event Manager (EEM) Tcl policies is "a bit" tedious task. Usually you would edit the source file on an external workstation, then you have to download it into the router (IOS will not read EEM policy from an external source), re-register it with EEM (when you register a policy it gets copied from the source file into system:lib/tcl/eem_registered_scripts directory) and test it. To automate this process, I've written a small EEM applet that does the tedious steps automatically. Configure the following EEM applet (replacing ep.tcl with your policy name and nvram: with your router storage device):
event manager applet LoadMyPolicyDefine an alias to start the load process with a simple command:
action 1.0 cli command "configure terminal"
action 1.1 cli command "no event manager policy ep.tcl"
action 1.2 cli command "file prompt quiet"
action 1.3 cli command "exit"
action 2.0 cli command "copy tftp://10.0.0.10/tcl/ep.tcl nvram:ep.tcl"
action 3.0 cli command "configure terminal"
action 3.1 cli command "event manager policy ep.tcl"
action 3.2 cli command "exit"
alias exec load event manager run LoadMyPolicyNow you can use the newly-created exec-level load command to load and re-register your EEM policy.