[ntp:questions] No libntp.so

Uwe Klein uwe_klein_habertwedt at t-online.de
Tue Aug 26 20:29:03 UTC 2008


Kay Hayen wrote:
> Hello NTP-World :-),
> 
> we are implementing a NTP supervision for our ATC middleware. Initially we are 
ATC as in air traffic control?

> doing it by repeated "ntpq" executions and textual evaluations of the 
> results. We have had to notice that pipes are very unsuited for the task, so 
> we really fork it and close its stdin to make it flush. It works, but it is 
> unconvincing in performance (latency).
 >
> It appears that the whole ntpq call is relatively slow when, when we do it on 
> e.g. RHEL 5.1 on modern Dual Core hardware, we get up to 25ms execution time, 
> which is very long for us.
First think about what ntpq has to do during startup. Then think again ;-)

On the piping issue:
Thats what ptys are for. You would have ntpq as a running process that can
be queried at any time.
You run into nonlinebuffering issues on stdin and stdout due to both
not being ttys.

And you seem to work through your jobs in a serial way? Use select().

> Obviously we hope you will allow us to be good Free Software citizens and let 
> us drop the fork down the road. Will you?

you may want to look around to how these people solved their probs:
	http://wiki.tcl.tk/15535

uwe





More information about the questions mailing list