linux - Ping status and return -


I am writing a Perl script which issues a ping to a specific IP address, in which a ping size of 65000 and Count 1000.

Now when the remote PC is up, things are fine. Ping succeeds and ends after sending 1000 px.

However, in case of failure, it always returns "destination host unavailable" . Ping Arp is trying for a long time before requesting / ping requests, with the end leaving the 100% PCT loss with the string.

My question is, the initial 100 pings do not respond automatically. I do not want to wait too long when the initial pings fail. I should get out of Ping How do I do this?

I am currently using Linux of my script. Please tell me that

  • Linux
  • How to do this for Windows <.

    The ping pkt changes. So I want a solution which is independent of size / count

    I recommend using the module Gives you the flexibility to control different pings from your script.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -