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)

  1. HOST="server.domain.com"

  2. HOST="xxx.xxx.xxx.xxx"

The host name (i.e. server.domain.com) or IP address (i.e.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:
  • The sample AML code below can be copied and pasted directly into the Steps Panel of the Task Builder.
  • Parameters containing user credentials, files, file paths, and/or other information specific to the task must be customized before the sample code can run successfully.

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" />