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

:SET_UC_SETTING

Script Statement: Changes the system settings while the system is running.

Syntax

:SET_UC_SETTING Setting, Component, Value

Syntax

Description/Format

Setting 

System setting that should be changed.
Format: AE name, script literal or script variable

Allowed values: WORKLOAD_MAX, WORKLOAD_MAX_FT, WORKLOAD_MAX_JOB, SET_TRACE, SERVER_MODE

WORKLOAD_MAX = The maximum number of 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 and jobs.
WORKLOAD_MAX_FT = The maximum number of resources that the agent provides for file transfers.
WORKLOAD_MAX_JOB = The maximum number of resources that the agent provides for jobs.
SET_TRACE = The trace options for the work processes of an AE system or an agent.
SERVER_MODE = The type of the server processThe core of the component Automation Engine. Different types are available: communication, work and dialog processes, as well as nonstop processes..

Component 

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. for which the system setting should be changed.
Format: scriptA particular Automation Engine object type. literal, script variableA placeholder for a value within a script., AE name or script function

For WORKLOAD_MAX, WORKLOAD_MAX_FT and WORKLOAD_MAX_JOB: The name of an active agent or an agent groupAn agent group combines agents of the same platform. The agents that should be included in an agent group are specified by entering the agent name or via filters. A task that runs in an agent group is processed on one or all of the agent group's agents, depending on the specified mode. A particular Automation Engine object type. .
For SET_TRACE: The name of an AE system or an agent.
For SERVER_MODE: The name of the server process.

Value 

New value assignment for the system setting.
Format: script literal, script variable or script functionPre-defined run book template in the Automation Engine. One single step only, e.g. Start Windows Service, Copy file,…

For WORKLOAD_MAX, WORKLOAD_MAX_FT and WORKLOAD_MAX_JOB: Any value between -1 and 100000, or UNLIMITED.
 Note that values that are greater than 100000 are handled as UNLIMITED values.

For SET_TRACE: 16-digit trace options.
For SERVER_MODE: The Server type, allowed are the values "D" for switching to a dialog processA part of the Automation Engine component and a special form of work process. Is exclusively responsible for UserInterface messages. and "W" for switching to a work process.

Attention: You cannot change a work processA part of the component Automation Engine. It is responsible for an Automation Engine system's processes (see also 'Primary work process'). to a dialog process if it performs a Server role.

Comments

Currently, you can use the script statement :SET_UC_SETTING in order to change three system settings. Your modifications are valid until a new value is assigned or until the server processes or the agent are terminated.

 To change the system settings, you need the authorization "Modify at runtimeThe duration of a task's execution. It refers to the period between a task's start and end. It does not include its activation period (see also: activation and start)." and the privilege "Create diagnostic information".

This script statement has the effect that all the script's open transactions are written to the AE databaseA database is an organized collection of data including relevant data structures..

If you change trace options for WPs, you may change them only for all of them together. It is not possible to change them for individual WPs.

You should change the trace options for CPs one at a time.

Changing Trace Options

By setting trace options, you can use a script to log the behavior of work processes and agents in exceptional cases. Neither the work processes nor the agents need to be terminated for this purpose but setting trace options can result in a lot of data that is accumulated and performance losses can be a result thereof.
Automic recommends setting trace options only in close cooperation with our support team. 

To modify the trace options, you can use the Setting SET_TRACE. The Value is a 16-digit string. Each digit corresponds to a particular trace flag (such as the first position in a TCP/IP trace).
The order of the trace flags complies with the order that is used in the System OverviewThe UserInterface window that contains information about the Automation Engine system.'s properties dialog for server processes and agents.

If you reboot only one work process, it will use the trace options that are specified in the INI file. All other work processes use the values that are specified by using the script statement :SET_UC_SETTING until they are rebooted.

Examples

The first example sets the number of resources that the agent WIN01 provides for jobs and file transfers to 1000. The result is written to the activation reportA report provides more detailed information about a task's execution or a component..

:SET_UC_SETTING WORKLOAD_MAX, WIN01, 1000
:
SET &RET# = GET_UC_SETTING(WORKLOAD_MAX_JOB, WIN01)
:
PRINT &RET#

The second example retrieves the name of the AE system and then activates the TCP/IP trace for its work processes.

:SET &TRC# = GET_UC_SYSTEM_NAME()
:
SET_UC_SETTING SET_TRACE, &TRC#, "1000000000000000"

The following example changes the server process AE#WP003 to a dialog process provided that it is active.

:IF SYS_SERVER_ALIVE("AE#WP003") = "Y"
:   
SET_UC_SETTING "SERVER_MODE", "AE#WP003", "D"
:
ELSE
:   
SEND_MSG "ADMIN","AE","Work process AE#WP003 is not active!"
:
ENDIF

In this example the trace options for the agent WINAGENT01 are set with the noted values, those to be found in the agent's properties dialog in the System Overview:

:SET_UC_SETTINGSET_TRACE,"WINAGENT01","2400000000000000,MEMORY,128,SIMPLE,FileTransfer * ended abnormally."

 

See also:

Script element Description

GET_UC_SETTING

Reads current system settings.

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