Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

EEM to be invoked on switch power off


I am facing power fluctuations for devices and catlayst 6500 switches are going to rommon after that. This may due to config-register values getting changed automatically. I want to capture the config-register values upon switch power off and startup. Is it possible to track the power off and boot up events using EEM. If not, is it possible with TCL script. Please help.



Cisco Employee

Re: EEM to be invoked on switch power off

Unfortunately, this is not yet possible. I have a bug open on this, CSCef33393, but there is no workaround for the shutdown case.

The closest thing you could do is write an EEM timer cron policy that runs quickly (like every minute), and tracks the config-register value. This will have the best chance of capturing the last confreg value before shutdown.

For startup, you have a workaround. You can either write an EEM timer countdown policy which counts down from say, 30. Once the switch comes up, and registers this policy, it will wait the number of seconds, then execute once. The other option is to use tclsh, and load a Tcl script into the startup config. For example, your script could be called disk0:/confreg_startup.tcl. In the startup config, put:

do tclsh disk0:/confreg_startup.tcl

You will have to manually copy this config into the startup location (e.g. copy tftp start). The "do" command will be executed when the switch boots up.

CreatePlease login to create content