monit-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] NTP protocol test


From: Jan-Henrik Haukeland
Subject: Re: [PATCH] NTP protocol test
Date: Tue, 25 Jan 2005 11:38:47 +0100


On Jan 21, 2005, at 11:44, Michel Marti wrote:

Attached is a patch that adds simple NTP protocol testing. I've tested this against pool.ntp.org.

It also contains a fix in protocol.c:create_generic() - this function was operating on myrsync instead of mygeneric.

Oops... ugly.

I added a new flag to the Protocol_T structure that will be used to determine if socket_is_ready(...) must be called. I added this since I wanted to prevent monit from sending a single byte to the NTP server before check_ntp is called.

What do you think?

I think this is a fine patch. However, and this has nothing to do with your path, but we should really do something with the implementation of check_udp_socket(). Today, the way we test an udp server is to send it one byte, which is bad, and the reason you had to add the workaround for socket_is_ready(). What we should do is to send an empty SYN packet and check for an ACK from the server. This means that to test a UDP server monit must run as root, since we have to use a raw socket. Same is it is today for icmp ping tests. This shouldn't be a problem?

If you or any one on the list would like to give it a stab and fix check_udp_socket() it would be highly appreciated.

--
Jan-Henrik Haukeland
mobile +47 97141255





reply via email to

[Prev in Thread] Current Thread [Next in Thread]