Script Function: Reads current system settings.
GET_UC_SETTING(Setting, Component, Option)
Syntax |
Description/Format |
---|---|
Setting |
The system setting that should be read. Allowed values: WORKLOAD_ACTUAL_FT, WORKLOAD_ACTUAL_JOB, WORKLOAD_MAX_FT, WORKLOAD_MAX_JOB, SET_TRACE, SERVER_MODE, SERVER_OPTIONS WORKLOAD_ACTUAL_FT = The currently
used resources that 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 provides for file transfers. |
Component |
The 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. whose system setting should be read depending on the parameter Setting.
For WORKLOAD_ACTUAL_FT, WORKLOAD_ACTUAL_JOB, WORKLOAD_MAX_FT and WORKLOAD_MAX_JOB: The name of
the agent. |
Option |
The option or statusThis represents the condition of a task (such as active, blocked, generating). of the specified Queue objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task whose value should be read. You must only specify this parameter if the value of a Queue object should be read (Setting = QUEUE). Allowed values: ACTIVE_COUNT, CONSIDER_ERT, MAX_SLOTS, PRIORITY, STATE ACTIVE_COUNT = The number of the currently used 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. slots. |
Return codes |
---|
For WORKLOAD_ACTUAL_FT and WORKLOAD_ACTUAL_JOB: For WORKLOAD_MAX_FT and WORKLOAD_MAX_JOB: For SET_TRACE: For SERVER_MODE: For SERVER_OPTIONS: For QUEUE - ACTIVE_COUNT: For QUEUE - CONSIDER_ERT: For QUEUE - MAX_SLOTS: For QUEUE - PRIORITY: For QUEUE - STATE: |
You specify trace options in the System OverviewThe UserInterface window that contains information about the Automation Engine system.'s Server category. The script functionPre-defined run book template in the Automation Engine. One single step only, e.g. Start Windows Service, Copy file,… GET_UC_SETTING returns a 16-digit number where each number refers to one of the 16 available areas (such as TCP/IP).
The administrator can define the Server options in the variableIt stores or retrieves values dynamically at runtime. An individual Automation Engine object type. UC_SYSTEM_SETTINGS by using the SERVER_OPTIONS key. GET_UC_SETTING returns the complete string. To read a specific Server option, you can use the script elements MID, SUBSTR or STR_CUT.
GET_UC_SETTING causes all the script's open transactions to be written to the AE databaseA database is an organized collection of data including relevant data structures..
The following example retrieves the maximum number of resources that the agent WIN01 provides for jobs. The result is written to the activation protocol.
:SET &RET# = GET_UC_SETTING(WORKLOAD_MAX_JOB, "WIN01")
:PRINT &RET#
The second example reads the trace options of the AE system AEPROD.
:SET &RET# = GET_UC_SETTING(SET_TRACE, "AEPROD")
This example retrieves the type of the Server process AE#WP003.
:SET &RET# = GET_UC_SETTING(SERVER_MODE, "AE#WP003")
The following scripting lines read the third digit of the Server options. This setting defines whether the statistical records should be checked when the system is cold booted.
:SET &RET# = GET_UC_SETTING(SERVER_OPTIONS)
:SET &OPTION# = SUBSTR(&RET#,3,1)
The next example retrieves a Queue object's current status and writes it to the activation protocol.
:SET &RET# = GET_UC_SETTING(QUEUE,QUEUE.JOBS,STATE)
:IF &RET# = 0
: PRINT "QUEUE.JOBS - Status = GO"
:ELSE
: PRINT "QUEUE.JOBS - Status = STOP"
:ENDIF
The last example reads a Queue object's current slot maximum and writes it to the activation protocol.
:SET &RET# = GET_UC_SETTING(QUEUE,QUEUE.JOBS,MAX_SLOTS)
: PRINT "Queue QUEUE.JOBS - Max Slots: &RET#"
See also:
Script element | Description |
---|---|
Changes the system settings while the system is running. |
Script Elements - System Conditions and Settings
About Scripts
Script Elements - Alphabetical Listing
Script Elements - Ordered by Function
Automic Documentation - Tutorials - Automic Blog - Resources - Training & Services - Automic YouTube Channel - Download Center - Support |
Copyright © 2016 Automic Software GmbH |