Use this Knowledge Script to monitor whether specified processes have exceeded CPU thresholds. This script monitors CPU usage for each named process, as well as the total CPU usage for all named processes.
To determine CPU usage, this script checks the percentage of processor time that the threads for each process used to execute instructions.
If a process is not found, the script assumes that the process is not running, and reports zero as the CPU result.
NOTE:
This script does not detect invalid process names. If you enter an invalid process name, the script assumes that the process is not running, and reports zero as the CPU result.
If the CPU usage for the named processes exceeds the threshold limit, an event is raised. However, this is not applicable for Windows System Idle Process. The System Idle Process indicates the percentage of idle CPU resources. If no applications are running, this process indicates a high idle capacity. The high percentage exceeds the threshold and raises an event indicating that the System Idle Process consumes high CPU resources. You can safely ignore this event message because the high percentage refers to the high idle capacity and not high CPU usage.
Windows 2003 Server or later
The default schedule for this script is Every 5 minutes.
Set the following parameters as needed:
Description |
How to Set It |
---|---|
Event Notification |
|
Create event for each process that exceeds the threshold? |
Select Yes to raise an event if any individual process exceeds the CPU usage threshold you specify. The default is Yes. |
Severity - Individual process CPU high |
Set the event severity level, from 1 to 40, to indicate the importance of an event in which CPU usage exceeds the threshold. The default is 8 (red event indicator). |
Create event if the sum of all processes exceeds the threshold? |
Select Yes to raise an event if the CPU usage by all processes exceeds the threshold you specify. The default is Yes. |
Severity - Total process CPU high |
Set the event severity level, from 1 to 40, to indicate the importance of an event in which CPU usage for all processes exceeds the threshold. The default is 15 (yellow event indicator). |
Severity - Job failure |
Set the event severity level, from 1 to 40, to indicate the importance of an event in which the CpuByProcess job fails unexpectedly. The default is 5 (red event indicator). |
Data Collection |
|
Collect data for each process? |
Select Yes to collect data for charts and reports, for each process you monitor. The default is unselected. |
Collect data for all processes? |
Select Yes to collect data for charts and reports, for all processes you monitor. The default is unselected. |
Monitoring |
|
Processes |
Specify the names of the processes you want to monitor. Separate the names with commas (,) and no spaces. |
Maximum threshold for CPU for each process |
Specify the maximum CPU usage allowed for each monitored process before an event is raised. The default is 60%. |
Maximum threshold for CPU for all processes |
Specify the maximum CPU usage allowed for all monitored processes before an event is raised. The default is 95%. |