11-30-2009 01:38 PM - edited 03-04-2019 06:49 AM
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.
12-01-2009 06:30 AM
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
12-01-2009 02:52 PM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide