cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1981
Views
5
Helpful
1
Replies

Maxrun and Default Timers

blackv2017
Level 1
Level 1

hi Joe Clarke| Team

i have a questions about the maxrun that it was define in EEM TCL scripting.

From the cisco it said that

"By default, all EEM policies should run to completion within 20 seconds. This 20 second timer is known as the maxrun timer.It is not always possible to accomplish everything your policy needs to do in 20 seconds, however.For policies requiring a longer run time, the maxrun timer can be increased when configuring your event registration line. The maxrun time is specified in seconds.milliseconds"

so in my case, i have identify that the maxrun timer which is same and not specified.

My questions are:-

is it because i specify the watchdog timer and the output of the maxrun timer are difference for  scripts status down and up?

or do i need to declare the correct max timer so that when EEm run it will specified same timers regardless its up or down?

Below is the snippet script and output of of my eem tcl scripts:-

//

::cisco::eem::event_register_timer watchdog time 120 name crc maxrun 999999

sh event manager policy registered

No. Class Type Event Type Trap Time Registered Name
1 script user syslog Off Thu May 26 00:48:23 2016 vPE_EEM_DOWN_MD.tcl
1: syslog: occurs 1 pattern {BFD-6-BFD_SESS_DESTROYED}
nice 0 queue-priority normal maxrun 100.000 scheduler rp_primary Secu none>>>>>>>>>>>>>>>>>>>>>>>maxrun 100


2 script user syslog Off Thu May 26 00:48:23 2016
vPE_EEM_UP_TUNNEL_MD.tcl
1: syslog: occurs 1 pattern {Line protocol on Interface Tunnel0, changed state to up}
nice 0 queue-priority normal maxrun 180.000 scheduler rp_primary Secu none >>>>>>>>>>>>>>>>>>>>>>>>>>>>>maxrun 180

//

Can someone explain or advise.

Really appreciated.

Thanks

1 Reply 1

Joe Clarke
Cisco Employee
Cisco Employee

I really don't understand your questions.  Maxrun is really quite simple.  If your policy is expected to take longer than 20 seconds to complete its execution, then you must increase the maxrun value.  If the script finishes before maxrun expires, the script will terminate normally.  Therefore, you can set a high maxrun time without negatively impacting resources.  However, if you set a maxrun too high, and the script hangs for whatever reason, it will continue to be active until maxrun expires.  So, you should try and pick the most reasonable maxrun possible.

The default timer controls how many seconds a synchronous policy will wait before putting itself into the background.  For example, if you have a policy that runs and blocks on the current VTY, the default timer will control how long the VTY is blocked before you get a prompt again.  When the policy is moved to the background, it will continue to run until the maxrun timer expires or the policy terminates normally.

Review Cisco Networking for a $25 gift card