ports/154480: gmond reports wrong number of running processes.
KOIE Hidetaka
koie at suri.co.jp
Thu Feb 3 07:30:13 UTC 2011
>Number: 154480
>Category: ports
>Synopsis: gmond reports wrong number of running processes.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Feb 03 07:30:11 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: KOIE Hidetaka
>Release: Current
>Organization:
surigiken
>Environment:
FreeBSD guriandgura 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r216681+5c4bd1174659,ver-hg,nice-powerd: Fri Dec 24 11:46:20 JST 2010 koie at guriandgura:/usr/obj/usr/src/sys/GURIANDGURA amd64
>Description:
gmond is in sysutils/ganglia-monitor-core.
gmond resports reports running processes >= CPU even if system is idle.
for example, on 4 CPU machine, gmond reports 4 processes are running at least.
>How-To-Repeat:
>Fix:
when counting, idle threads running on each CPU must be skipped.
I don't know SWI (software interrupt) thread should be skipped.
Patch attached with submission follows:
--- libmetrics/freebsd/metrics.c-base 2011-02-03 15:32:37.931606016 +0900
+++ libmetrics/freebsd/metrics.c 2011-02-03 15:37:31.347603233 +0900
@@ -541,6 +541,16 @@ proc_run_func( void )
goto output;
for (i = 0; i < nentries; kp++, i++) {
+#if 1 /*KOIE1*/
+ /* This is a per-CPU idle thread. */ /* idle thread */
+ if ((kp->ki_tdflags & TDF_IDLETD) != 0)
+ continue;
+#endif
+#if 1 /*KOIE2*/
+ /* Ignore during load avg calculations. */ /* swi or idle thead */
+ if ((kp->ki_tdflags & TDF_NOLOAD) != 0)
+ continue;
+#endif
#ifdef KINFO_PROC_SIZE
state = kp->ki_stat;
#else
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list