SoftLayer Utility Network::isPingable

From SoftLayer Development Network Wiki

Jump to: navigation, search

isPingable is a member of the SoftLayer_Utility_Network service.

Contents

Overview

Send a single ICMP ping from SoftLayer's application servers to the given IP address or hostname and return whether or not the remote host was pingable. Pinging is a good way to determine if a particular host is alive on the Internet. A host that's unreachable to ping may not necessarily be down, as many providers employ filtering to deny ICMP traffic. Pinging a hostname instead of an IP address may fail if DNS lookup for that hostname also fails. isPingable() differs from ping() in that it returns whether an address was pingable while ping() retrieves the full results of the ping command.

Return Type

isPingable returns the boolean data type.

Headers

Required Headers

isPingable requires the following headers:

Parameters

isPingable takes the following parameters:

address

An IP address or hostname to ping.

  • Type: string

Error Handling

isPingable throws the following exceptions:

  • SoftLayer_Exception_Public
Throw the exception "Please provide an address to ping." if the address parameter is empty.
  • SoftLayer_Exception_Public
Throw the exception "Please provide a valid IP address or hostname." if the address parameter is not a valid IP address or hostname.

Associated Methods

External Links

Personal tools