SoftLayer Utility Network::ping
From SoftLayer Development Network Wiki
ping 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 the raw results of that command. The returned result is similar to the result received from running the command `ping -c 1` from a command shell. 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. Running ping on a hostname instead of an IP address may fail if DNS lookup for that hostname also fails.
Return Type
ping returns the string data type.
Headers
Required Headers
ping requires the following headers:
Parameters
ping takes the following parameters:
address
An IP address or hostname to ping.
- Type: string
Error Handling
ping 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
- SoftLayer_Utility_Network::isPingable
- SoftLayer_Utility_Network::traceroute
- SoftLayer_Utility_Network::nslookup
- SoftLayer_Utility_Network::whois

