Skip to content

Example process class

This section provides an example of using process availability monitoring to create a new process class, for database processes. The database runs on a Linux host, and the following output is a partial list of the results of the ps axho args command on the database host. Process monitoring uses the output of that command (or its equivalent) as input for regular expression matching.

ora_pmon_orcl ora_psp0_orcl ora_vktm_orcl ora_gen0_orcl ora_diag_orcl ora_dbrm_orcl ora_dia0_orcl ora_mman_orcl ora_dbw0_orcl ora_lgwr_orcl ora_ckpt_orcl ora_smon_orcl ora_reco_orcl ora_mmon_orcl ora_mmnl_orcl ora_d000_orcl ora_s000_orcl ora_s001_orcl ora_s002_orcl ora_s003_orcl ora_s004_orcl ora_s005_orcl ora_s006_orcl ora_s007_orcl ora_s008_orcl ora_s009_orcl ora_p000_orcl ora_p001_orcl ora_p002_orcl ora_p003_orcl ora_p004_orcl ora_qmnc_orcl ora_n000_orcl ora_l000_orcl ora_l001_orcl ora_l002_orcl ora_l003_orcl

The following subsections provide procedures for creating a process class that captures a selection of the preceding process instances in process sets.

Test existing process classes

The existing process classes may already capture the process sets you want. Follow these steps to test the existing process classes.

  1. In Collection Zone, navigate to INFRASTRUCTURE > PROCESSES.
  2. In the lower-left corner of the tree view, click the Action menu, and select Test All Process Classes Regular Expressions. The top-right portion of the dialog box displays all the process classes, in the order in which they are evaluated.
  3. Select the process names in the previous section, and copy them into a paste buffer.
  4. In the Test Process Class Regular Expressions dialog, select all the existing text in the Input area, and then paste the process names from the buffer. Alternatively, you may paste the process names into an empty file, save the file on the system from which your browser is launched, and then use the Choose File button to insert the process names.
  5. At the bottom-left corner of the dialog, click Test.
  6. If any process sets are created, they are displayed in the list area, above the Test button.

Create an organizer

Complete the previous section, and then follow these steps to create a process class organizer.

  1. In Collection Zone, navigate to INFRASTRUCTURE > PROCESSES.
  2. In the lower-left corner of the tree view, click the Add menu, and select Add Process Class Organizer.

  3. In the Add Process Class Organizer dialog, enter Database, and then click Submit.

Create a process class

Complete the previous section, and then follow these steps to create a process class.

  1. At the top of the tree view, double-click Processes, the root organizer to open it.
  2. Select Database.
  3. In the lower-left corner of the tree view, click the Add menu, and then select Add Process Class.

  4. In the Add Process Class dialog, enter DB daemons, and then click Submit.

  5. At the top of the tree view, double-click Processes to open it, and then select Database.

Define the regular expression series of a process class

Complete the previous section, and then follow these steps to create the series of regular expressions that define a process class, and generate process sets.

  1. In the list area of the tree view, select DB daemons.

  2. In the Description field,enter Database daemons.

  3. In the Include processes like field, replace DB daemons with a that selects the database processes. For example, ora_[^_]{4}_orcl. The example regular expression selects all the processes in the sample process instance list.

  4. In the Exclude processes like field, enter a regular expression to remove processes from the results of the preceding regular expression. The default entry excludes common user commands. The default entry does not exclude any of the processes in the sample process instance list.

  5. The next two fields, Replace command line text and With, work together to simplify the names of process sets.

    • In the Replace command line text field, enter a regular expression containing one or more pattern groups.

    • In the With field, enter replacement text, along with the sequence number of one or more of the pattern groups defined in the previous field.

    For example, to create four pattern groups for database processes, enter the following regular expression in the Replace command line text field:

    ^(ora_)([a-z])(.{4})(orcl)
    

    To use two of the pattern groups in the replacement text, enter the following text in the With field:

    DB [\4] daemons starting with [\2]
    

    Each unique replacement generated by the combination of the text plus the inserted pattern sequences becomes a process set. In the case of this example, pattern group 4 does not vary, but pattern group 2 does. So the number of process sets generated by this class will equal the number of unique alphabetic characters found in the first position after the first underscore.

  6. Click Save.

Test a process class

Complete the previous section, and then follow these steps to test a single process class.

  1. In the lower-left corner of the tree view, click the Action menu, and select Test Process Class Regular Expressions. The top-right portion of the dialog box displays the regular expression series that defines this process class.
  2. Select the process names in the previous section, and copy them into a paste buffer.
  3. In the Input area, select all the existing text, and then paste the process names from the buffer.
  4. At the bottom-left corner of the dialog, click Test.
  5. The Output area displays each individual match, along with the count of unique process sets. You may refine the regular expressions and retest as often as you like.
  6. Click Done. Changes made to regular expressions in this dialog are copied to the process class definition page. However, the changes are not saved until you click the Save button on that page.

Test and review the process class sequence

The order in which process classes are evaluated is significant. During modeling, each time a process matches a class, the matching process is put into a process set, and then removed from the list of processes that are passed on to the next class in the sequence. New process classes are inserted into the process class sequence automatically, and may not be in the appropriate position in the sequence.

Complete the previous section, and then follow these steps to test and review the process class sequence.

  1. In the lower-left corner of the tree view, click the Action menu, and select Test All Process Classes Regular Expressions.

  2. Select the process names in the previous section, and copy them into a paste buffer.

  3. In the Input area, select all the existing text, and then paste the process names from the buffer.

  4. At the bottom-left corner of the dialog, click Test.

  5. The number of processes matched and process sets created in this test should be identical to the results of testing the process class alone. If they are not, follow these steps to adjust the process class sequence.

    1. In the Test Process Class Regular Expressions dialog, click Done.
    2. From the Action menu, select Change Sequence.
    3. Scroll through the list of process classes, and then select the class to move.
    4. Drag the class to an earlier (higher) location in the sequence.
    5. Click Submit.
  6. Re-open the Test Process Class Regular Expressions dialog, and re-test the sequence.

Test the process class on a host

Process sets are created during modeling. To test a process class, choose a device host that is configured for SNMP or SSH access, and model it manually.

Complete the previous section, and then follow these steps to test the process class on a host.

  1. Navigate to INFRASTRUCTURE > DEVICES.

  2. Select a host that is configured for SNMP or SSH access, and is running process that match the new class.

    For example, the list of processes used in this section is collected from a VirtualBox virtual appliance downloaded from the Oracle Technology Network.

  3. Open the host's Overview page. From the Action menu, select Model Device. When modeling completes, the OS Processes section of the tree view is updated to include the new process sets.

  4. Navigate to INFRASTRUCTURE > PROCESSES.

  5. In the tree view, select the DB daemons class. The process sets found on the host are displayed in the list at the bottom of the page.