SYS_INFO
Use the SYS_INFO script function to retrieve version information from the Automation Engine, or information about a message queue.
Version Information
Use the VERSION keyword to retrieve the version of the Automation Engine, an agent, or the initial data of the Automation Engine database.
Syntax
SYS_INFO (component, VERSION [, type] [, component name])
Parameters
| Parameter | Description | Format | Allowed Values | Default Value |
|---|---|---|---|---|
| component | Specifies which component's version to retrieve | Script literal or script variable |
|
n.a. |
| VERSION | Fixed keyword to retrieve version information | n.a. | n.a. | n.a. |
| type
(Optional) |
Specifies which part of the version to retrieve. For more information, see Release Policy for Automic Automation. | AE name, script variable, or script literal |
|
ALL |
| component name
(Optional, AGENT only) |
Name of the agent whose version to retrieve | AE name, script variable, or script literal | n.a. | n.a. |
Return Codes
| Return Value | Condition |
|---|---|
| 20291 | The specified agent could not be found |
| 20680 | Unknown value for the requested version part |
| 20863 | Invalid value used for the component |
| 20864 | The second parameter is not VERSION |
Examples
The following example retrieves 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 retrieves the version of agent WIN01.
: SET &VERSION# = SYS_INFO (AGENT, VERSION,,"WIN01")
The following example retrieves each part of the Automation Engine version separately and writes the results to 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 activation report output looks 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
Use message queue parameters to retrieve the workload of the Automation Engine in percent, the number of queued messages, or the average time to process a message queue.
Syntax
SYS_INFO (MQPWP, BUSY, period)
SYS_INFO (message queue, COUNT)
SYS_INFO (message queue, LENGTH, period)
Parameters
| Parameter | Description | Format | Allowed Values |
|---|---|---|---|
| message queue | The message queue to retrieve information about | Script literal or script variable |
|
| BUSY |
Keyword to retrieve the workload of the Automation Engine in percent. |
n.a. | n.a. |
| COUNT | Keyword to retrieve the number of queued messages | n.a. | n.a. |
| LENGTH | Keyword to retrieve the average time in seconds to process the message queue. Note: Under normal conditions the average time is 0, as the message queue is processed immediately. For more information, see Automic Automation System Requirements and Sizing. |
n.a. | n.a. |
| period | Time period used to calculate the workload or average processing time | Script variable or script literal |
|
Return Codes
| Return Value | Condition |
|---|---|
| Number | BUSY: workload in percent; COUNT: number of queued messages; LENGTH: average processing time in seconds |
| 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 checks the workload of the Automation Engine during the last 10 minutes. If it 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 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 result to the activation report.
: SET &DURATION# = SYS_INFO (MQWP, LENGTH, "60")
: PRINT "Current average processing time: &DURATION#"
Under normal conditions the result would be 0, producing the following activation report output:
2019-01-08 13:10:01 - U00020408 Current average processing time: 0000000000000000
See also: