cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1172
Views
0
Helpful
4
Replies

2900 Series Router Shows Wrong Date in Logs

Matthew Martin
Level 5
Level 5

Hello All,

Router: 2911 SIP Gateway (C2900-UNIVERSALK9-M)
IOS Ver: Version 15.2(4)M3

When I run the "show ntp status" command it is showing the correct date/time in with the NTP data. But when I run "show logg" the SIP messages being logged are showing a time that is 4 hours ahead of the actual time.

    *Current Time I'm writing this is 11:45'ish...

# show ntp status
Clock is synchronized, stratum 5, reference is 192.168.xx.x
nominal freq is 250.0000 Hz, actual freq is 249.9996 Hz, precision is 2**21
ntp uptime is 836292100 (1/100 of seconds), resolution is 4016
reference time is D74AE0C1.A5C9079D (11:44:01.647 EDT Tue Jun 17 2014)
clock offset is 1.4716 msec, root delay is 156.27 msec
root dispersion is 252.26 msec, peer dispersion is 17.29 msec
loopfilter state is 'CTRL' (Normal Controlled Loop), drift is 0.000001556 s/s
system poll interval is 512, last update was 427 sec ago.

#show logg
1268129: Jun 17 15:53:41.146: //543358/47CDDA800000/SIP/Msg/ccsipDisplayMsg:

As you can see the date and time of this last log message in the buffer is showing a time of "15:53:41". Which is about 4 hours ahead of the current time, which makes me think it's a timezone thing, but it looks correct in NTP status... Any idea why the correct time and time zone <(*I'm in EST zone) is in NTP status, but incorrect in the log(s)?

Any ideas how I can fix this?
Any thoughts or suggestions would be much appreciated.

Thanks in Advance,
Matt
 

1 Accepted Solution

Accepted Solutions

Ankur Arora
Level 1
Level 1

Hi,

https://supportforums.cisco.com/document/24156/router-log-timestamp-entries-are-different-system-clock-when-ntp-configured

Add the [localtime] option to the service timestamps log command. For example, if the current configuration isservice timestamps log datetime, issue this global configuration command:

router(config)#service timestamps log datetime localtime
router(config)#^Z (ctrl z to exit)
router#write mem

 

The times should now be synchronized between the system clock and the log message timestamps.

Thanks

"Please rate the post if found useful"

View solution in original post

4 Replies 4

Ankur Arora
Level 1
Level 1

Hi,

https://supportforums.cisco.com/document/24156/router-log-timestamp-entries-are-different-system-clock-when-ntp-configured

Add the [localtime] option to the service timestamps log command. For example, if the current configuration isservice timestamps log datetime, issue this global configuration command:

router(config)#service timestamps log datetime localtime
router(config)#^Z (ctrl z to exit)
router#write mem

 

The times should now be synchronized between the system clock and the log message timestamps.

Thanks

"Please rate the post if found useful"

Hey Ankur, thanks for the reply!

Ok, I'll give that a try. So was the log's times actually showing UTC time instead of the local..?

The line in the running-config for "timestamps" shows:
service timestamps debug datetime msec
service timestamps log datetime msec

Also, if a "write mem" is done, will that actually reboot/reload the router, because if so I can't run the "wr mem" until later tonight.

EDIT: Would this line do basically the same thing, but with miliseconds included?
   service timestamps log datetime localtime msec


Thanks AGAIN for the reply, much appreciated!

Thanks Again,
Matt

Not too sure what the log time was actually showing, might be UTC, but whatever it was, it was not syncing with ntp i.e. local time of the router.

Write mem command will not reload the router, it will just save the running config to the startup config.

 

Thanks

 

"Please rate the post if found useful"

Hey Ankur, thanks again for the reply!

Ok, great. Thanks for the help that seemed to do it..!


Thanks again, much appreciated.

Thanks,
Matt

Review Cisco Networking products for a $25 gift card