elim

External load information manager, monitoring site-specific (external) load indices.

Description

Load indices measure and report the availability of dynamic resources (such as available memory and CPU utilization) on a host which change as the load on that host changes. These values are reported to a host's load information manager (lim), which periodically collects those values.

Load indices are of two types:
  • Built-in (for example, CPU, memory, disk space, and I/O).
  • External based on resource requirements at your site (for example, the space available in a directory). If you define site-specific resources, you must write a site-specific executable that is called the external load information manager (elim) to supply the lim with the values of these dynamic external resources.

An elim can be as simple as a small script, or as complicated as a sophisticated C program. As a cluster administrator, program the elim to define external load indices, populate those indices with the values of dynamic external resources, and return the indices and their values to stdout.

You can write one elim executable to collect multiple external load indices, or divide external load index collection among multiple elim executables. On hosts mapped to dynamic resources, the lim automatically starts a primary elim (melim), which manages all elim executables on the host and reports the external load index values to the lim. Specifically, the melim runs on each host required to gather dynamic external resources and does the following:
  • Starts and stops elim executables on the host.
  • Collects the load information reported by the elim executables.
  • Checks the syntax of load update strings before sending the information to the lim.
  • Merges the load reports from each elim and sends the merged information to the lim. If there is more than one value reported for a single resource, the melim reports the latest value.

Enabling external load indices

To enable the use of external load indices, you must:
  1. Define the dynamic external resources in the Resource section of ego.shared. By default, these resources are host-based (local to each host) until you configure a resource-to-host-mapping in the ResourceMap section of ego.cluster.cluster_name.
  2. Map the external resources to hosts in your cluster in the ResourceMap section of ego.cluster.cluster_name.
  3. Create one or more elim executables and install them in the directory that is specified by EGO_ESRVDIR.
  4. Restart EGO on all your hosts.
Defining a dynamic external resource:
To define a dynamic external resource for which elim collects an external load index value, define the following parameters in the Resource section of $EGO_CONFDIR/ego.shared:
RESOURCENAME
Specifies the name of the external dynamic resource.
Syntax: resource_name
TYPE

Specifies the type of external resource. Specify Numeric for all dynamic resources.

Syntax: Numeric
INTERVAL

Specifies the interval (in seconds) for data collection by an elim. For numeric resources, defining an interval identifies the resource as a dynamic resource with a corresponding external load index. Otherwise, the resource is considered to be static and load index values are not collected for that resource.

Syntax: seconds
INCREASING
Specifies whether a larger value indicates a greater load.
  • Y—a larger value indicates a greater load. For example, if you define an external load index, the larger the value, the heavier the load.
  • N—a larger value indicates a lighter load.
Syntax: Y | N
DESCRIPTION
Provides a brief description of the resource.
Syntax: description
Begin Resource
RESOURCENAME     TYPE     INTERVAL   INCREASING   DESCRIPTION
  myrsc          Numeric     60         Y         (disk space capacity percentage on /opt)
  tcpnum         Numeric     60         N         (number of  tcp  connections)
  rtprc          Numeric     120        Y         (root process number)
End Resource
Mapping external resources:
Once external resources are defined in ego.shared, they must be mapped to hosts in the ResourceMap section of $EGO_CONFDIR/ego.cluster.cluster_name as follows:
RESOURCENAME
Specifies the name of the external dynamic resource, as defined in the Resource section of ego.shared.
Syntax: resource_name
LOCATION
Maps the resource to the primary host only; all hosts share a single instance of the dynamic external resource.
Syntax: As described in the following table:
Table 1. Mapping external resources
If the specified LOCATION is ... Then the elim executables start on ...
([all]) | ([all ~host_name …]) The primary host because all hosts in the cluster (except those identified by the not operator [~]) share a single instance of the external resource.
[default] Every host in the cluster because the default setting identifies the external resource as host-based. If you use default for any external resource, all elim executables in EGO_ESRVDIR run on all hosts in the cluster.

You can control the hosts on which your elim executables run by using the environment variable EGO_MASTER. This variable defines if elim executables must report the values for resources that only need to be collected by the primary host. If the elim is started on the primary host, set this variable to Y; if the elim is started on a host other than the primary host, set this variable to N.

([host_name …]) | ([host_name …][host_name …]) On the specified hosts.
If you specify a set of hosts, the elim executables start on the first host in the list. For example, if the LOCATION in the ResourceMap section of ego.cluster.cluster_name is ([hostA hostB hostC] [hostD hostE hostF]):
  • EGO starts the elim executables on hostA and hostD to report values for the resources shared by that set of hosts.
  • If the host reporting the external load index values becomes unavailable, EGO starts the elim executables on the next available host in the list. In this example, if hostA becomes unavailable, EGO starts the elim executables on hostB.
  • If hostA becomes available again, EGO starts the elim executables on hostA and shuts down the elim executables on hostB.
Begin  ResourceMap
rtprc            [default]
tcpnum           [default]
myrsc            [all]
End  ResourceMap
Creating an elim executable:
You can write one or more elim executables. The load index names that are defined in your elim executables must be the same as the external resource names defined in the ego.shared configuration file. All elim executables must:
  • Be located in EGO_ESRVDIR and follow the naming convention:
    • On Windows: %EGO_ESRVDIR%\elim.application.exe or %EGO_ESRVDIR%\elim.application.bat
    • On Linux: $EGO_ESRVDIR\elim.application
    Ensure that you do not define duplicate executable names.
  • Run under the same user account as the lim—by default, the EGO administrator (egoadmin) or root account.
  • Be an endless loop.
  • Periodically output a load update string to stdout in the format number_indices index_name index_value [index_name index_value …], where:
    • number_indices specifies the number of external load indices that are collected by the elim.
    • index_name specifies the name of the external load index, as defined in ego.shared.
    • index_value specifies the external load index value that is returned by your elim.