|
|
| Jun 29, 2005 04:58:05 GMT |
|
Hi, I configured a system as a ntp client. It is necessary to execute the command "ntpdate <server>", or when I start xntpd it automatically synchronizes the time ? I want to do the synchronization slowly, not in one step, ¿How can do it? Regards |
|
| Note: If you are the author of this question and wish to assign points to any of the answers, please login first.For more information on assigning points ,click here |
| |
Sort Answers By: Date or Points |
|
 |
| Jun 29, 2005 06:04:54 GMT 7 pts |
|
ntpdate will do it "one shot". ntpd will slowly synchronize. ntpdate at service startup should be a good thing, cause if offset is too big, xntpd won't synchronize. Script to start xnptd on /sbin/init.d should usr ntpdate first. Regards, Fred |
|
| |
| Jun 29, 2005 06:20:03 GMT N/A: Question Author |
|
So, what is the procedure? - configure the ntp client - start xntpd in the client??
Does this synchronize slowly the time in the client?
Regards, |
|
| |
| Jun 29, 2005 10:32:00 GMT 7 pts |
|
Check first if time difference between client an server isn't to high (less equal 1h) then start xntpd on client and... wait! Try using ntpq -p on client system to check if client system is sycrnonized or still syncronizing. If system is syncronized you would see a leading "*" on line where client is syncronized root@leo [/] # ntpq -p remote refid st t when poll reach delay offset disp ================================================================== ============ ntp1.ien.it 0.0.0.0 16 - - 1024 0 0.00 0.000 16000.0 ntp2.ien.it 0.0.0.0 16 - - 1024 0 0.00 0.000 16000.0 *virgo.pippo ntp2.ien.it 2 u 23 64 377 0.53 -4.910 0.34 LOCAL(0) LOCAL(0) 10 l 14 64 377 0.00 0.000 10.01 +virgo.pippo ntp2.ien.it 2 u 11 64 377 0.43 -4.841 0.82 |
|
| |
| Jun 29, 2005 10:43:07 GMT 7 pts |
|
You need to make sure that in /etc/rc.config.d/netdaemons you have the XNTPD=1 setting. Must be set to 1 for NTP to run. Have the /etc/ntp.conf file modified to the settings for your environment. This can be as simple or as complex as need be. At the very least you should have 1 line that specifies the ntp server. Start the ntp daemon /sbin/init.d/xntpd start Check ntpq -p |
|
| |
| Jun 29, 2005 10:53:14 GMT 8 pts |
|
while ntpdate "ntp_server" does it right away, xntpd does it over the period of time. you can do ntpdate "ntp_server" if you do not have apps/program that very time dependant or can be shutdown for a while. Also xntpd will exit, if offset is too large to adjust for ntp. You can check it with ntpq -p "server" You can also use ntpdate -B command to adjust ot slowly. (this is turn uses time() call) Anil |
|
| |
| Jun 29, 2005 10:57:01 GMT 7 pts |
|
Hi ! COnfigure the NTP Client by modifying /etc/ntp.conf file. Ensure that you have set XNTPD=1 (/etc/rc.config.d/ntdamons) to start the deamon during system startup. When the system boots up, the command npdate get executed. If the offset is big, xntpd will take long time to synhronise. It is better to use ntpdate a this time. But before that ensure that you don't have any time sensiive critical applications, cron jobs etc.are running in the system. |
|
| |
| Jul 1, 2005 04:15:38 GMT 7 pts |
|
Once more in other words, `ntpdate` is there to set the time now. This is to be compared with setting the time with the `date` command. This actually sets the time, either by skipping or doubling time. This can cause cron-tab entries to not execute or execute double. `ntp`, `ntpd`, `xntpd` (or what name it has) is the deamon to keep the time in sync, if possible up to milisecond level. This drifts to the time by stretching or squeezing the timesteps. Every minute (maybe even every second) is stepped on only once. Most startup scripts (and even current xntpd implementations) start with a step as ntpdate does and then keep in sync by drifting. btw: see http://www.pool.ntp.org/ for general public clocks. |
|