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

How can I add a seperate action listener to all 14 of my buttons at once that can determine player turn?(java) -

Simple file compression in C -

php - Sorting an multidimension array using usort fails -