Skip to main content

Adding a TCP Status Service

Adding a TCP Status Service

The EnsLib.TCP.StatusServiceOpens in a new tab class parses an incoming text string to determine what type of production status information is being requested, and then produces a reply string suitable for writing out to the console screen. A user can interact with the status service directly, or write a command script that contacts the status service, issues commands, and writes the replies to a text file for later analysis.

A developer enables interactions via the status service as follows:

  1. Add an instance of EnsLib.TCP.StatusServiceOpens in a new tab to the production.

  2. Configure the instance of EnsLib.TCP.StatusServiceOpens in a new tab to accept communications via a particular TCP port. Set a Port number and a list of Allowed IP Addresses from which to accept connections. These are only two of the several settings that are available to configure the TCP text line inbound adapter associated with the status service. For details, see Reference for Settings.

Once you have completed these steps, any time the status service is enabled and running, a user or command-line script can initiate a Telnet connection to the configured Port and send commands to the status service. Each command must be a text string that ends with the newline character (ASCII 10). The reply strings will also terminate with a newline.

The following table describes the supported command lines and the contents of the text string returned in each case.

Command Line Text String Returned
build The full name of the InterSystems IRIS software version.
configitemstatus name

When you enter this command with the configured name of any business host in the currently running production, the status service returns a string that expresses the current state of that business host.

A host that has currently running jobs, or active connections, records those activities in the returned string. If the identified host is not a member of the currently running production, the returned string indicates this.

exit No string is returned. This command disconnects from the status service. You may enter x instead of exit
localstarttime If InterSystems IRIS is running, this returns the start time of the currently running production, expressed in local time coordinates. Otherwise, it returns a string with the message <UNDEFINED>
localtime The current time, in local time coordinates.
namespace The interoperability-enabled namespace where the currently running production resides.
production The configured name of the currently running production.
quit No string is returned. This command disconnects from the status service. You may enter q instead of quit
utcstarttime If InterSystems IRIS is running, this returns the start time of the currently running production, is expressed in universal time coordinates (UTC). Otherwise, it returns a string with the message <UNDEFINED>
utctime The current time, in universal time coordinates (UTC).
version The abbreviated name of the InterSystems IRIS software version, for example 2018.1.0.514/2171
x Same as exit
FeedbackOpens in a new tab