aboutsummaryrefslogtreecommitdiff
path: root/sysutils/ganglia-monitor-core
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2011-05-19 18:10:20 +0000
committerBrooks Davis <brooks@FreeBSD.org>2011-05-19 18:10:20 +0000
commit23922cbcf5760805a74b713a93aae26ab8027f25 (patch)
treeebed6fd9d2a43cffa389c4c6a22a3a018bea9852 /sysutils/ganglia-monitor-core
parent962116f8eb8c2c49e1ed9d5140ba235f185aa414 (diff)
downloadports-23922cbcf5760805a74b713a93aae26ab8027f25.tar.gz
ports-23922cbcf5760805a74b713a93aae26ab8027f25.zip
Don't report idle processes as running processing.
Also don't count P_NOLOAD and TDF_NOLOAD processes. PR: ports/154480 Submitted by: KOIE Hidetaka <koie at suri.co.jp>
Notes
Notes: svn path=/head/; revision=274328
Diffstat (limited to 'sysutils/ganglia-monitor-core')
-rw-r--r--sysutils/ganglia-monitor-core/Makefile2
-rw-r--r--sysutils/ganglia-monitor-core/files/patch-libmetrics_freebsd_metrics.c37
2 files changed, 30 insertions, 9 deletions
diff --git a/sysutils/ganglia-monitor-core/Makefile b/sysutils/ganglia-monitor-core/Makefile
index 3e60b06e70c6..e97dd30dbf44 100644
--- a/sysutils/ganglia-monitor-core/Makefile
+++ b/sysutils/ganglia-monitor-core/Makefile
@@ -7,7 +7,7 @@
PORTNAME= monitor-core
PORTVERSION= 3.1.1
-PORTREVISION= 6
+PORTREVISION= 7
CATEGORIES= sysutils net parallel
MASTER_SITES= SF/ganglia/ganglia%20monitoring%20core/${PORTVERSION}%20%28Wien%29
PKGNAMEPREFIX= ganglia-
diff --git a/sysutils/ganglia-monitor-core/files/patch-libmetrics_freebsd_metrics.c b/sysutils/ganglia-monitor-core/files/patch-libmetrics_freebsd_metrics.c
index 3fd55f70e5d6..771b12e776bd 100644
--- a/sysutils/ganglia-monitor-core/files/patch-libmetrics_freebsd_metrics.c
+++ b/sysutils/ganglia-monitor-core/files/patch-libmetrics_freebsd_metrics.c
@@ -1,5 +1,8 @@
---- libmetrics/freebsd/metrics.c.orig 2010-01-03 20:00:03.213056511 +0000
-+++ libmetrics/freebsd/metrics.c 2010-01-03 20:00:14.482769820 +0000
+
+$FreeBSD$
+
+--- libmetrics/freebsd/metrics.c.orig
++++ libmetrics/freebsd/metrics.c
@@ -106,7 +106,7 @@
static size_t mibswap_size;
static kvm_t *kd = NULL;
@@ -28,7 +31,25 @@
/*
* If the system supports it, the cpufreq driver provides the best
-@@ -881,7 +893,6 @@
+@@ -529,6 +541,17 @@
+ goto output;
+
+ for (i = 0; i < nentries; kp++, i++) {
++ /* This is a per-CPU idle thread. */ /* idle thread */
++ if ((kp->ki_tdflags & TDF_IDLETD) != 0)
++ continue;
++ /* Ignore during load avg calculations. */ /* swi or idle thead */
++#ifdef TDF_NOLOAD
++ /* Introduced in FreeBSD 8.3 */
++ if ((kp->ki_tdflags & TDF_NOLOAD) != 0)
++#else
++ if ((kp->ki_flag & P_NOLOAD) != 0)
++#endif
++ continue;
+ #ifdef KINFO_PROC_SIZE
+ state = kp->ki_stat;
+ #else
+@@ -881,7 +904,6 @@
netvfslist = makenetvfslist();
vfslist = makevfslist(netvfslist);
@@ -36,7 +57,7 @@
mntsize = getmntinfo(&mntbuf, MNT_NOWAIT);
mntsize = regetmntinfo(&mntbuf, mntsize, vfslist);
-@@ -899,6 +910,8 @@
+@@ -899,6 +921,8 @@
*tot_avail += mntbuf[i].f_bavail / toru;
}
}
@@ -45,7 +66,7 @@
return most_full;
}
-@@ -955,7 +968,7 @@
+@@ -955,7 +979,7 @@
return (NULL);
if (fslist[0] == 'n' && fslist[1] == 'o') {
fslist += 2;
@@ -54,7 +75,7 @@
}
for (i = 0, nextcp = fslist; *nextcp; nextcp++)
if (*nextcp == ',')
-@@ -1007,7 +1020,10 @@
+@@ -1007,7 +1031,10 @@
goto done;
}
@@ -66,7 +87,7 @@
if (xvfsp->vfc_flags & VFCF_NONLOCAL)
continue;
-@@ -1057,10 +1073,13 @@
+@@ -1057,10 +1084,13 @@
* Count up the string lengths, we need a extra byte to hold
* the between entries ',' or the NUL at the end.
*/
@@ -83,7 +104,7 @@
if ((str = malloc(slen)) == NULL) {
warnx("malloc failed");
-@@ -1069,10 +1088,11 @@
+@@ -1069,10 +1099,11 @@
str[0] = 'n';
str[1] = 'o';