cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
11610
Views
10
Helpful
5
Replies

Viewing a trace log file on the router itself

MysticalTh0r
Level 1
Level 1

Hi all,

 

When trying to find out the reason of a crash on a router or due to another reason on an IOS-XE device, I was able to view the tracelog files of the different processess of the router (fman, hman, and so on) using the more command: more bootflash:tracelogs/<name_of_file>

 

But lately I've seen the files are being compressed in gz format, thus now allowing me to print it on the screen. Is it possible to uncompress and print it on the screen using another command or the only way is to export the files to a PC and uncompressing it there? I'm just asking because it is faster and easier for me to print the files "live" rather than having to export it to a laptop. Thanks,

 

Best regards.

 

José Manuel.

 

2 Accepted Solutions

Accepted Solutions

Hello,

 

I looked around some more, it doesn't work in XE apparently...

 

--> Extraction of files cannot be performed at the IOS prompt.

 

https://www.cisco.com/c/en/us/td/docs/routers/asr903/software/guide/chassis/xe-3s/b_Config_Guide_fullbook/b-cfg-trace.html#con_1058875

View solution in original post

Akshay Kaul
Cisco Employee
Cisco Employee

 

Starting 16.7, you can do a show log file crashinfo:tracelogs/filename to look at the contents.

For a router, the file will be in bootflash or harddisk instead of the crashinfo directory, so change the path accordingly.

View solution in original post

5 Replies 5

Hello,

 

I don't have an XE device available to test this on, but I think if you use the 'gunzip' command, you can uncompress a file, and then use the command you previously used to view the file:

 

gunzip bootflash:tracelogs/trace1.gz

Thanks Georg for the fast reply.

 

Unfortunately, I believe this is a command for NX-OS, not for IOS-XE:

 

https://www.cisco.com/c/m/en_us/techdoc/dc/reference/cli/n5k/commands/gunzip.html

 

On my device (ISR 1100 series):

 

Router#sh ver
Cisco IOS XE Software, Version 16.07.02

 

Router#g?
% Unrecognized command
Router#gunzip bootflash:tracelogs/cmcc_0-0.27448_901.20191231102411.bin.gz
^
% Invalid input detected at '^' marker.

 

Best regards.

 

José Manuel.

Hello,

 

I looked around some more, it doesn't work in XE apparently...

 

--> Extraction of files cannot be performed at the IOS prompt.

 

https://www.cisco.com/c/en/us/td/docs/routers/asr903/software/guide/chassis/xe-3s/b_Config_Guide_fullbook/b-cfg-trace.html#con_1058875

Hello Georg,

So I guess there's no other way than exporting it to a PC. Thanks for your help. Best regards,

José Manuel.

Akshay Kaul
Cisco Employee
Cisco Employee

 

Starting 16.7, you can do a show log file crashinfo:tracelogs/filename to look at the contents.

For a router, the file will be in bootflash or harddisk instead of the crashinfo directory, so change the path accordingly.

Review Cisco Networking products for a $25 gift card