What is the reason time is different in the log and clock?

Answered Question
Jul 18th, 2010
User Badges:

Hi,


Looking at the 877 router log thru the web interface, I am seeing these last few lines:


Jul 18 15:30:02.630: %LINK-3-UPDOWN: Interface ATM0, changed state to down
Jul 18 15:30:34.226: %LINK-3-UPDOWN: Interface ATM0, changed state to up
Jul 18 15:30:48.262: %LINK-3-UPDOWN: Interface Virtual-Access1, changed state to down
Jul 18 15:31:10.784: %LINK-3-UPDOWN: Interface Virtual-Access1, changed state to up

The interesting thing is that current time on the router is:

12:32:29.924 EDT Sun Jul 18 2010
Time source is NTP
Summer time starts 02:00:00 EST Sun Mar 14 2010
Summer time ends 02:00:00 EDT Sun Nov 7 2010
cisco877#


I.e. the log shows either different time zone or just some random numbers. What am I doing wrong and how can I know what time the router's modem dropped DSL connection?


Thanks

Zen

Correct Answer by Richard Burts about 6 years 10 months ago

Zen


It appears that your log is using time that is local router time + 3 hours.

We might be able to provide better answers if you would post the output of show run | include time


HTH


Rick

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Giuseppe Larosa Sun, 07/18/2010 - 12:30
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

Hello Zen,


there is an option (localtime) in the command that specifies the use of date time in log messages


if you use

config t

service timestamps log datetime msec localtime


you should be able to have the same time in both log messages and on the router


see

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



Hope to help

Giuseppe

Zenith888 Mon, 07/19/2010 - 08:10
User Badges:

That's great. Can I also find out what time the logs currenly use so that I can provide correct down time to the ISP for investigation?

Correct Answer
Richard Burts Mon, 07/19/2010 - 10:47
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Zen


It appears that your log is using time that is local router time + 3 hours.

We might be able to provide better answers if you would post the output of show run | include time


HTH


Rick

Zenith888 Mon, 07/19/2010 - 11:54
User Badges:

cisco877#show run | include time

service timestamps debug datetime msec

service timestamps log datetime msec localtime

clock timezone EST -5

clock summer-time EDT recurring

ip http timeout-policy idle 60 life 86400 requests 10000

This feature requires the one-time use of the username "cisco"

scheduler max-task-time 5000

Richard Burts Mon, 07/19/2010 - 12:31
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Zen


Thank you for providing the information that I asked about. Would I be correct in assuming that you have already implemented the suggestion by Giuseppe to include localtime in the timestamps command?


From what you have posted I would expect that the timestamp in your log messages would now be the same as the time on the router. If that is not the case then please provide a new sample of log messages with time stamps and the ouput of show clock detail on the router at the time that the log messages were generated.


HTH


Rick

Actions

This Discussion