save debug settings between reboots

Unanswered Question
Nov 30th, 2009

I have a small network at a remote site and I am trying to catch a random problem related a T1 line issue. I have a remote syslog server at the site that I am sending my debug outputs to. My problem is the power at this site is poor and even with a good UPS sometimes the batteries don't out last the outage and the router gets rebooted. My question is, can I save my debug settings so they stay persistent between reboots.

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
mlund Tue, 12/01/2009 - 06:30

Hi

No You can't save debug, so it restarts after boot,

But

You can probably use eem script to restart it

I haven't done it myself, but something similar to this may work

event manager applet Debug-restart
event syslog pattern "SNMP agent on host ROUTER is undergoing a cold start"
action 1.0 cli command "enable"
action 1.1 cli command "debug whatever"

/Mikael

Richard Burts Tue, 12/01/2009 - 14:52

Mikael is correct that you can not directly save the debug settings using copy run startup. But there is a technique that will get you the results that you want. Give this a try:

- copy and paste the running config into a text file.

- at the bottom of the text file insert the debug commands that you want the router to perform.

- save the text file.

- tftp the text file to the router startup-config

Since the router executes the commands in startup config it will load the config and then it will execute the debug commands. I have used this a time or two and it works quite well.

The EEM solution suggested by Mikael is probably a more elegant solution. But including the debugs in the text file and tftping to startup does work.

HTH

Rick

Actions

This Discussion