Browse By

Re-enable debugs on router reload – EEM Script

Re-Enable Debugs on Router Reload using EEM Script

I was recently troubleshooting one issue and i ran some debugs on Cisco Voice Gateway and wrote the config by issuing the command “write memory”. Since the router received high call volume, the CPU spiked and the router was reloaded. Upon router reload, the debugs were turned off automatically.

Upon investigation, i realized that this is the expected behavior and to overcome such scenario there is a way by configuring EEM (Embedded Event Manager). EEM scripts can be configured in Cisco IOS, XR, and NX-OS. EEM scripts can be configured in such a way that when an event is triggered, you can run some certain set of commands which are defined in EEM Script.

EEM Configuration:

To achieve the required scenario, i configured the following in the router:

Router(config)# event manager applet EnableDebuggingAfterReload
Router(config-applet)# event syslog occurs 1 pattern “%SYS-5-RESTART”
Router(config-applet)# action 1.0 cli command “enable”
Router(config-applet)# action 2.0 cli command “debug ccsip error”
Router(config-applet)# action 3.0 cli command “debug ccsip non-call”
Router(config-applet)# action 4.0 cli command “debug ccsip messages”
Router(config-applet)# exit
Router(config)# exit
Router(config)# write memory

EEM Testing:

To test the EEM script, i reloaded the router by issuing the command “reload” and also by powering the router down and bringing it back again. In both

I used two different testing scenarios to verify if the EEM script is working as expected.

  1. By issuing the command “reload” to restart the router.
  2. By hard powering down the router and start the router manually.

Note: It is always recommended to run such debugs during a maintenance window and off business hours as running such debugs can bring the network down.

Leave a Reply

Your email address will not be published. Required fields are marked *

Claudio Quiroz Cabello

Electrical Engineer CCNA Collaboration CCNA Voice CCNA R&S. I'm Electrical Engineer and I work like Support Engineer for a Telephony Service Provider Company. Before that I had position like Pre-Sale Engineer about small and medium multivendor telephony solutions. I have 5 years of experience working in Telephony Multivendor Projects. I am also 3 years of experience working in Support and implementation about Cisco Collaboration platforms: UCS server, UCM, Cisco Unity, Presence Server, Jabber, Gateway. Support Community is most useful in finding design, implementation and support tricks and shortcuts that greatly help me in my daily activities. If you need to contact me, please you can writte me.

Kanishka Singh

CCNA Routing and Switching
Am a technology enthusiast. I work in network support providing support with implementation, maintaining and precisely troubleshooting the infra.
Realm of collaboration makes me want to learn and face new challenges more and more.

Show Buttons
Hide Buttons