in reply to Re: Net::Ping not working
in thread Net::Ping not working

is there some substitute, different way? or am in stuck w/ backticks and/or system calls?

Replies are listed 'Best First'.
RE: RE: Re: Net::Ping not working
by tye (Sage) on Sep 12, 2000 at 03:39 UTC

    Well, you could install a decent operating system. Windows NT will let you do ICMP pings without having to be root. (: [ Sorry, I get sick of this kind of stupid and useless response when things work the other way. ]

    You can use a set-UID Perl script.

    You would probably have good luck "pinging" things that you know the destination provides. For example, "ping" port 80 of a webserver by asking for headers using LWP::Simple. "Ping" the telnet or SMTP or FTP port of servers that provide those services.

    If you don't have a firewall in the way, you can probably also do TCP "pings" to ports that don't provide a service. A "connection refused" error means that the site is up, heard you, and doesn't offer what you were asking for. Firewalls tend to be configured to remove this helpful stuff in favor of silence. :(

            - tye (but my friends call me "Tye")
      Using Win32 would not have helped him much Tye. Of his three targets, only www.perlmonks.org responds to a ping.
      unfortunately, it's not going to be easy to find that 'common ground' with the app i'm building. (basically, an interface to the host DBs we have, with validation to make sure that hosts exist, are up and running, and meet a few other criteria.)

      most hosts will be inside the firewall, but i have to build in the possibility that external hosts can be added. i'm also dealing with ~10 different types of hosts (routers, NT boxes, Solaris boxes, blah blah).

      your advice is a great idea; maybe a little more thought and i'd figure out a 'service' that's general enough. . . but i can't make any assumptions.