ScriptEigener Objekttyp in der Automation Engine 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. Allowed values: WORKLOAD_MAX, WORKLOAD_MAX_FT, WORKLOAD_MAX_JOB, SET_TRACE, SERVER_MODE WORKLOAD_MAX = The maximum number of resources that the agent provides for file transfers and jobs. |
Component |
component for which the system setting should be changed. For WORKLOAD_MAX, WORKLOAD_MAX_FT and WORKLOAD_MAX_JOB: The name of an active agent or an agent group. |
Value |
New value assignment for the system setting. For WORKLOAD_MAX, WORKLOAD_MAX_FT and WORKLOAD_MAX_JOB: Any value between -1 and 100000, or UNLIMITED. For SET_TRACE: 16-digit trace options. Attention: You cannot change a 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 runtime" and the privilege "Create diagnostic information".
This script statement has the effect that all the script's open transactions are written to the AE database.
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 Overview'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 report.
: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_SETTING SET_TRACE, "WINAGENT01", "2400000000000000,MEMORY,128,SIMPLE,FileTransferÜberträgt Dateien zwischen zwei Rechnern. Auch ein eigener Objekttyp in der Automation Engine. * ended abnormally."
See also:
Script element | Description |
---|---|
Reads current system settings. |
Script Elements - System Conditions and Settings
About Scripts
Script Elements - Alphabetical Listing
Script Elements - Ordered by Function