Sun Java System Web Server 7.0 Update 3 Developer's Guide

Setting the Priority of a CGI Program

The priority of a CGI program can be set using the nice parameter of the send-cgi function. This UNIX-only parameter accepts an increment that determines the CGI program’s priority relative to the priority of the server process. Typically, the server is run with a nice value of 0. The nice increment can be between 0 and 19.


The CGI program runs at the same priority as the server


The CGI program runs at a much lower priority than the server

As with all other CGI variables, the nice value can be configured for each virtual server.

Note –

Do not increase the priority of the CGI program above that of the server by specifying a nice increment of -1.

For more information about send-cgi, see the Sun Java System Web Server 7.0 Update 3 Administrator’s Configuration File Reference.

ProcedureTo Configure CGI Properties for a Virtual Server

You can configure CGI variables for a virtual server either using the Admin Console or using the CLI. The following procedure describes the steps:

  1. In the Admin Console, select the Common Tasks tab.

  2. Select CGI Directories from the Virtual Server Tasks list.

    The CGI Settings window is displayed.

  3. Specify the nice value as desired.

  4. Click Save to apply your changes.

Example 3–2 To configure CGI properties for a virtual server by using the set-cgi-prop command:

./wadm set-cgi-prop --user=admin --password-file=admin.pwd --host=serverhost --port=8989 --config=config1 nice=5