LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-05-2008, 10:41 AM   #1
helptonewbie
Member
 
Registered: Aug 2006
Location: England Somewhere
Distribution: Mandriva, PCLinuxOS, Karoshi, Suse, Redhat, Ubuntu
Posts: 518

Rep: Reputation: 39
Strange Problem with the Clock


Hi All,
I Have ntp set-up on SLES10 which is working fine, but strange problem i've not come across with clock syncs before.

in Shell type:-
SERVER # date
Fri Dec 5 16:32:55 GMT 2008

SERVER # hwclock
Thu Jul 22 19:54:21 2010 -0.000407 seconds

Then if i 'cat' my firewall entries... I've got iptables logging to a file. I force a filter that triggers iptables to log an occurrence and the time for that occurrence is also completely different.
Dec 5 10:27:42

(Baring in mind all these are done within a few seconds of each other..)

What could be up? The output of 'date' is as it should be, the date and time settings are set to UTC and i've set the GMT time Saving as i want it (to London Greenwich). iptables looks to be just getting the wrong daylight time somehow and hwclock... well i haven't re-booted the server PLUS i haven't forced the clock to sync to hardware clock yet but i can. Perhaps that is the problem?

Cheers,
MJ
 
Old 12-05-2008, 12:46 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,615

Rep: Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962
Quote:
Originally Posted by helptonewbie View Post
Hi All,
I Have ntp set-up on SLES10 which is working fine, but strange problem i've not come across with clock syncs before.

What could be up? The output of 'date' is as it should be, the date and time settings are set to UTC and i've set the GMT time Saving as i want it (to London Greenwich). iptables looks to be just getting the wrong daylight time somehow and hwclock... well i haven't re-booted the server PLUS i haven't forced the clock to sync to hardware clock yet but i can. Perhaps that is the problem?
That's what I'd suggest first, is to sync the hardware clock to your system clock.

Also, is this a VM machine by any chance? There is a known problem with VMware linux guests that causes the system clock to skew. A kernel patch is required to fix that. Or, if you have to stay in production you can just have a small CRON job to run "ntpdate" against your time server every five minutes...
 
Old 12-05-2008, 12:55 PM   #3
helptonewbie
Member
 
Registered: Aug 2006
Location: England Somewhere
Distribution: Mandriva, PCLinuxOS, Karoshi, Suse, Redhat, Ubuntu
Posts: 518

Original Poster
Rep: Reputation: 39
Thanks for the info Tbone, i did already go ahead and run that sync which of course would update the harware clock as expected. However no change at all occurred to the time that i saw with iptables logs... Very strange, does sugest some kind of daylight saving issue but damned if i know why thats playing about. Another server exactly the same is working fine.

No not a VMware server... but i didn't know of that issue as i do use VMs and not come across that issue yet... thanks for the heads up on that, i will look into it just in case. OR i have come across it before and it was nothing that ntp couldn't fix for me... anyway i'll double check that.

Ant ideas on the iptables problem would be great.

Thanks
MJ
 
Old 12-05-2008, 07:22 PM   #4
ozminh
Member
 
Registered: Aug 2007
Posts: 73

Rep: Reputation: 19
try this
hwclock -w or hwclock --systohc
hwclock -s or hwclock --hctosys
 
Old 12-06-2008, 05:02 AM   #5
helptonewbie
Member
 
Registered: Aug 2006
Location: England Somewhere
Distribution: Mandriva, PCLinuxOS, Karoshi, Suse, Redhat, Ubuntu
Posts: 518

Original Poster
Rep: Reputation: 39
Thanks for the reply... i gave it a go but nothing changed... Its out by exactly 6 hours which is why it must be something to do with daylight savings and unlikely to be down to skew. I mean its iptables logs i see that the time is out... looking at something like /var/log/messages i can see the correct time for new log entries. So it may just be iptables specifically but still i don't understand why

Cheers,
MJ

Last edited by helptonewbie; 12-06-2008 at 05:06 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Crash causes clock to akt strange (runs backwards) kvtournh Linux - Hardware 1 03-29-2007 08:20 AM
Very strange clock problem dinolinux Linux - Software 3 02-07-2007 04:43 PM
strange problem with clock amimusa Linux - Hardware 3 11-07-2006 04:15 PM
clock applet suddenly in strange language?? kristof_v Linux - Software 1 03-06-2006 03:49 AM
strange, strange alsa problem: sound is grainy/pixellated? fenderman11111 Linux - Software 1 11-01-2004 05:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration