IPC Semaphores Test

Semaphores are data structures that are used for synchronization between two or more processes. They are often used to monitor and control the availability of system resources such as shared memory segments. Basically, they can be viewed as a single integer that represents the amout of resources available. When a process wants a resource, it checks the value of the semaphore, and if it it non-zero, it decrements the appropriate number from the semaphore in accordance to the amout of resources it wishes to use. The kernel will block the process if the semaphore is zero or doesn't have a value high enough for the decrement.

Semaphores can be operated on as individual units or as elements in a set. A semaphore set consists of a control structure and an array of individual semaphores. A set of semaphores can contain up to 25 elements. Like message queues, the semaphore set creator can change its ownership or permissions. To know the count and composition of semaphore sets and understand who owns which semaphore set, administrators can use the IPC Semaphores test.

Target of the test : Solaris, Linux, AIX and HPUX systems

Agent deploying the test : An internal agent

Outputs of the test : One set of results for every semaphore set owner (by default) of the server being monitored

Configurable parameters for the test
  1. Test period - How often should the test be executed
  2. Host - The host for which the test is to be configured.
  3. report by – By default, this flag is set to Owner. This implies that, by default, the test metrics for every semaphore set owner on the target server. You can set this flag to Total, if you want the test to report metrics for the Total descriptor alone; in this case, the test will aggregate measures across all the semaphore sets on the server. Alternatively, you can pick the Owner and Total option. In this case, the test will report metrics per owner and also for the Total descriptor.
  4. DD frequency - Refers to the frequency with which detailed diagnosis measures are to be generated for this test. The default is 1:1. This indicates that, by default, detailed measures will be generated every time this test runs, and also every time the test detects a problem. You can modify this frequency, if you so desire. Also, if you intend to disable the detailed diagnosis capability for this test, you can do so by specifying none against dd frequency.
  5. DETAILED DIAGNOSIS – To make diagnosis more efficient and accurate, the eG Enterprise embeds an optional detailed diagnostic capability. With this capability, the eG agents can be configured to run detailed, more elaborate tests as and when specific problems are detected. To enable the detailed diagnosis capability of this test for a particular server, choose the On option. To disable the capability, click on the Off option.

    The option to selectively enable/disable the detailed diagnosis capability will be available only if the following conditions are fulfilled:

    • The eG manager license should allow the detailed diagnosis capability
    • Both the normal and abnormal frequencies configured for the detailed diagnosis measures should not be 0.
Measurements made by the test
Measurement Description Measurement Unit Interpretation

Number of semaphore sets

Indicates the number of semaphore sets owned by this owner. For the Total descriptor, this measure indicates the total number of semaphore sets on the server.

Number

This measure will be reported for the Total descriptor, only if the report by flag is set to Total or Owner and Total.

To know the complete details of each semaphore set owned by an owner and the number of semaphores each set contains, use the detailed diagnosis of this measure.

Number of semaphores

For each owner, this measure reports the total number of semaphores that are in the semaphore sets owned by that owner. For the Total descriptor, this measure indicates the total number of semaphores in all the semaphore sets created on the server.

Number

This measure will be reported for the Total descriptor, only if the report by flag is set to Total or Owner and Total.

You can compare the value of this measure across owners to know which owner owns the maximum semaphores. To know which semaphore sets are owned by such an owner, use the detailed diagnosis of the Number of semaphore sets measure.

The detailed diagnosis of the Number of semaphore sets measure reveals the creator of each semaphore set, the number of semaphores in each set, when the set was created, and what was the last time each set was accessed. From this, you can quickly identify semaphore sets with the maximum number of semaphores and those that were used recently.

Figure 1 : The detailed diagnosis of the Number of semaphore sets measure