10-17-2013 10:15 AM - edited 03-04-2019 09:20 PM
Hello Friends - I am seeking your help in understanding why the timestamp shown in Logs differ from Router Clock set thru NTP. Here is my observation
Note: both the routers are SYNC with NTP server at Strarum 3
Router-1 Configuration
service timestamps log datetime msec localtime
here log messages (show log output) matches with Clock (show clock)
Router-2 Configuration
service timestamps log datetime msec
here log messages (show log output) doesn't matches with Clock (show clock). There is some difference of +3hrs 20 minutes (additional in Log message timestamp)
May i know from where the logs assumes the time in Router-2 ? I am not seeing this time in NTP
Thanks in advance
SAIRAM
Solved! Go to Solution.
10-17-2013 10:55 AM
Hello.
If you enter "service timestamps log datetime localtime", then you see local time (that is CDT).
If you omit "localtime", then time is shown for UTC (5 hours later than CDT); so the event happend at 15:44:31 UTC = 10:44:31 CDT.
PS: for multinational companies it's a best practice to keep routers' clock in UTC (and timestamps as well).
10-17-2013 10:19 AM
Friends - To add more to get more visibility here is the output
Router-2
rtr2# show clock
12:17:16.860 CDT Thu Oct 17 2013
rtr2#show ntp assoc
address ref clock st when poll reach delay offset disp
*~165.130.1.7 65.49.70.244 3 347 1024 377 27.565 -10.826 14.835
rtr2-st0564# show log | in Oct 17
033016: Oct 17 15:44:31.420: %IPPHONE-6-UNREGISTER_ABNORMAL
10-17-2013 10:55 AM
Hello.
If you enter "service timestamps log datetime localtime", then you see local time (that is CDT).
If you omit "localtime", then time is shown for UTC (5 hours later than CDT); so the event happend at 15:44:31 UTC = 10:44:31 CDT.
PS: for multinational companies it's a best practice to keep routers' clock in UTC (and timestamps as well).
10-17-2013 11:06 AM
Thank you Mikhailovsky - Sounds logic. Here is the observation
rtr1#show clock
13:04:36.973 CDT Thu Oct 17 2013
rtr1#show log | in Oct 17
502468: Oct 17 18:03:46.133: %SEC-6-IPACCESSLOGP:
Excellent.. Thanks again
SAIRAM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide