Linux – My linux server time and log files are not the same

linuxlog-filesntp

Hi i have installed NTP on my linux server and i am getting my clock from a 6500 core switch, everything is working fine.

When i ssh to a switch i have it all sent to a log file on the linux server, this log file does not time stamp with the same time as i have on the server.

the date and hwclock are the same. But my my is exatly 6 hours behind my date on the server wich is CET.

Has annyone have that same problem ?

bedst regards

Martin

Best Answer

Unix and Linux servers as well as any network devices are best set to use UTC for their timezone. This is a standard practice to avoid time change related problems for regions that experience daylight savings.

Ensure that the timezone for the Cisco switch is configured for usage with NTP, and the hardware clock ("system calendar") is configured for UTC as well.

I would almost guess that the Cisco IOS or its NTP server defaults or is configured for EST/EDT (New York, USA) by your problem description.

Using UTC as the timezone everywhere helps prevents issues like these, including consolidating log files with external agencies or ISPes in the event of a malicious user (hacker/cracker) attack.

Related Topic