A customer asked, how he can find the listener ports of his agents. The above script can be extended to show more information about agents by using other Agent Variables (see
here for a list). To see the ports, you e.g. use UC_EX_IP_PORT.
:read &AGENT_ONLINE_SWITH#,"'Y','N'",'Cover Agents currently online only?','N'
:p '---------------------------------------------------------'
:s &SYSNAME# = GET_UC_SYSTEM_NAME()
:s &AE_VERSION# = SYS_INFO(SERVER, VERSION, ALL)
:p 'Automation Engine Name;Version'
:p '&SYSNAME#;&AE_VERSION#'
:p '---------------------------------------------------------'
:if &AGENT_ONLINE_SWITH# = 'Y'
: p 'List of Agents currently online:'
:else
: p 'List of Agents definded:'
:endif
:p 'Agent Name;Agent Version;Is active;Type;Agent Port'
:p '---------------------------------------------------------'
:s &HND# = prep_process_var(UC_EX_HOSTCHAR)
:process &HND#
: s &AGENTNAME# = GET_PROCESS_LINE(&HND#, 1)
: s &AGENT_VERSION# = get_var(UC_EX_VERSION, &AGENTNAME#)
: s &AGENT_PORT# = get_var(UC_EX_IP_PORT, &AGENTNAME#)
: s &AGENT_SW# = get_var(UC_HOST_SW, &AGENTNAME#)
: if &AGENT_ONLINE_SWITH# = 'Y'
: s &AGENT_ONLINE# = SYS_HOST_ALIVE(&AGENTNAME#)
: if &AGENT_ONLINE# = 'Y'
: s &temp# = SYS_HOST_ALIVE(&AGENTNAME#)
: p '&AGENTNAME#;&AGENT_VERSION#;&temp#;&AGENT_SW#;&AGENT_PORT#'
: endif
: else
: s &temp# = SYS_HOST_ALIVE(&AGENTNAME#)
: p '&AGENTNAME#;&AGENT_VERSION#;&temp#;&AGENT_SW#;&AGENT_PORT#'
: endif
:endprocess
:close_process &HND#
:p '---------------------------------------------------------'