Cisco: terminal log output

Pocket

R1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#int f0/0
R1(config-if)#shut
R1(config-if)#
*Mar  1 01:03:46.359: %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to administratively down
*Mar  1 01:03:47.359: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to down
R1(config-if)#
R2#
*Mar  1 01:10:16.051: %LINK-5-CHANGED: Interface FastEthernet1/0, changed state to administratively down
*Mar  1 01:10:17.051: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to down
R2#

terminal monitor

R2#terminal monitor
R2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#end
R2#
*Mar  1 23:47:01.290: %SYS-5-CONFIG_I: Configured from console by vty1 (192.168.12.1)

service timestamps

month/day

R1(config)#^Z
R1#
*Mar  1 23:49:12.590: %SYS-5-CONFIG_I: Configured from console by console

uptime

R1(config)#service timestamps log uptime
R1(config)#^Z
R1#
23:49:30: %SYS-5-CONFIG_I: Configured from console by console

service timestamps log datetime

R1(config)#service timestamps log datetime
R1(config)#^Z
R1#
*Mar  1 23:51:03: %SYS-5-CONFIG_I: Configured from console by console
R1(config)#service timestamps log datetime msec localtime show-timezone
R1(config)#^Z
R1#
*Mar  1 23:52:46.042 UTC: %SYS-5-CONFIG_I: Configured from console by console

debug についても同様にすると

R1(config)#do debug ip icmp
ICMP packet debugging is on
R1(config)#do ping 192.168.12.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.12.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/8/12 ms
R1(config)#
*Mar  1 23:55:08.534: ICMP: echo reply rcvd, src 192.168.12.2, dst 192.168.12.1
*Mar  1 23:55:08.542: ICMP: echo reply rcvd, src 192.168.12.2, dst 192.168.12.1
*Mar  1 23:55:08.554: ICMP: echo reply rcvd, src 192.168.12.2, dst 192.168.12.1
*Mar  1 23:55:08.562: ICMP: echo reply rcvd, src 192.168.12.2, dst 192.168.12.1
*Mar  1 23:55:08.574: ICMP: echo reply rcvd, src 192.168.12.2, dst 192.168.12.1
R1(config)#service timestamps debug datetime msec localtime show-timezone
R1(config)#^Z
R1#
*Mar  1 23:55:54.534 UTC: %SYS-5-CONFIG_I: Configured from console by console
R1#ping 192.168.12.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.12.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/12/24 ms
R1#
*Mar  1 23:56:12.646 UTC: ICMP: echo reply rcvd, src 192.168.12.2, dst 192.168.12.1
*Mar  1 23:56:12.654 UTC: ICMP: echo reply rcvd, src 192.168.12.2, dst 192.168.12.1
*Mar  1 23:56:12.662 UTC: ICMP: echo reply rcvd, src 192.168.12.2, dst 192.168.12.1
*Mar  1 23:56:12.674 UTC: ICMP: echo reply rcvd, src 192.168.12.2, dst 192.168.12.1
*Mar  1 23:56:12.686 UTC: ICMP: echo reply rcvd, src 192.168.12.2, dst 192.168.12.1
R1#undebug all
All possible debugging has been turned off

したがって推奨設定は

service timestamps log datetime msec localtime show-timezone
service timestamps debug datetime msec localtime show-timezone

References

  1. Ciscoデバイスの操作 – Ciscoルータ – 出力されたログにあわてない

Sponsored Link

Leave a Reply

Your email address will not be published. Required fields are marked *