Bug 254252

Summary: net-mgmt/nagios-plugins check_procs wrong CPU matching [idle] thread with --metric=CPU
Product: Ports & Packages Reporter: Volodymyr Pushkar <vladimir.pushkar>
Component: Individual Port(s)Assignee: Mathieu Arnold <mat>
Status: New ---    
Severity: Affects Some People CC: mat
Priority: --- Flags: bugzilla: maintainer-feedback? (mat)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch-plugins_check__procs.c vladimir.pushkar: maintainer-approval? (mat)

Description Volodymyr Pushkar 2021-03-13 08:22:11 UTC
Created attachment 223224 [details]
patch-plugins_check__procs.c

When checking for processes using a lot of CPU check_procs match [idle] thread and giving wrong state. For example:

>/usr/local/libexec/nagios/check_procs -v -w 70 -c 90 --metric=CPU
CPU CRITICAL: 1 crit, 0 warn out of 75 processes [idle] | procs=75;;;0; procs_warn=0;;;0; procs_crit=1;;;0; procpcpu=399.899994;

Proposed patch will skip idle.
Comment 1 Mathieu Arnold freebsd_committer 2021-06-07 07:03:20 UTC
Sorry for taking this long to get to this patch.

I am sorry but I don't understand what the patch actually does.