Automation Engine Script Guide > Ordered by Function > System Conditions and Settings > SYS_INFO

SYS_INFO

Script functionPre-defined run book template in the Automation Engine. One single step only, e.g. Start Windows Service, Copy file,…: Reads AE system information.

Automation Engine Version

Syntax

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

Syntax

Description/Format

componentA component is a single deployable application artifact. As an example, this can be yourfile.war to be deployed into a Tomcat container. Each component has different properties which determine where to get it from, how to configure it, etc. You will need one component per application artifact: e.g., one for the application tier and one for the database backend.

The component whose version should be retrieved.
Format: script literal or script variable

Allowed values: "SERVER" and "INITIALDATA"

VERSION

This keyword causes the Automation Engine version of the component to be retrieved.

Type

This specifies the part of the version that should be read.
Format: AE name, script variableA placeholder for a value within a script. or scriptA particular Automation Engine object type. literal

Allowed values:
"MAJOR" - major version
"MINOR" - minor version
"PATCH" - Service-Pack number
"RELEASE_IDENTIFIER" - Build type and number
"ALL" (default) - The complete version.

Component name

The name of the agentA program that enables the de-centralized execution of processes (such as deployments) on target systems (computers or business solutions) or a service that provides connectivity to a target system (such as for databases or middleware). An agent is also an object type in the Automation Engine. [Formerly called "Executor."] See also: host whose version should be retrieved.
Format: AE name, script variable or script literal


Return Codes

The Automation Engine version of the required component.

"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.

Comments

This script function retrieves the version of the Automation Engine, of an agent or of the AE databaseA database is an organized collection of data including relevant data structures.'s initial data. For detailed information about the structure of the versionsAn application version holds zero or more deployment packages and may have dependencies to zero or more application versions of the same (or to different) applications, see the chapter Automation Engine version Indicators.

To read the version of an agent, set the value "AGENT" in the parameter component and specify the agent's name in the parameter Component name.

A Automation Engine version is composed of various information (major version, minor version etc.). You can use the parameter Type if you want to read only a specific part of a version.

Examples

The following example reads the version of the Automation Engine:

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

The second example retrieves the version of the AE database's initial data.

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

  The third example reads the version of the agent WIN01:

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

The fourth example retrieves the individual parts of the Automation Engine's version such as the major version, minor version, service pack version, and the build number and writes it to the activation reportA report provides more detailed information about a task's execution or a component.. Finally, the complete version number is output.

: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#"

Example of an output in the activation report:

2013-05-07 16:16:52 - U0020408 Automation Engine - Major Version: 10
2013-05-07 16:16:52 - U0020408 Automation Engine - Minor Version: 0
2013-05-07 16:16:52 - U0020408 Automation Engine - Patch: 0
2013-05-07 16:16:52 - U0020408 Automation Engine - Build: -dev+build.954
2013-05-07 16:16:52 - U0020408 Automation Engine - Version: 10.0.0-dev+build.954


Workload

Syntax

SYS_INFO(MQPWP, BUSY, Period)
SYS_INFO
(Message queueA particular Automation Engine (AE) object type. In AE, a queue determines the maximum number of concurrent tasks, their priorities and the order in which tasks should be executed. In ARA, queues are containers for workflow executions that should be executed at a certain time one after another., COUNT)
SYS_INFO(Message queue, LENGTH, Period)

Syntax

Description/Format

Message queue

The message queue about which information should be retrieved.
Format: script literal or script variable

Allowed values: "MQPWP", "MQWP", "MQDWP", "MQOWP" and "MQRWP"

"MQPWP" - The message queue of the primary work processIt is responsible for the execution of Automation Engine-internal tasks and work processes..
"MQWP" - The message queue of work processes.
"MQDWP" - The message queue of dialog processes.
"MQOWP" - The message queue for outputs.
"MQRWP" - The message queue for resource calculations.

BUSY

Supplies the Automation Engine's workload in percent.

COUNT Supplies the number of queued messages.
LENGTH Supplies the average time it will take to process the message queue.
Period

The period that is used to calculate the workload or average processing time.
Format: script literal or script variable

Allowed values: "01", "10" and "60"

"01" - The last minute.
"10" - The last 10 minutes.
"60" - The last hour.


Return Codes

"20876" - The message queue does not exist.
"20864" - The second parameter is not valid.
"20877" - The period does not comply with the allowed values.

BUSY:
The Automation Engine's workload in percent.

COUNT:
The number of queued messages.

LENGTH:
The average time that it will take to process the message queue.

Comments

This script function retrieves data about message queues.

You can retrieve the Automation Engine's workload in percent by using the keyword BUSY, and also with the script functions SYS_BUSY_01, SYS_BUSY_10 and SYS_BUSY_60.

Examples

The first example retrieves the Automation Engine's workload within the last 10 minutes. A message is sent to a userIn the Automation Engine, a user is an instance of a User object, and generally the user is a specific person who works with Automic products. The User object is assigned a user ID and then a set of access rights to various parts of the Automation Engine system and product suite. These access rights come in the form of Automation Engine authorizations and privileges, Decision user roles and EventBase rights and ARA web application object rights. You can manage all these centrally in the ECC user management functions. See also, Unified user management. if 80% is exceeded.

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

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

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

The third example supplies the current processing time of the work processes' message queue during the last hour.

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

 

See also:

 


Automic Documentation - Tutorials - Automic Blog - Resources - Training & Services - Automic YouTube Channel - Download Center - Support

Copyright © 2016 Automic Software GmbH