Re: [CentOS] Why the command 'service ntpd stop' cause the time reversed?

2015-02-12 Thread John R Pierce
On 2/12/2015 12:27 AM, David chen wrote: i have added a new line "server 192.168.0.191" into file "/etc/ntp.conf" on ntpd client machines, and the output to execute command ntpstat is as follows: synchronised to NTP server (192.168.0.191) at stratum 3 time correct to within 80 ms polling

Re: [CentOS] Why the command 'service ntpd stop' cause the time reversed?

2015-02-12 Thread David chen
Hi guys, I don't use virtual machine. The 192.168.0.191 is an internal ntpd server configured by administrator, so i can not see what ntp server it synchronizes to or what is its time reference. But i have added a new line "server 192.168.0.191" into file "/etc/ntp.conf" on ntpd client machines

Re: [CentOS] Why the command 'service ntpd stop' cause the time reversed?

2015-02-12 Thread Andrew Holway
> I've seen situations where people have put ntpdate in a cronjob to get > around issues with big time jumps at boot or dodgy clocks under > virtualization. There are much better solutions to this problem, so > let us know if this is the case for you. > put "tinker panic 0" in your ntp.conf. This

Re: [CentOS] Why the command 'service ntpd stop' cause the time reversed?

2015-02-11 Thread John R Pierce
On 2/11/2015 11:47 PM, Kahlil Hodgson wrote: I've seen situations where people have put ntpdate in a cronjob to get around issues with big time jumps at boot or dodgy clocks under virtualization. There are much better solutions to this problem, so let us know if this is the case for you. NOT co

Re: [CentOS] Why the command 'service ntpd stop' cause the time reversed?

2015-02-11 Thread Kahlil Hodgson
I've seen situations where people have put ntpdate in a cronjob to get around issues with big time jumps at boot or dodgy clocks under virtualization. There are much better solutions to this problem, so let us know if this is the case for you. K ___ Cent

Re: [CentOS] Why the command 'service ntpd stop' cause the time reversed?

2015-02-11 Thread John R Pierce
On 2/11/2015 11:12 PM, David chen wrote: Hi guys, Thanks for your reply. I originally used the following command to synchronize time: ntpdate 192.168.0.191 but got the error: ntpdate[16715]: the NTP socket is in use, exiting So i used the way of stopping ntpd service. Now I have known that using

Re: [CentOS] Why the command 'service ntpd stop' cause the time reversed?

2015-02-11 Thread David chen
Hi guys, Thanks for your reply. I originally used the following command to synchronize time: ntpdate 192.168.0.191 but got the error: ntpdate[16715]: the NTP socket is in use, exiting So i used the way of stopping ntpd service. Now I have known that using command "ntpdate -u 192.168.0.191" can solv

Re: [CentOS] Why the command 'service ntpd stop' cause the time reversed?

2015-02-11 Thread Peter Lawler
On 12/02/15 12:53, David chen wrote: > but why the second line timestamp(13:59:59) is less than the first > line's(14:00:01)? Total guess here, but I suspect what's happening is that the ntp server on your LAN that this client is getting the time from in the hardcoded 'ntpdate' command is about

Re: [CentOS] Why the command 'service ntpd stop' cause the time reversed?

2015-02-11 Thread Jonathan Billings
> On Feb 11, 2015, at 8:53 PM, David chen wrote: > > The script should be executed at 14:00, the first line of the fragment also > should indicate that the command 'service ntpd stop' have executed > successfully, but why the second line timestamp(13:59:59) is less than the > first line's(14:

Re: [CentOS] Why the command 'service ntpd stop' cause the time reversed?

2015-02-11 Thread John R Pierce
On 2/11/2015 5:53 PM, David chen wrote: A shell script is deployed to synchronize time, the script is invoked hourly by crontab, and its content is as follows: #!/bin/bash service ntpd stop ntpdate 192.168.0.191 #it's a valid ntpd server in LAN service ntpd start chkconfig ntpd on huh? ntp

[CentOS] Why the command 'service ntpd stop' cause the time reversed?

2015-02-11 Thread David chen
A shell script is deployed to synchronize time, the script is invoked hourly by crontab, and its content is as follows: #!/bin/bash service ntpd stop ntpdate 192.168.0.191 #it's a valid ntpd server in LAN service ntpd start chkconfig ntpd on Inspected the Linux log(Centos6.4 /var/log/messages),