본문 바로가기

Ryu's Tech

NTP와 로그 동기화 후의 로그 메세지 표시형식

장비에서

 

NTP와 service time log date msec local show

 

커맨드를 통해 log 메세지에 대한 시간 동기화를 시킨 뒤

 

show logging 커맨드로 확인하면


*Mar  1 09:01:35.378 KST: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/4, changed state to up
.Sep  8 14:32:50.302 KST: %LINK-3-UPDOWN: Interface GigabitEthernet1/1, changed state to up

Sep  8 21:38:02.072 KST: %SYS-5-CONFIG_I: Configured from console by XXXXXX on vty0 (xx.xxx.xxx.xx)

위와 같이 메세지 앞에 별(*)이나 점(.) 표시가 붙어 나오는 경우가 있다.

 

시스코 문서를 찾아보면

 

Table 48 Time-Stamping Symbols for syslog Messages

Symbol
Description
Example

(blank)

Time is authoritative: the software clock is in sync or has just been set manually

15:29:03.158 UTC Tue Feb 25 2003:

*

Time is not authoritative: the software clock has not been set, or is not in sync with configured Network Time Protocol (NTP) servers.

*15:29:03.158 UTC Tue Feb 25 2003:

.

Time is authoritative, but the NTP is not synchronized: the software clock was in sync, but has since lost contact with all configured NTP servers.

.15:29:03.158 UTC Tue Feb 25 2003:

 

Cisco IOS Configuration Fundamentals Command Reference.pdf

 

http://www.cisco.com/en/US/docs/ios/fundamentals/command/reference/cf_r1.html#wp1030116

 

 

좀 더 쉽게 정의하면

공백 : NTP를 통해 시간을 받아오고, 시간동기화가 되고 있는 경우

* : NTP을 통해 시간을 받아온 적이 없고, 시간 동기화가 되고 있지 않은 경우

. : NTP를 통해 시간을 받아온 적이 있고, 시간 동기화가 되고 있지 않은 경우

 

 

그래서 또 다른 로그를 살펴보면 최초 시간 동기화 후...

 

Sep  8 14:42:56.388 KST: %LINK-3-UPDOWN: Interface GigabitEthernet1/0/1, changed state to down
.Sep  8 14:53:43.301 KST: %LINK-3-UPDOWN: Interface GigabitEthernet1/0/1, changed state to up
.Sep  8 14:53:45.310 KST: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/1, changed state to up
Sep  8 17:13:27.790 KST: %SYS-5-CONFIG_I: Configured from console by vty0 (xx.xxx.xxx.xx)

보면 Gi1/0/1이 업링크포트인데 위 포트가 잠시 접속이 끊어 졌을 경우인데

끊어지고 나면 시간 동기화가 되지 않기 때문에 로그 앞에 점(.) 이 붙은 것을 볼 수가 있고

업링크 포트가 다시 살아 나고 나서 다시 동기화가 되기 때문에 로그 메세지 앞에 아무것도 붙지 않은 것을 확인 할 수 있다.