Process Monitoring

Home  Previous  Next

Objective

The aim of the Process Monitoring tool is to ensure that an application is functioning properly by checking if the processes of an application are running.

Monitoring Studio provides an application-oriented mechanism to test the presence of such processes.

What is a process

In practice, a process is basically a binary code being executed by processors. Processes are launched by the operating system and have several properties: PID (unique identifier of a process); Name; User ID; Command line that was used to launch the process (arguments passed to the binary); Environment; CPU and memory usage; Other various OS-specific properties.

For further details on the concepts related to processes, please refer to About processes in the Reference section.

Method to monitor a process (summary)

On Windows, UNIX and Linux systems, Monitoring Studio allows you to check the presence of these processes by specifying one or more of the following criteria:

Name of the process (as it appears in ps or in the Windows Task Manager)
Command line that was used to spawn the process
Username the process is run as
PID (process ID)

Once you have entered the criteria to detect the processes of your application, you can select which parameters should be monitored. When several processes match the entered criteria, the selected parameters will be valued in the PATROL Console (under the single process icon) by summing up the value of the parameters for each matching process.

Advanced privileges are sometimes required to collect process information. In that case, you will be prompt to enter process command credentials that will be used for running OS commands. See section Process Command Credentials for more information.

Result

All processes that match the entered criteria will be monitored and identified as one icon in the PATROL Console.

Example

If the criterion entered to detect the processes is "ORA," then all the Oracle processes will be monitored within a single icon in the PATROL Console. The ProcessorTime parameter under this icon will represent the sum of the processor time of all Oracle processes.

Creating and editing a process monitoring

To create a new process monitoring, right-click the Application/Container icon within the PATROL Console and select KM Commands > New > Process monitoring....

Step 1 – Select the action you wish to perform

WIZ_ProcessMonitoring_1Welcome

Process Monitoring Wizard — Welcome Page

To edit an existing process monitoring, right-click the Process icon within the PATROL Console and select KM Commands > Edit.

Step 2– a: Pick the process to monitor from a list

The aim of this option is to let users select a process from a list with a simple click.

Monitoring Studio builds the list of processes currently running on the monitored server with all the details of each process: PID, process name, user name and command line.

WIZ_ProcessMonitoring_2PickProcess

Process Monitoring Wizard — Pick the process to monitor from a list

Click the process you wish to monitor and click the Next button. This will bring up the process criteria panel (see step 1-b) with all information already filled. You may remove or modify any information you do not wish to monitor from this panel and proceed with the wizard.

NoteProcesses with long command lines may take more than one line to display all the arguments. You can click on any of the process’ lines to select the process from the list.
ImportantIf you proceed to the next panel and come back to this one, the process you chose will not be pre-selected from the list. This is due to some PSL limitation. You have to re-select the process before clicking on Next >. You may, of course, select any other process.
NoteIt may take a few seconds for the panel to be displayed. Monitoring Studio has to retrieve the list of currently running processes which may a moment depending on the server type and the number of processes running.

Step 2 - b: Criteria the monitored process must match with

If you choose to specify criteria that the monitored process must match with, the following dialog box is shown:

WIZ_ProcessMonitoring_3Criteria

Process Monitoring Wizard — Enter criteria to identify and monitor processes

The name of the process must be exactly/must contain: Choose the appropriate option and enter the name of the process to monitor. Under Windows, do not forget the ".exe" extension at the end of the name.

Must be exactly: Signifies that Monitoring Studio will search for a process whose name is exactly as stated in the text you enter.
NoteThe text entered in the fields is case-sensitive on UNIX and Linux, but not on Windows.
AND the command line that launched the process must match the regular expression below/must contain: Enter a regular expression. Only processes that have been launched by a command-line that matches this regular expression will be monitored.
AND the process must be running as this user: Enter the user name the monitored process is running as.
View processes: Click this button to view the currently running processes.

Here are a few examples:

Criteria

Processes that match the criteria

Example 1

Process name MUST BE EXACTLY patrolagent.exe
Command-line = <nothing>
User Identity = <nothing>

PatrolAgent.Exe

C:\Patrol\PatrolAgent.exe -p 3181

C:\Patrol\PatrolAgent.exe

Example 2

Process name MUST BE EXACTLY patrolagent.exe
Command-line MUST MATCH THE REGULAR EXPRESSION -[pP] 3181
User Identity = <nothing>

C:\Patrol\PatrolAgent.exe -p 13181

Example 3

Process name MUST CONTAIN pat
Command-line = <nothing>
User Identity = <nothing>

PatrolAgent.exe

PatProcess.exe

PatrolPerf.exe

Step 2 - c: PID files

If you choose to specify a PID file, the following dialog box is shown:

WIZ_ProcessMonitoring_4PID

Process Monitoring Wizard — Provide a PID file path

Path to the file containing the Process PID: Enter the path for the file with the process PID. At each polling, Monitoring Studio reads this file, retrieves the PID number and checks whether this process PID exists or not. Normally, the process PID is dynamically allocated. The process PID number should be at the very beginning of the file’s content.

Step 3: Select parameters

WIZ_ProcessMonitoring_5PIDParam

Process Monitoring Wizard — Process PID: Parameter Selection

Here’s a table that describes the parameters available for process monitoring:

Name

Description

Count

Displays the number of processes that match the criteria.
Unit: Processes

ChildCount

Displays the number of children of the matching process(es).
Unit: Processes

ProcessorTime

Displays the processor time percent used by the matching process(es).
Unit: Percentage (%)

HandleCount
(Windows only)

Displays the number of handles opened by the matching process(es).
Unit: Handles

PageFaultsPerSec
(Windows only)

Displays the number of page faults per second caused by the matching process(es).
Unit: Page fault/sec

PageFileBytes
(Windows only)

Displays the page file used by the matching process(es).
Unit: Megabytes

PrivateBytes
(Windows only)

Displays the processor time percent used by the matching process(es). On multi- processor computers, this parameter may go over 100%.
Unit: Percentage (%)

ThreadCount
(Windows only)

Displays the number of threads of the matching process(es).
Unit: Threads

VirtualBytes

Displays the virtual memory used by the matching process(es).
Unit: Megabytes

WorkingSet
(Windows only)

Displays the working set size of the matching process(es).
Unit: Megabytes

Step 4: Monitoring Studio settings

WIZ_ProcessMonitoring_6Settings

Process Monitoring Wizard — Settings Page

Object display name: Label displayed in the PATROL Console.

Object internal identifier (ID): PATROL internal identifier of this process monitoring.

What thresholds do you want to set for the newly created object? The drop-down list allows you to select the mode of setting alert thresholds:

Use default thresholds: Uses the default thresholds set by Monitoring Studio
Set custom thresholds: Allows you to customize the thresholds for all parameters of the instance
Use default thresholds and customize them: Sets the default Monitoring Studio thresholds on certain parameters (see list of parameters with default thresholds) and then allows you to customize any/all of them. This is mainly intended to help save time if you wish to customize the thresholds of just one of many parameters for the instance, and leave the default settings for the others.
NoteIf you select Use default thresholds and customize them; on clicking Finish, the Set Thresholds panel will appear, and certain parameters for the instance may appear with an asterisk symbol - indicating that they already have thresholds. You can then customize (any/all) the thresholds of the parameters as per your specific needs.
Do not set any thresholds for now: No thresholds will be set on any parameter of the instance, and as a result no alerts will be triggered. Monitoring Studio will poll the object and return the output of the polling – but will not raise any alerts until you set thresholds.
TipThresholds can be set or modified at anytime by right-clicking on the instance > KM commands > Set Thresholds.

Process monitoring objects are instances of the SW_PROCESSES class.


See Also

Process viewer tool

SW_PROCESSES

Can I monitor the processor time usage made by a Windows service?

Is it possible to monitor the CPU/memory usage of a process tree?

Process Command Credential