EEM to be invoked on switch power off

Unanswered Question
May 20th, 2008

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

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Joe Clarke Tue, 05/20/2008 - 07:20

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.

Actions

This Discussion