<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 17 March 2014 13:25, Mark Felder <span dir="ltr"><<a href="mailto:feld@feld.me" target="_blank">feld@feld.me</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

The real question is *how* ? How exactly do you check remotely if a UDP port is open? There is no state; there is no 3-way handshake. You will have to write code that speaks the protocol of the UDP service you're monitoring to prove it's there and listening/functioning.</blockquote>

</div><br>I think the OP is using the term "open" to mean "listening" (state=LISTEN).</div><div class="gmail_extra"><br></div><div class="gmail_extra">If you click on the word "port" on any page that lists hosts, it shows the column info, which in this case is something like "...shows the status of select tcp ports and connections that are expected to exist on the system."  So the original purpose was to detect TCP port states, and it seems that this is not too difficult because the TCP output from netstat is fairly consistent across different Unices.  But non-TCP ports seem to vary a lot more between Unices.  It would have been opening a can of worms to attempt to include all the different UDP formats, not to mention other types of sockets, so only TCP was included.  But I see no reason to include UDP sockets in the same port page as you have done, if the netstat output shows the same format as for TCP sockets.</div>

<div class="gmail_extra"><br></div><div class="gmail_extra">This is a neat trick.  On some of my servers where the number of half-open and half-closed sockets is interesting to me, I get Xymon to watch those states using the "TRACK" keyword, and I end up with alerts and graphs for all the different states.  It only works for TCP sockets of course, but I think I could extend it to track established UDP sockets also.  FreeBSD netstat output never seems to show a state, even for established connections, but I can match established connections (excluding listening connections) with "REMOTE=*.*".</div>

<div class="gmail_extra"><br></div><div class="gmail_extra">J</div><div class="gmail_extra"><br></div></div>