[ALUG] What's a fast way to check for something on LAN?

Brett Parker iDunno at sommitrealweird.co.uk
Wed Feb 22 16:42:09 GMT 2017

On 22 Feb 13:50, Chris Green wrote:
> I want a fast (as in less than a second, not 'computer fast') way of
> checking if a particular private IP is present on the LAN.  

Now, assuming that your network interface has to come up first, and that
it won't randomly change location between, there'll be a call to
/etc/network/if-up.d/blah once the interface is up... So, the *obvious*
thing to do, is do the test in there, and then cache the result, use
that cached result for your test and your test is then sub 1 second.

Not exactly rocket science. It's an obvious case for only check on
connection to a network.

Brett Parker

More information about the main mailing list