Ping
Verb: ping
Available from: <Enterprise>
Sends a message to a computer and returns if it is reachable over the network.
Syntax
ping --host(String) [--timeout(TimeSpan)] (Boolean)=value
Inputs
Script | Designer | Required | AcceptedTypes | Description |
---|---|---|---|---|
--host | Destination | Required | Text | IP address of the computer/server to which the ping is sent, with the purpose of verifying whether it receives a response. |
--timeout | Timeout | Optional | Time Span, Number, Text | Timeout for command action.
In case no value is defined for the timeout parameter, the execution uses the context timeout defined by the Set Timeout command. If that command is not used on the script, the default timeout is 5 seconds. |
Outputs
Script | Designer | AcceptedTypes | Description |
---|---|---|---|
value | Success | Boolean | Returns "True" if the reply message was received, or "False" if it was not. |
Example
The Ping command sends a message to the site "www.ibm.com" and returns if a response was obtained.
defVar --name success --type Boolean
ping --host "www.ibm.com" success=value
logMessage --message "${success}" --type "Info"