Restart NTP when a specific SIGNAL /MESSAGE is received

Restart NTP when a specific SIGNAL /MESSAGE is received

Post by ambresh » Fri, 05 Dec 2008 13:54:18


My question doesn't about restart during reboot.
I have machines M1,M2,N2,A3,B3. Where all have good accurate clocks.M1 is
source and
most accurate clock.
M1 stratum 1
M2, N2 stratum 2
A3,B3 Stratum 3
They are connected.
Problem here is ; i have to synchronize all machine to 1 millisecond
accuracy.
and The path they are connected is unreliable .
A optical wire is connected between machine and they are synchronize. Now ,
the wire is broken etc.
New wire is connected and a message is send. At this moment, i need to
restart the NTP (at M2...3)or
restart applicable on disconnected machine.
So what signal is handled by NTP when service stop/start/restart command is
given .
Kindly reply for answers and sugeestions.
Regards,
Ambresh
 
 
 

Restart NTP when a specific SIGNAL /MESSAGE is received

Post by David Wool » Sat, 06 Dec 2008 04:24:38


Expect it to take several hours to regain this accuracy, following any
significant disruption.



You need to ask Red Hat that; "service" is a Red Hat (and derivatives)
specific command. As far as I can tell, for 4.2.4p4, at least, the ntpd
distribution supplied scripts are totally obsolete and refer to the,
obsolete, xntpd, name.

However, I think the basic answer is that:

- start runs it without using any signals;
- stop uses SIGKILL, which is not caught;
- restart is a combination of stop and start (the, obsolete, supplied
script doesn't support restart).

It is questionable as to whether restart is useful, unless you have
changed the configuration file or DNS configuration.

You can use the NTP management protocol (as implemented by ntpq) to add
and delete servers, but not to do a total restart.

 
 
 

Restart NTP when a specific SIGNAL /MESSAGE is received

Post by Harlan Ste » Sat, 06 Dec 2008 04:45:34

>>> In article < XXXX@XXXXX.COM >, XXXX@XXXXX.COM (Ambresh Ranjan) writes:

Ambresh> A optical wire is connected between machine and they are
Ambresh> synchronize. Now , the wire is broken etc. New wire is connected
Ambresh> and a message is send. At this moment, i need to restart the NTP
Ambresh> (at M2...3)or restart applicable on disconnected machine.

There may be no need to restart ntpd.

You might be able to do it with ifup/ifdown scripts - when the network state
changes use that "event" to reconfigure ntpd. If that is too difficult, use
the scripts to restart ntpd.

And I'm not sure why this matters - ntpd already has code in it to detect
when the IP address changes (which may not be enough for you), and even so,
how often are your network cables being "broken" and for how long are they
broken?

You might be able to solve this in your network with the 'burst' and/or
'maxpoll' keywords.
--
Harlan Stenn < XXXX@XXXXX.COM >
http://www.yqcomputer.com/ - be a member!
 
 
 

Restart NTP when a specific SIGNAL /MESSAGE is received

Post by Unru » Sat, 06 Dec 2008 06:56:47

David Woolley < XXXX@XXXXX.COM > writes:








mandriva also uses the "service" call. And on Mandriva 2008.1,
/etc/init.d/ntpd uses ntpd, not xntpd.




It may well start ntpd with various flags depending on the arguments to the
script.


I think you need to specify the version of Redhat you are talking about.
 
 
 

Restart NTP when a specific SIGNAL /MESSAGE is received

Post by David Wool » Sat, 06 Dec 2008 07:26:25


Quite probably, but ntp-4.2.4p4/scripts/rc1/xntpd uses xntpd. Note that
I was careful to say I was talking about the nptd distribution. The
point was that any working start up script that supports ntpd is
supported by an OS vendor, not by the ntpd support channels.


I wasn't specifying any version of Red Hat, I was describing what comes
with the ntpd sources.