Start a process to run the real ping command from the OS
current did not specify the timeout.
This is slower due to creating process for each request that limits the concurrency.
Suggest maximum concurrency less than 400.
if not adjust your ulimit. Only use this when you do not run as Root.
public static final PingMode INET_ADDRESS_REACHABLE_NEED_ROOT
The inet address reachable. please only use in linux model with Root privilege.
This is the way faster approach.
This normally needs ROOT privilege to really use ICMP protocol.
Test whether that address is reachable.
Best effort is made by the implementation to try to reach the host,
but firewalls and server configuration may block requests resulting in a unreachable status
while some specific ports may be accessible.
A typical implementation will use ICMP ECHO REQUESTs if the privilege can be obtained,
otherwise it will try to establish a TCP connection on port 7 (Echo) of the destination host.
Returns an array containing the constants of this enum type, in
the order they are declared. This method may be used to iterate
over the constants as follows:
for (PingMode c : PingMode.values())
an array containing the constants of this enum type, in the order they are declared
public static PingMode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this type. (Extraneous whitespace characters are
name - the name of the enum constant to be returned.
the enum constant with the specified name
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null