![]() ![]() Note that a live remote host may still fail to be pingable by one or more of these protocols. You may choose one of six different protocols to use for the ping. A ping object is first created with optional parameters, a variable number of hosts may be pinged multiple times and then the connection is closed. This module contains methods to test the reachability of remote hosts on a network. Print "$host is alive.\n" if pingecho($host) #DESCRIPTION Printf("$host is alive (packet return time: %.2f ms)\n", # High precision syntax (requires Time::HiRes) Print "HOST: $host ACKed in $rtt seconds.\n" ![]() $p->port_number(getservbyname("http", "tcp")) Print "$host not reachable ", scalar(localtime()), "\n" $p->port_number(scalar(getservbyname("http", "tcp"))) # Try connecting to the www port instead of the echo port Print "$ip is alive.\n" if $p->ping($ip) $p->bind($my_addr) # Specify source interface of pings Print "$host is alive.\n" if $p->ping($host) Net::Ping - check a remote host for reachability #SYNOPSIS use Net::Ping ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |