Data Center Networking Solutions

How To Display The Debug Outputs In The Logbuffer Instead Of Terminal Monitor

MVP
MVP
Requirement:

You may have to debug a few protocols to do deep investigations.  However, you may face a challenge when the debug output reflects in the terminal monitor along with the testing.  In such situations the below command lines would help in sending the debug outputs to the logbuffer.

 

For example: I am debugging IP ICMP to show the display in the terminal monitor and you may see how messy the data is.  We'll see how to move those debugs to the logbuffer using few a commands.

 

Network Topology :



Solution:

There are few commands through which we can separate the debug and test outputs:

info-center source default console deny

info-center source default monitor deny

info-center source default logbuffer level debugging

 



Configuration:

<Switch1>terminal monitor

The current terminal is enabled to display logs.

<Switch1>terminal debugging

The current terminal is enabled to display debugging logs.

<Switch1>debugging ip icmp

 

<Switch1>ping 192.168.1.1

Ping 192.168.1.1 (192.168.1.1): 56 data bytes, press CTRL_C to break

56 bytes from 192.168.1.1: icmp_seq=0 ttl=255 time=0.000 ms

*Feb 23 17:04:51:687 2020 Switch1 SOCKET/7/ICMP:

ICMP Output:

 ICMP Packet: vpn = PUBLIC(0), src=192.168.1.1, dst = 192.168.1.1

              type = 8, code = 0 (echo)

 

*Feb 23 17:04:51:687 2020 Switch1 SOCKET/7/ICMP:

ICMP Input:

 ICMP Packet: vpn = PUBLIC(0), src=192.168.1.1, dst = 192.168.1.1

              type = 8, code = 0 (echo)

 

*Feb 23 17:04:51:687 2020 Switch1 SOCKET/7/ICMP:

ICMP Output:

 ICMP Packet: vpn = PUBLIC(0), src=192.168.1.1, dst = 192.168.1.1

              type = 0, code = 0 (echo-reply)

 

*Feb 23 17:04:51:687 2020 Switch1 SOCKET/7/ICMP:

ICMP Input:

 ICMP Packet: vpn = PUBLIC(0), src=192.168.1.1, dst = 192.168.1.1

              type = 0, code = 0 (echo-reply)

 

56 bytes from 192.168.1.1: icmp_seq=1 ttl=255 time=0.000 ms

%Feb 23 17:04:52:498 2020 Switch1 PING/6/PING_STATISTICS: Ping statistics for 192.168.1.1: 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss, round-trip min/avg/max/std-dev = 0.000/0.400/1.000/0.490 ms.

 

(Only few of the debug outputs are displayed, the rest have been omitted intentionally – just to show that the ping test results and debug outputs will reflect in the terminal monitor)

As you can see the ping test output (Italics) and the debug output (non-italics) are all exhibiting on the same terminal monitor.  Let’s see how the output looks like after entering the following commands.

 

Commands that required to show the debug output in the Logbuffer :

<Switch1> info-center source default console deny

<Switch1> info-center source default monitor deny

<Switch1> info-center source default logbuffer level debugging

 



Verification

Let’s verify the output from terminal monitor and logbuffer, after introducing the commands :

 

Verify From Terminal Monitor :

<Switch1>ping 192.168.1.1

Ping 192.168.1.1 (192.168.1.1): 56 data bytes, press CTRL_C to break

56 bytes from 192.168.1.1: icmp_seq=0 ttl=255 time=1.000 ms

56 bytes from 192.168.1.1: icmp_seq=1 ttl=255 time=1.000 ms

56 bytes from 192.168.1.1: icmp_seq=2 ttl=255 time=1.000 ms

56 bytes from 192.168.1.1: icmp_seq=3 ttl=255 time=0.000 ms

56 bytes from 192.168.1.1: icmp_seq=4 ttl=255 time=1.000 ms

 

--- Ping statistics for 192.168.1.1 ---

5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss

round-trip min/avg/max/std-dev = 0.000/0.800/1.000/0.400 ms

 

Verify From Logbuffer:

<Switch1>display logbuffer reverse

Log buffer: Enabled

Max buffer size: 1024

Actual buffer size: 512

Dropped messages: 0

Overwritten messages: 0

Current messages: 86

%Feb 23 17:18:04:698 2020 Switch1 PING/6/PING_STATISTICS: Ping statistics for 192.168.1.2: 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss, round-trip min/avg/max/std-dev = 0.000/1.200/3.000/0.980 ms.

*Feb 23 17:18:04:696 2020 Switch1 SOCKET/7/ICMP:

ICMP Input:

 ICMP Packet: vpn = PUBLIC(0), src=192.168.1.2, dst = 192.168.1.1

              type = 0, code = 0 (echo-reply)

 

*Feb 23 17:18:04:695 2020 Switch1 SOCKET/7/ICMP:

ICMP Output:

 ICMP Packet: vpn = PUBLIC(0), src=192.168.1.1, dst = 192.168.1.2

              type = 8, code = 0 (echo)

 

*Feb 23 17:18:04:492 2020 Switch1 SOCKET/7/ICMP:

ICMP Input:

 ICMP Packet: vpn = PUBLIC(0), src=192.168.1.2, dst = 192.168.1.1

              type = 0, code = 0 (echo-reply)

 

*Feb 23 17:18:04:491 2020 Switch1 SOCKET/7/ICMP:

 

(Only few of the debug outputs are displayed, rest have been omitted intentionally – just to show how the debug outputs will reflect in the logbuffer)

Version history
Revision #:
2 of 2
Last update:
‎02-28-2020 01:02 PM
Updated by:
 
Labels (1)
Contributors