Technical data
Table Of Contents

16 ServerIron ADX OpenScript Guide
53-1002445-01
Compiling and binding scripts
3
Compiling a script and obtaining output from the performance
estimator
You can compile a script as a single independent operation through the script compile command.
Running this command insures that the compile will be successful and displays the results of the
performance estimator.The following example compiles the “slb.pl” script and runs the
performance estimator on it.
ServerIronADX(config)# script compile slb.pl
Performance for this script:
- Approximately <123> connections/second at 10% CPU utilization
- Approximately <1234> connections/second at 50% CPU utilization
- Approximately <12345> connections/second at 100% CPU utilization
NOTE
Script compile can only be performed in general config mode.
Syntax: script compile <script-name>
The <script_name> variable is the name of the script that you want to compile.
This compile operation performs language checks on the supplied script. If errors are encountered,
they are displayed on the console. A successful compile operation qualifies a script as ready-to-run
and it can the be bound to a virtual server port.
Performance estimator
As you can see in the example of the script compile slb.pl command above, a script performance
estimate is provided for running the script on a ServerIron ADX. This is done to provide guidance
concerning operation of the script, This performance estimate is provided in
connections-per-second. It is printed out as part of the output of the script compile command for
three CPU usage scenarios: 10%, 50% and 100% CPU utilization,
NOTE
The result is estimated given a simple traffic pattern, the real number may vary from this estimate.
Binding a script to a virtual server port
The script binding operation compiles the script unconditionally and then enables it for packet
processing on a specified server port or service.
The update is performed as shown.
ServerIronADX(config)# server virtual-name-or-ip vs1 100.1.5.101
ServerIronADX(config-vs-vs1)# port http script sample.pl script-profile sp1
Syntax: [no] port <port-num-or-service> script <script-name> [ script profile <script-profile-name>
]
The <port-num-or-service> variable species the virtual server port or service that you want to bind
the script to.
The <script_name> variable is the name of the script that you compile and bind.










