Sun Java System Web Server 7.0 Update 1 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 is a UNIX-only parameter and 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 and the nice increment can be between 0 and 19.

0

The CGI program runs at the same priority as server

19

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

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


Note –

While it is possible to increase the priority of the CGI program above that of the server by specifying a nice increment of -1, Sun does not recommended you to do so.


For more information about send-cgi, see the Sun Java System Web Server 7.0 Update 1 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. Configure CGI variables.

    • Using the Admin Console:

      1. Select Common Tasks tab > CGI Directories from the Virtual Server Tasks list.

        The CGI Settings window is displayed.

      2. Specify the nice value as desired.

      3. Click Save to apply your changes.

    • Using the set-cgi-prop command.

      Example:

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