Network - Ping

Declaration

<AMNETWORK ACTIVITY="send" HOST="text" TIMEOUT="number" MEASURE="text (options)" RESULTVARIABLE="text" IPADDRESSVARIABLE="text" />

Related Topics  

Description

Sends a "ping" request to a computer. Ping is used to test server response times on a TCP/IP network.

Practical usage

Used to check response times of servers connected to the Internet or private TCP/IP network. If the computer does not respond within the time specified, this step generates an error.

Parameters

General

Property Type Required Default Markup Description
Hostname or IP Text or Number Yes (Empty)
  • HOST="server.domain.com"
  • HOST="xxx.xxx.xxx.xxx"
The hostname (for example, server.domain.com) or IP address (for example, 555.555.555.555) that should be "pinged."
Time to wait Number No 10 TIMEOUT="2" The length of time this step should wait for a response from the server being "pinged" before generating an error. This value is used along with the Measure parameter.
Measure Text (options) No seconds MEASURE="minutes" The time measure to use along with the Time to wait parameter. The available options are:
  • Milliseconds - Wait time will be measured in milliseconds.
  • Seconds (default) - Wait time will be measured in seconds.
  • Minutes - Wait time will be measured in minutes.
  • Hours - Wait time will be measured in hours.
Populate variable with relay time (milliseconds) Text No (Empty) RESULTVARIABLE="theRelayTime" The name of an existing variable to populate with the total relay time (in milliseconds).
Populate variable with IP address Text No (Empty) IPADDRESSVARIABLE="theIP" The name of an existing variable to populate with the "pinged" IP address.

Description

Error Causes

On Error

Example

NOTE:
  • Copy and paste the sample AML code below directly into the Task Builder Steps Panel.
  • To successfully run the sample code, update parameters containing user credentials, files, file paths, or other information specific to the task to match your environment.

Description

This sample task pings an IP address, populates a variable with the relay time, populates another variable with the IP address, and then the ping times out after 2 minutes.

Copy
<AMVARIABLE NAME="theRelayTime" VALUE="" />
<AMVARIABLE NAME="theIP" VALUE="" />
<AMNETWORK ACTIVITY="send" HOST="123.456.789.123" TIMEOUT="2" MEASURE="minutes" RESULTVARIABLE="theRelayTime" IPADDRESSVARIABLE="theIP" />