To monitor the count of D-state processes, use the logmon probe in command mode with a custom script or command string.
Step 1: Configure the Profile
- Open the logmon probe configuration.
- Create a new profile (e.g., Linux_DState_Monitor).
- In the General tab:
- Mode: select command.
- Command: Enter the following string to count D-state processes: ps -eo stat --no-headers | awk '$1 ~ /^D/' | wc -l
- Interval: Set to your desired polling frequency (e.g., 5 min).
- Ensure Generate Alarm is selected.
Step 2: Define Watcher Rule and Variables
- Navigate to the Watcher Rules tab and create a new rule.
- In the Standard tab:
- In the Variables tab, create a new variable (e.g., DCount):
- Source: Match Expression.
- Match Group: 1.
Step 3: Configure Alarms and Thresholds
- In the Variables tab for DCount, define the threshold:
- Set the Expected value (e.g., < 15). The alarm will trigger if the value is outside this range.
- In the Alarm tab of the Watcher Rule:
- Severity: Select the desired level (e.g., Major).
- Alarm Text: Number of D-state processes is $DCount, exceeding threshold.
- Suppression Key: dStateCount (for correlation).