Previous section   Next section

Recipe 2.12 Creating Exception Dump Files

2.12.1 Problem

Your router is having serious problems and you need to create an exception dump to forward to Cisco's TAC.

2.12.2 Solution

To create an exception dump of a router's memory after a failure, you need to configure the exception dump command and tell the router how to automatically transfer this information to a server:

Router1#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
Router1(config)#ip ftp source-interface Loopback0
Router1(config)#ip ftp username ijbrown
Router1(config)#ip ftp password ijpassword
Router1(config)#exception protocol ftp
Router1(config)#exception region-size 65536
Router1(config)#exception dump 172.25.1.3
Router1(config)#end
Router1#

2.12.3 Discussion

This is the one recipe that we hope none of our readers ever need to use. The main reason for creating an exception dump of your router memory contents is to help Cisco's TAC to diagnose catastrophic software problems with one of your routers. When you have these types of extreme problems, the TAC will often request an exception dump of the router. We have included this recipe so that you'll know what to do if it ever becomes necessary.

An exception dump is a snapshot of the router's memory contents taken just before a software error forces the router to reload. The router must transfer this to a server because it is too much information to store in nonvolatile storage.

The dump actually creates two files: one of the main system memory, and one of the IO memory. The software engineers at Cisco can then use these two files to figure out what caused the software failure and (hopefully) create a fix for the next IOS release.

By default, the router uses TFTP to transfer the dump files. However, we strongly recommend using FTP instead. If your router has to transfer more than 16MB of memory, most TFTP applications will fail, so FTP is the only option. FTP is also much more reliable than TFTP. Our example shows how to configure a router to use FTP to transfer the exception dump files from the router to the server. For more information on configuring the router to use FTP, see Recipe 1.14.

Exception dumps are prone to failure because the router doesn't attempt them until it has suffered a serious software failure. This software failure could corrupt your router's memory and make any further processing impossible—including creating the exception dump. You can greatly increase the chances of a successful exception dump by dedicating a small amount of memory to serve as a backup memory pool in case the main memory becomes corrupted:

Router1#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
Router1(config)#exception region-size 65536
Router1(config)#end
Router1#

You can define how much memory the router should dedicate to creating exception dumps. The default is 16,384 bytes, but we recommend increasing this to the maximum value of 65,536 bytes. This greatly increases the chances of a successful exception dump.

By default, the router creates two exception dump files named hostname-core and hostname-coreiomem. In our example the router name is Router1, so the two files created will be called Router1-core and Router1-coreiomem. You can change the default naming convention of the core files with the exception core-file command:

Router1#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
Router1(config)#exception core-file router5 compress
Router1(config)#end
Router1#

Note that we have included the optional keyword compress in this command. This option instructs the router to compress the core files before transferring them to the server. You can then uncompress the files on the server with the Unix uncompress command. We actually don't recommend using this feature though, because it adds extra CPU and memory load to a router that is already in trouble. Furthermore, we have found that this option doesn't seem to shrink the files enough to be useful. In some cases, it even causes the main core file to grow larger.

On the server side, you need to ensure that you have enough disk space to hold the two dump files. The size of these files will vary from router to router, depending on the amount of memory they contain. Expect the dump files to equal the total amount of memory installed in the router.

You can force the router to perform a core dump of its normal memory with the write core command. This command provides an excellent way to test whether everything is configured correctly before a catastrophic failure forces the real dump:

Router1#write core
Remote host [172.25.1.3]? <enter>
Base name of core files to write [Router1-core]? <enter>
Writing Router1-coreiomem 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Writing Router1-core 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Router1#

When we display these files on the server, you can see that their combined sizes are 48MB:

Freebsd% ls -la
drwxr-xr-x  3 ijbrown  ijbrown       512 Feb  1 13:50 ./
drwxr-xr-x  5 root     wheel         512 Feb  4  2002 ../
-rw-r--r--  1 ijbrown  ijbrown  46137344 Feb  1 13:54 Router1-core
-rw-r--r--  1 ijbrown  ijbrown   4194304 Feb  1 13:52 Router1-coreiomem
Freebsd%

To increase the chances of success, use a server that is as close as possible to the router. Time is of the essence during the creation of an exception dump, so forcing a router to write its core across a slow and congested WAN link decreases your chances of success.

2.12.4 See Also

Recipe 1.14


  Previous section   Next section
Top