cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3558
Views
0
Helpful
4
Replies

Is there a way to run either a TCL script or EEM applet in background?

davemikolajczak
Level 1
Level 1

Does the script need to be tied to a TTY / COnsole session or can a command be invoked to run the script, log off and still have the script running?                  

4 Replies 4

mtimm
Cisco Employee
Cisco Employee

It sounds like you are specifically asking about a policy that is setup with the none event detector and triggered via the 'event manager run' command.  For such policies, as long as the policy remains configured, it will continue to run after the user has logged out.  For security reasons we no longer allow policies to run after they have been removed from the configuration though.  So a policy that unregisters itself by removing itself from the config will be forcibly killed by the EEM server.  This information is specific to IOS.  I'm not sure how IOS-XR or NX-OS handles things in this situation.

Mike

         Well what I am exploring is to monitor utilization on an interface and when a particular threshold is reached, log a message, perhaps change link cost, etc.  The goal would be to leave this running. It is apparent as to how to create an applet to look for an "event" and then react to it, but in this case, I envision a tcl script with a loop querying snmp to obtain utilization, making some sort of calulation and then making a decsion.

          I am wondering how to accomplish this without having a tty session involved with the tclsh invoked. 

For this type of event detection you would typically use the snmp event detector to monitor for the threshold.  Then the policy would only run if the threshold is crossed.  This event detector can also be setup to not re-enable event monitoring until a lower threshold has been reached again.  In this way, no one would need to be logged in at all.

Mike


So how does one setup a snmp event for a utilization threshold to be exceeded?

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: