Contents

Method

GetConnectionInformation

ModuleAgent
LibraryCore
Action

Returns Switch connection and Background Channel information.

Parameters(None)
Return values

Slot (int): The Switch slot number on the given Switch worker hosting the Agent connection.

SwitchConnectionTime (string): The UTC date and time that the Agent connected to the Switch. See notes.

SwitchId (int): The database identifier of the Switch instance to which the Agent is connected.

SwitchName (string): Hostname of the Switch to which the Agent is connected.

Worker (int): The Switch worker number hosting the Agent connection.

The following are available from v5.1

BGCCertThumbprint (string): Thumbprint of the certificate received from the Background Channel.

BGCConnected (string): Indicates whether the last Background Channel connection succeeded. 

BGCConnectionTime (string). The UTC date and time that the Agent last attempted a Background Channel connection.

ClientCertThumbprint (string): Thumbprint of the certificate sent to the Switch.

LocalIpAddress (string): Local IP address that the Agent is using to connect to the Switch. 

LocalPort (string): Local port that the Agent is using to connect to the Switch.

RemoteIpAddress (string): Remote IP address of the Switch.

RemotePort (string): Remote port of the Switch.

SwitchCertThumbprint (string) Thumbprint of the certificate received from the Switch.

SwitchClockSkewSeconds (int): The number of seconds ahead (negative if behind) of UTC time that this Agent is relative to the Switch based on most recent timestamp exchange (see notes). New in v8.1.

Example
 Agent.GetConnectionInformation();
Platforms
  • Windows
  • Linux
  • MacOS
  • Solaris Intel
  • Solaris Sparc
  • Android
Android does not have a client later than 5.0, so the new values are not yet available on Android.
Notes

If 1E Nomad is available, then the Tachyon Agent will not access the Background Channel directly and cannot report on that connection.

The device's clock skew relative to the Switch is determined each time it connects to the Switch, and when an acknowledged keep-alive packet is transferred (typically in the order of hours/days). You can therefore use the SwitchConnectionTime field returned by this method to determine an upper-bound to the age of this information. If the 1E Client has not yet connected to the Switch since it started, or is connected to an older version of the Switch which does not support timestamp negotiation, SwitchClockSkewSeconds will be NULL.

Return values are always strings. If you need to perform comparison or mathematical operations on numbers then you need to CAST the string.