Technical data
Table Of Contents
ServerIron ADX OpenScript Guide 17
53-1002445-01
Creating and configuring script profiles
3
The script profile parameter directs the ServerIron ADX to apply the previously configured script
profile specified by the <script-profile-name> variable to the script being bound. If you do not
specify a script profile the default script profile values will be used. See “Creating and configuring
script profiles” on page 17.
Updating an existing script
You can update all running instances of a script with the contents a newly updated script of the
same name. The script update command allows you to refresh all instances of a script bound to
active servers, after the script has been edited. Running this command compiles the script,
unbinds the current instance and then binds the new version of the script. If the compile fails, the
update is not completed.
The update is performed as shown.
ServerIronADX(config)# script update sample.pl
Syntax: script update <script-name>
The <script_name> variable is the name of the script that you want to update all running instances
of.
Creating and configuring script profiles
A script profile sets the environmental variables for any script it is applied to. These variables
involve use of memory by the script and behavior during script operation. This is an optional
configuration, Where a script profile is not configured, the default values will take effect.
The environmental variables that can be set with a script profile and their default values are
described in the following:
• script memory limit: System memory is dynamically allocated from a ServerIron ADX for use by
a script. Because the system memory used by a script is shared with all other services
provided by the ServerIron ADX, excessive memory use by a script can impede system
operation. You can set a limit on the amount of system memory used by a script. Setting a limit
causes operation of a script to be halted if the limit set is exceeded. The default value is 1M
bytes (1,048,576 bytes).
• script memory high watermark: You can configure the ServerIron ADX to generate a syslog
message if the memory usage of a script exceeds a percentage that you configure. This serves
to inform you that a script is near the “script memory limit” before the script is halted. The
default value is 90%
• script timeout: Because scripts written for OpenScript are designed to be event-driven, they
make repeat runs until an event or threshold that is being monitored for occurs and a action is
implemented. If the first run through of a scrip takes too much time, it is an indication that the
script is not running properly. The script timeout sets a watchdog time in milliseconds that will
halt the script if is exceeded during the first run. The default value is 200 (milliseconds).
• script data collection limit: A script can be written for OpenScript that accumulates data for
specified events. This data is stored in system memory that is shared with all other services
provided by the ServerIron ADX. Because this memory is shared with all other services
provided by the ServerIron ADX, excessive memory used in a data collection script can impede
operation. If this limit is reached the script is restarted and memory used for data connection
is cleared. The default value is 100000 (100 Kbytes).










