space
Previous Page | Next Page

SAS/IntrNet 9.2: Application Dispatcher

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 the 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:

-background<=n>
specifies the number of Application Servers that can run in the background at one time. The default is 0, which disables backgrounding.

-delete<=service-name>
removes a previously installed Load Manager as a system service on Windows. This is useful if you are running multiple Load Managers. If the service name is not specified, the name defaults to SAS IntrNet Load Manager.

-install<=service-name>
installs the Load Manager on Windows as a system service. This is useful if you want to run multiple Load Managers. If the service name is not specified, the Load Manager is installed as SAS IntrNet Load Manager.

-localhost<=hostname>
forces the Load Manager to use the specified string as the local host name for all system host name comparisons. This is useful if you want to override the default value for the local host name. In order for the Load Manager to start a pool service, you might need to set the local host name explicitly to match the requested host name.

-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 filename:
   %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 might 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 filename and checks to see whether 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 can 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 can 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 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.

Previous Page | Next Page | Top of Page