Contents SAS/IntrNet 9.1: Application Dispatcher Previous Next

Application Load Manager Reference

The Application Load Manager is available for z/OS, UNIX, and Windows systems. The Load Manager executable (loadmgr.exe on Windows, loadmgr on other platforms) is included in the CGI Tools for Web Server package. After you have installed this package, you can find the Load Manager executable in the Web server directory corresponding to the URL

   http://yourserver/sasweb/IntrNet9/tools

The Load Manager executable is also included in the SAS installation on UNIX and Windows systems. The Load Manager can be found at the following locations:

UNIX
!SASROOT/utilities/bin/loadmgr

Windows
!SASROOT\intrnet\sasexe\loadmgr.exe

Starting the Load Manager

The syntax for starting the load manager is

loadmgr <options>

where <options> can be any of the following:

-delete
removes a previously installed load manager as a system service on Windows NT.

-install
installs the load manager on Windows NT as a system service.

-log<=filename>
specifies an optional log file. The STDOUT device is used if a filename is not specified. If the Load Manager log file specification contains any of the following directives, the corresponding value will be inserted into the file name:
   %a  Day of week [Sun - Sat] 
   %b  Month [Jan - Dec] 
   %d  day [01 -31] 
   %H  hour [00 - 23] 
   %m  month [01 - 12] 
   %w  day of week [0=Sunday - 6=Saturday] 
   %Y  full year 
   %y  2-digit year [00 - 99] 

Note: Additional codes may be available depending upon the C library function strftime implementation for a given platform.

For example, "/logs/loadmgr_%a.log" creates /logs/loadmgr_Mon.log if the Load Manager starts on a Monday, /logs/loadmgr_Tue.log if it starts on a Tuesday, and so on.

Periodically, the Load Manager regenerates the log file name and checks to see if it is different from the current log file. If it is different, the current log file is closed, and the new log file with the new name is opened. In the example above, shortly after midnight, early Tuesday morning, the log file /logs/loadmgr_Mon.log is closed and the file /logs/loadmgr_Tue.log is opened.

If the Load Manager is started and finds a log file with the current name, it replaces the contents of an existing log file if the last modification date is greater than 5 days, 23 hours ago. If the last modification date is less than that, the Load Manager appends to the existing log file.

-maxreq=minutes
specifies the maximum time it should take for the Application Server to send a BUSY state after the Application Server is allocated to the Application Broker. The default is 1 minute.

-maxrun=minutes
specifies the expected maximum job run time in minutes before an Application Server is declared to be hung. The default is 60 minutes.

-maxstart=minutes
specifies the maximum time that it should take an Application Server to start. The default is 5 minutes.

-nokill
specifies not to kill a pool server that is marked as hung.

-passwd<=password>
specifies an optional password controlling access to the ENDLOADMGR and LOADSTAT administration programs. If the -passwd option is specified without a password value, a prompt is issued for the password.

-port=nnnn
specifies the port number or service name for the socket on which the Load Manager listens. If this parameter is not specified, the /etc/services file is checked for an entry for LOADMGR.

-workdir=directory
enables you to specify the current working directory as a start parameter for the Load Manager.

On Windows platforms only, a setup wizard is available to configure the Load Manager. The setup wizard allows you to create Start menu shortcuts to start the Load Manager, install or uninstall the Load Manager as a Windows service, or view log files. See Load Manager on Windows Platforms for more information.


Stopping the Load Manager

The Load Manager can be stopped from a Web browser. The URL depends on the platform and path where your Application Broker is installed. For typical installations, the URL to stop a service is one of the following:

Windows
http://yourserver/scripts/broker.exe?_service=service-name&_program=endloadmgr

UNIX and z/OS
http://yourserver/cgi-bin/broker?_service=service-name&_program=endloadmgr

Specify your Web server name in place of yourserver and any service that uses the Load Manager in place of service-name. You might need to use a different URL path if you chose a different path when you installed the Application Broker. The ENDLOADMGR command also stops any pool service Application Servers that have been started by the Load Manager. If the load manager was started with the -passwd option, the specified password must be appended to the URL. For example:

   http://yourserver/scripts/broker.exe?_service=service-name&_program=endloadmgr&_passwd=secret

Application Broker Directives for the Load Manager

To use the Load Manager, add a directive to the Application Broker configuration file:

   LoadManager host:port

You can override this on a per-service basis with a corresponding ServiceLoadManager directive:

   ServiceLoadManager host:port

No other changes are required. All information in the Application Broker configuration file are passed to the Load Manager by the Application Broker as needed.


Load Manager Statistics

Statistics are recorded for all Application Servers requested through the Load Manager. Data is kept for the length of jobs and for the amount of time required to wait for a server. The job times are based on state changes sent from the Application Servers and vary slightly from the job times reported by the Application Broker.

A statistics report may be obtained by running a special program via the Application Broker. The load manager statistics are returned when _PROGRAM is set to LOADSTAT and _SERVICE specifies any service that uses the desired load manager. If the load manager was started with the -passwd option, _PASSWD must be used to supply the password. For example, the URL

   http://yourserver/scripts/broker.exe?_service=default&_program=loadstat&_passwd=secret

might return the following report:

Load Manager serv.abc.com:5555

Service default
Server                             Port Total JobsMax Job Time Average Job Time Percent WaitedAverage Wait Time
serv.abc.com51972 0.52 0.38 0.00 0.00

Service pool1
Server                             Port Total JobsMax Job Time Average Job TimePercent Waited Average Wait Time
poolserv.abc.com 290912 10.40 2.2010.00 1.79
poolserv.abc.com2940 1 0.08 0.08 100.00 0.19

The columns of the report are defined as

Server
is the Application Server host.

Port
is the port number for the Application Server.

Total Jobs
is the number of complete Application Broker requests that were processed.

Max Job Time
is the length of the longest-running Application Broker request, in seconds.

Average Job Time
is the average length of all Application Broker requests, in seconds.

Percent Waited
is the percentage of Application Broker requests that had to wait for an Application Server.

Average Wait Time
is the average amount of time, in seconds, that an Application Broker request waited, if it had to wait.

Load Manager Data for Application Server Activity

An Application Server activity report may be obtained by running a special program via the Application Broker. The activity data is returned when _PROGRAM is set to LOADCURRENT and _SERVICE specifies any service that uses the desired load manager. It reports only information contained in the Load Manager and does not contact any Application Servers. If the load manager was started with the -passwd option, _PASSWD must be used to supply the password. For example, the URL

   http://yourserver/scripts/broker.exe?_service=default&_program=loadcurrent&_passwd=secret

might return the following report:

Load Manager serv.abc.com:5555

Service pool1
Server                             Port State Total Jobs Last Job
poolserv.abc.com 2990 BUSY 1 Jan 15 14:32:04
poolserv.abc.com 2972 BUSY 3 Jan 15 14:32:01
poolserv.abc.com 2985 BUSY 2 Jan 15 14:32:04
Waiters: 2

The columns of this report are defined as

Server
is the Application Server host.

Port
is the port number for the Application Server.

State
is the current Application Server state, which specifies whether or not the Application Server is busy.

Total Jobs
is the number of complete Application Broker requests that were processed.

Last Job
is the time when the last Application Server was assigned to a job.

Waiters
is the number of clients that are waiting for an available Application Server.

Contents SAS/IntrNet 9.1: Application Dispatcher Previous Next