Cisco Support Community
Community Member

save debug settings between reboots

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.


Re: save debug settings between reboots


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


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"


Hall of Fame Super Gold

Re: save debug settings between reboots

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.



CreatePlease to create content