SYS_INFO

Use the SYS_INFO script function to retrieve version information from the Automation Engine, or information about a message queue.

Version Information

The VERSION keyword lets you retrieve the version of the following:

  • Automation Engine
  • Agent
  • Initial data of the Automation Engine database

Syntax

SYS_INFO (component, VERSION, [ type ], [component name]

Parameters

  • SYS_INFO
    Retrieves system information from the AE

  • component
    Specifies which type of version information to retrieve
    Format: script literal or script variable
    Allowed values:

    • AGENT
      Retrieves version of an Agent
      Note: Specify the Agent name as the component name
    • SERVER
      Retrieves version information of the Automation Engine
    • INITIALDATA
      Retrieves version information of the initial data of the Automation Engine database

  • VERSION
    Keyword to retrieve version information

  • type
    (Optional) Specifies the part of the Automation Engine version to retrieve
    For more information, see Release Policy.
    Format: AE name, script variable or script literal
    Allowed values:

    • MAJOR
      Major version number
    • MINOR
      Minor version number
    • PATCH
      Service pack number
    • RELEASE_IDENTIFIER
      Build type and number
    • ALL (default)
      Complete version number

  • component name
    (Agent only) Name of the Agent whose version to retrieve
    Format: AE name, script variable or script literal

Return Codes

The script function has the following return codes when you use the VERSION keyword:

  • 20291
    The specified Agent could not be found
  • 20680
    There is an unknown value for this part of the version
  • 20863
    An invalid value has been used for the component
  • 20864
    The second parameter is not VERSION

Examples

The following example reads the version of the Automation Engine:

:SET  &VERSION# = SYS_INFO(SERVER, VERSION)

The following example retrieves the version of the AE database's initial data:

:SET  &VERSION# = SYS_INFO(INITIALDATA, VERSION)

  The following example reads the version of the Agent WIN01:

:SET  &VERSION# = SYS_INFO(AGENT, VERSION,,"WIN01")

The following example retrieves the parts of the Automation Engine version (major version, minor version, service pack version, and build number) as well as the complete version number, and writes them individually in the activation report:

:SET  &VERSION# = SYS_INFO(SERVER, VERSION,MAJOR)
:PRINT "Automation Engine - Major Version: &VERSION#"
:SET  &VERSION# = SYS_INFO(SERVER, VERSION,MINOR)
:PRINT "Automation Engine - Minor Version: &VERSION#"

:SET  &VERSION# = SYS_INFO(SERVER, VERSION,PATCH)
:PRINT "Automation Engine - Service Pack: &VERSION#"
:SET  &VERSION# = SYS_INFO(SERVER, VERSION,RELEASE_IDENTIFIER)
:PRINT "Automation Engine - Build: &VERSION#"
:SET  &VERSION# = SYS_INFO(SERVER, VERSION,ALL)
:PRINT "Automation Engine - Version: &VERSION#"

The output in the activation report would look like this:

2019-01-07 14:03:32 - U00020408 Automation Engine - Major Version: 12

2019-01-07 14:03:32 - U00020408 Automation Engine - Minor Version: 3

2019-01-07 14:03:32 - U00020408 Automation Engine - Service Pack: 0

2019-01-07 14:03:32 - U00020408 Automation Engine - Build: +low.build.20821

2019-01-07 14:03:32 - U00020408 Automation Engine - Version: 12.3.0+low.build.20821

Workload

Message queue parameters let you retrieve the following information:

  • Workload of the Automation Engine in percent
  • Number of queued messages
  • Average time to process a message queue

Syntax

SYS_INFO (MQPWP, BUSY, period)
SYS_INFO (message queue, COUNT)
SYS_INFO (message queue, LENGTH, period)

  • SYS_INFO
    Retrieves system information from the AE

  • message queue
    Specifies the message queue to retrieve information about
    Format: script literal or script variable
    Allowed values:

    • MQPWP
      Message queue of the primary work process
    • MQWP
      Message queue of work processes
    • MQDWP
      Message queue of dialog processes
    • MQOWP
      Message queue for output
    • MQRWP
      Message queue for resource calculations

  • BUSY
    Keyword to retrieve the workload of the Automation Engine in percent
    Tip: You can also use the following script functions to retrieve the workload percentage:

  • COUNT
    Keyword to retrieve the number of queued messages

  • LENGTH
    Keyword to retrieve the average length of time it takes to process the message queue

  • period
    Period of time used to calculate the workload or average processing time
    Format: script variable or script literal
    Allowed values:

    • 01
      Last minute
    • 10
      Last 10 minutes
    • 60
      Last hour

Return Codes

The script function returns the following values when you specify these keywords:

  • BUSY: the workload of the Automation Engine in percent
  • COUNT: the number of queued messages
  • LENGTH: the average time it takes to process the message queue in seconds
    Note: Under normal conditions, the average time is 0 as the message queue is processed immediately. For information on performance and tuning, see Automic Automation System Requirements and Sizing.

The script function has the following return codes when you use the message queue parameters:

  • 20876
    The specified message queue does not exist
  • 20864
    The second parameter is invalid
  • 20877
    The period does not comply with the allowed values

Examples

The following example retrieves the workload of the Automation Engine during the last 10 minutes. If the workload exceeds 80%, a message is sent to a user.

:IF SYS_INFO(MQPWP, BUSY, "10") > 80
:   
SEND_MSG SMITH,AE,"Workload of Automation Engine is above 80%"  
:
ENDIF

The following example reads the number of messages found in the dialog process queue.

:SET &NUMBER# = SYS_INFO(MQDWP, COUNT)

The following example returns the average processing time of the work process message queue during the last hour, and prints the value in the activation report.

:SET &DURATION# = SYS_INFO(MQWP, LENGTH, "60")

:PRINT "Current average processing time: &DURATION#"

Under normal conditions, this script would retrieve a value of 0, and write the following line in the activation report:

2019-01-08 13:10:01 - U00020408 Current average processing time: 0000000000000000

See also: