cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
654
Views
0
Helpful
1
Replies

EEM to be invoked on switch power off

cisco_query
Level 1
Level 1

Hi,

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.

Thanks,

Peter

1 Reply 1

Joe Clarke
Cisco Employee
Cisco Employee

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.