Faster way than ping for checking if computer online?

Sending a single packet and waiting for a response is going to be one of the fastest possible ways, and ping is a fine way to do that. In fact, depending on your use case, I'd argue that it's too fast, since it doesn't really tell you if the system is actually doing anything useful, just that the kernel's network subsystem is alive and configured.

But assuming that's good enough, you can make some improvements. First, you could use -W1 to decrease the ping timeout to one second. Second, you could make your script ping the different hosts asynchronously (in a background thread), and check the results as needed rather than waiting.

Alternately, you can re-think the approach and have the remote systems check in somehow when they're up, and if a system hasn't checked in, you can assume it's down.


This is what fping was designed for. http://fping.sourceforge.net/

You need to parse the output afterwards instead of relying on a return code, but it is much faster than doing normal ping.


This would only work for one or two computers, but if you connect them directly to the computer responsible for checking their status, you can use ethtool to see if the link is active or not.