Scenario: System monitor

See an example system monitor that alerts you if the CPU utilization gets too high and temporarily holds any lower priority jobs until more resources become available.

Situation

As a system administrator, you need to ensure that the system has enough resources to meet the current demands of your users and business requirements. For your system, CPU utilization is an important concern. You would like the system to alert you if the CPU utilization gets too high and to temporarily hold any lower priority jobs until more resources become available.

To accomplish this, you can set up a system monitor that sends you a message if CPU utilization exceeds 80%. Moreover, it can also hold all the jobs in the QBATCH job queue until CPU utilization drops to 60%, at which point the jobs are released, and normal operations resume.

Configuration example

To set up a system monitor, you need to define what metrics you want to track and what you want the monitor to do when the metrics reach specified levels. To define a system monitor that accomplishes this goal, complete the following steps:

Start of change
  1. In IBM® Navigator for i, select Monitors > System Monitors. From the Actions menu, select Create New System Monitor...
  2. On the General page, enter a name and description for this monitor. Click Next.
  3. Add and edit the CPU Utilization (Average) metric properties by performing the following steps:
    1. To add the metric, select CPU Utilization (Average) from the list of Available Metrics, and click Add. CPU Utilization (Average) is now listed under Metrics to monitor.
    2. To edit the metric properties, click the CPU Utilization (Average) metric in the Metrics to monitor list. This action opens the Configure Metric page where you can edit the properties of the metric.
    3. For Collection interval, specify how often you would like to collect the data. This action overrides the Collection Services setting. For this example, specify 30 seconds.
    4. For Threshold 1, enter the following values to send an inquiry message if the CPU Utilization is greater than or equal to 80%:
      1. Select Enable threshold.
      2. For the threshold trigger value, specify >= 80 (greater than or equal to 80 percent busy).
      3. For Duration, specify 1 interval.
      4. For the IBM i command, specify the following:
        SNDMSG MSG('Warning,CPU...') TOUSR(*SYSOPR) MSGTYPE(*INQ)
      5. For the threshold reset value, specify < 60 (less than 60 percent busy). This action resets the monitor when CPU utilization falls below 60%.
    5. For Threshold 2, enter the following values to hold all the jobs in the QBATCH job queue when CPU utilization stays above 80% for five collection intervals:
      1. Select Enable threshold.
      2. For the threshold trigger value, specify >= 80 (greater than or equal to 80 percent busy).
      3. For Duration, specify 5 intervals.
      4. For the IBM i command, specify the following:
        HLDJOBQ JOBQ(QBATCH)
      5. For the threshold reset value, specify < 60 (less than 60 percent busy). This action resets the monitor when CPU utilization falls below 60%.
      6. For Duration, specify 5 intervals.
      7. For the IBM i command, specify the following:
        RLSJOBQ JOBQ(QBATCH)

        This command releases the QBATCH job queue when CPU utilization stays below 60% for five collection intervals.

  4. Click OK to save the metric properties.
  5. Click Next to view the monitor summary page.
  6. Click Finish to save the monitor.
  7. From the list of system monitors, right-click the new monitor and select Start.
End of change

Results

The new monitor collects the CPU utilization, with new data points added every 30 seconds, according to the specified collection interval. The monitor automatically carries out the specified threshold actions whenever CPU utilization reaches 80%. The monitor will continue to run and perform threshold actions until you stop the monitor.

Note: This monitor tracks only CPU utilization. However, you can include any number of the available metrics in the same monitor, and each metric can have its own threshold values and actions. You can also have several system monitors that run at the same time.