For adaptive scheduling, the LoadMaster periodically checks the system load on all servers in the farm. Each server machine has to provide a file that contains a numeric value in the range between 0 and 102 representing the actual load on this server (0 = idle, 99 = overload, 101 = server down, 102 = administratively disabled). The LoadMaster retrieves this file via an HTTP GET operation. It is the serversâ€™ job to provide the actual load in the ASCII file. There are no prerequisites, though, to how the servers evaluate this information.
There are some conditions that must hold:
An ASCII file must exist with a number between 0 and 99 in the first line
The file must be accessible to an HTTP GET operation from the LoadMaster
The URL must be the same on all servers
The URL must match the Adaptive URL as set in Rules & Checking > Check Parameters
The lmperfagent file needs to be translated to the same language as the host operating system.
The following is an example script to determine and present the load information on a LINUX server:
Here is an example of a C program to determine and present the load information on a MS Windows NT or 2000 server:
This example code is a program that obtains the CPU load counter from Windows 2000. It uses the Performance Data Helper (PDH) API, and must be linked to the pdh.lib.
The PDH Dynamic Link Library (DLL) pdh.dll must also be installed on the system.
The counter paths for Windows 2000 must be modified dependent on the installed language.