1

I run Cent os 6 64 bit on linode.

server (incorrect):

date Thu Aug 29 11:41:00 BST 2013

client (correct):

date Thu Aug 29 11:37:25 BST 2013

As you can see the server clock is in the future.

so far I have ensured the server is running at GMT time, by doing

sudo ln -s /usr/share/zoneinfo/Europe/London /etc/localtime

but no joy, and by installing NPT, which is suggested by Linode.

215 seconds seems like its not a GMT time issue, as I would expect that to be likes of multiples of 1 hour in future/past.

Any tips?

3
  • 4
    Installing ntp is not enough, you need to configure and start ntpd or just use ntpdate pool.ntp.org for a one-time clock sync
    – Kdecherf
    Aug 29, 2013 at 10:47
  • thanks, I did ntpdate pool.ntp.org and that solved! if you post an answer I shall accept. Aug 29, 2013 at 10:54
  • ntpdate is useful for a one-time update but the answer of @dsumsky is better in your case
    – Kdecherf
    Aug 29, 2013 at 11:01

2 Answers 2

3

I would either verify that the server time is synchronized with XEN host

echo 0 > /proc/sys/xen/independent_wallclock

or I would disable this method and configure standalone time synchronisation via NTP

echo 1 > /proc/sys/xen/independent_wallclock

yum install ntp
service ntpd start
chkconfig ntpd on

Put this line to /etc/sysctl.conf to make wallclock independent persistent

xen.independent_wallclock = 0
1
  • 1
    Tip: a clock sync is not instant with ntpd, it will sync smoothly. You can use ntpdate before starting ntpd if you need a first "direct" sync
    – Kdecherf
    Aug 29, 2013 at 11:04
0

to check server time

# date

check connectivity to sync servers and look for the time difference:

# ntpdate -q 0.rhel.pool.ntp.org

synchronize time manually with servers:

# ntpdate 0.rhel.pool.ntp.org 1.rhel.pool.ntp.org

if you want to check system time on boot:

# chkconfig ntpdate on

more info:
https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/sect-Date_and_Time_Configuration-Command_Line_Configuration-Network_Time_Protocol.html

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .