Creating and configuring script profiles, Creating a script profile, Creating and configuring – Brocade Virtual ADX OpenScript Programmer’s Guide (Supporting ADX v03.1.00) User Manual
Page 24: Script profiles

16
Brocade Virtual ADX OpenScript Programmer’s Guide
53-1003244-01
Creating and configuring script profiles
3
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 Brocade Virtual ADX for
use by a script. Because the system memory used by a script is shared with all other services
provided by the Brocade Virtual 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 Brocade Virtual 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 Brocade Virtual ADX. Because this memory is shared with all other services
provided by the Brocade Virtual 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).
•
script restart limit: If a script is having problems during operation or it exceeds limitations set in
the profile (either default or configured) it will restart. This option can be configured to limit the
number of times that the script will be restarted. Once this limit is reached, the script will be
halted and not restarted. After exceeding this limit, the script can only be restarted by either
unbinding and rebinding the script or by restarting the Brocade Virtual ADX. By default there is
no limit to the number of script restarts.
•
script print output: By default the print function in a script is directed to print to the console
This option allows you to direct the script to print to either the console, the syslog or to disable
the script from printing.
Creating a script profile
The script profile must be named before you can define the script parameters and the name can
then be used to re-enter the profile configuration to change the settings for an existing profile You
can create a script profile or enter the configuration mode for an existing script profile as shown.
VirtualADX(config)# script-profile sp1
VirtualADX(config-script-profile-sp1)#
Syntax: [no] script profile profile-name