in reply to Ping and check for server running on port 27015

You will want to check out the Net::Ping module, it will be very useful.
  • Comment on Re: Ping and check for server running on port 27015

Replies are listed 'Best First'.
Re: Re: Ping and check for server running on port 27015
by Gibble (Novice) on Jan 23, 2001 at 21:25 UTC
    I looked at the module and it shows nothing about ports
      use IO::Socket then...
      Although you must be warned that ping isn't a PERFECT way to check if a server is up as some boxes are configured to ignore ICMP echo, and some routers even drop those packet...
      (try pinging www.microsoft.com for example)
      IMHO a tcp connect on a well known USED port (port 80 in the microsoft case...) is far better.

      In brief if you use IO::Socket, Net::Ping shouldn't be necessary...
        AFAIK there is more than one way to do a Ping (mmmm sounds familiar)... Anyway, you can also use TCP Ack packets and Syn packets to "Ping" but they dont really fall under ya good ole' Ping :)

        Greetz
        Beatnik
        ... Quidquid perl dictum sit, altum viditur.
      For pinging a particular TCP port you'll want to use something like IO::Socket::INET to make a connection to that port. The TCP option of Net::Ping has no port option and will only connect to the echo service/port.