pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/collectd Reinstate the "processes" plugin for...
details: https://anonhg.NetBSD.org/pkgsrc/rev/a2a5ae0d992e
branches: trunk
changeset: 357411:a2a5ae0d992e
user: he <he%pkgsrc.org@localhost>
date: Thu Jan 19 17:20:42 2017 +0000
description:
Reinstate the "processes" plugin for NetBSD by initializing the
two per-process context switch counters to -1, indicating no support.
Our kinfo_lwp structure doesn't contain the context switch counters,
which in the kernel is part of the lwp structure.
Also make this build on netbsd-6 and on ports which don't yet have
nearbyint() by simply defining it as rint() on NetBSD.
Bump PKGREVISION.
diffstat:
sysutils/collectd/Makefile | 4 +-
sysutils/collectd/distinfo | 7 ++-
sysutils/collectd/options.mk | 6 +-
sysutils/collectd/patches/patch-src_processes.c | 10 ++++-
sysutils/collectd/patches/patch-src_statsd.c | 19 +++++++++++
sysutils/collectd/patches/patch-src_utils__format__kairosdb.c | 5 ++-
6 files changed, 40 insertions(+), 11 deletions(-)
diffs (124 lines):
diff -r 14920c229710 -r a2a5ae0d992e sysutils/collectd/Makefile
--- a/sysutils/collectd/Makefile Thu Jan 19 14:58:33 2017 +0000
+++ b/sysutils/collectd/Makefile Thu Jan 19 17:20:42 2017 +0000
@@ -1,7 +1,9 @@
-# $NetBSD: Makefile,v 1.18 2016/10/13 15:17:28 fhajny Exp $
+# $NetBSD: Makefile,v 1.19 2017/01/19 17:20:42 he Exp $
.include "../../sysutils/collectd/Makefile.common"
+PKGREVISION= 1
+
COMMENT= Statistics collection daemon base
RCD_SCRIPTS= collectd
diff -r 14920c229710 -r a2a5ae0d992e sysutils/collectd/distinfo
--- a/sysutils/collectd/distinfo Thu Jan 19 14:58:33 2017 +0000
+++ b/sysutils/collectd/distinfo Thu Jan 19 17:20:42 2017 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.31 2016/12/24 10:16:07 joerg Exp $
+$NetBSD: distinfo,v 1.32 2017/01/19 17:20:42 he Exp $
SHA1 (collectd-5.6.2.tar.bz2) = 358b53ac5e0b00532d74bd40eb2658c6772d1458
RMD160 (collectd-5.6.2.tar.bz2) = 81818c24db06f7a8922dc24e7be8cbf5d86e050c
@@ -17,8 +17,9 @@
SHA1 (patch-src_libcollectclient_network__buffer.c) = 62924943831e6d0585b103e567888f9af5c46f9e
SHA1 (patch-src_memory.c) = 2934cd50e454fc14d0ec952854c88b0a830fa9a7
SHA1 (patch-src_netstat__udp.c) = 30cb12d25f56c60959658dbd181783212e00cc61
-SHA1 (patch-src_processes.c) = 9a1a7a6943ea05d1a38cedf26e7aab8508df7ff1
+SHA1 (patch-src_processes.c) = dbcbb733b00bd77b0eae6d16f03fb0bcb3cbcbff
+SHA1 (patch-src_statsd.c) = 35f4349d2d2c9bddc0f4770344f969157cd012f6
SHA1 (patch-src_swap.c) = 24da6e04e3006639311e8111f26f72e4fab4054a
SHA1 (patch-src_tcpconns.c) = b85de1d0eb03989df12d9688b38d61733a13c028
SHA1 (patch-src_utils__dns.c) = 138a3168dc109d785412ffd068edab3b4dacca36
-SHA1 (patch-src_utils__format__kairosdb.c) = db5d13e6bbbe5adc07cd8a26ec78902cd3503bec
+SHA1 (patch-src_utils__format__kairosdb.c) = 2f7bde47682d2b877f9bd2d2c794a21c297aa9e5
diff -r 14920c229710 -r a2a5ae0d992e sysutils/collectd/options.mk
--- a/sysutils/collectd/options.mk Thu Jan 19 14:58:33 2017 +0000
+++ b/sysutils/collectd/options.mk Thu Jan 19 17:20:42 2017 +0000
@@ -1,13 +1,13 @@
-# $NetBSD: options.mk,v 1.8 2016/10/13 15:17:28 fhajny Exp $
+# $NetBSD: options.mk,v 1.9 2017/01/19 17:20:42 he Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.collectd
PKG_SUPPORTED_OPTIONS= cpu df interface load memory syslog uptime
PKG_SUGGESTED_OPTIONS+= cpu df interface load memory syslog uptime
PKG_SUPPORTED_OPTIONS.NetBSD+= contextswitch disk entropy irq pf netstat_udp
-PKG_SUPPORTED_OPTIONS.NetBSD+= swap tcpconns users
+PKG_SUPPORTED_OPTIONS.NetBSD+= swap tcpconns users processes
PKG_SUGGESTED_OPTIONS.NetBSD+= contextswitch disk entropy irq pf netstat_udp
-PKG_SUGGESTED_OPTIONS.NetBSD+= swap tcpconns users
+PKG_SUGGESTED_OPTIONS.NetBSD+= swap tcpconns users processes
PKG_SUPPORTED_OPTIONS.FreeBSD+= contextswitch pf processes swap tcpconns zfs-arc
PKG_SUGGESTED_OPTIONS.FreeBSD+= contextswitch pf processes swap tcpconns zfs-arc
diff -r 14920c229710 -r a2a5ae0d992e sysutils/collectd/patches/patch-src_processes.c
--- a/sysutils/collectd/patches/patch-src_processes.c Thu Jan 19 14:58:33 2017 +0000
+++ b/sysutils/collectd/patches/patch-src_processes.c Thu Jan 19 17:20:42 2017 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-src_processes.c,v 1.4 2016/12/07 17:28:39 fhajny Exp $
+$NetBSD: patch-src_processes.c,v 1.5 2017/01/19 17:20:42 he Exp $
Add a port to NetBSD.
---- src/processes.c.orig 2016-11-30 08:52:01.324910450 +0000
+--- src/processes.c.orig 2016-11-30 08:52:01.000000000 +0000
+++ src/processes.c
@@ -95,14 +95,14 @@
/* #endif KERNEL_LINUX */
@@ -63,7 +63,7 @@
#elif HAVE_PROCINFO_H
pagesize = getpagesize();
-@@ -1917,6 +1933,187 @@ static int ps_read(void) {
+@@ -1917,6 +1933,191 @@ static int ps_read(void) {
ps_submit_proc_list(ps_ptr);
/* #endif HAVE_LIBKVM_GETPROCS && HAVE_STRUCT_KINFO_PROC_FREEBSD */
@@ -166,6 +166,10 @@
+ pse.cpu_system = 0;
+ pse.cpu_user_counter = 0;
+ pse.cpu_system_counter = 0;
++ /* context switch counters not implemented */
++ pse.cswitch_vol = -1;
++ pse.cswitch_invol = -1;
++
+ /*
+ * The u-area might be swapped out, and we can't get
+ * at it because we have a crashdump and no swap.
diff -r 14920c229710 -r a2a5ae0d992e sysutils/collectd/patches/patch-src_statsd.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/collectd/patches/patch-src_statsd.c Thu Jan 19 17:20:42 2017 +0000
@@ -0,0 +1,19 @@
+$NetBSD: patch-src_statsd.c,v 1.1 2017/01/19 17:20:42 he Exp $
+
+Insert workaround for possibly missing nearbyint().
+(Could be more specific, but test would be ... complicated.)
+
+--- src/statsd.c.orig 2017-01-19 16:24:15.000000000 +0000
++++ src/statsd.c
+@@ -48,6 +48,11 @@
+ #define STATSD_DEFAULT_SERVICE "8125"
+ #endif
+
++#ifdef __NetBSD__
++/* May not have this, could be more specific... */
++#define nearbyint(v) rint((v))
++#endif
++
+ enum metric_type_e { STATSD_COUNTER, STATSD_TIMER, STATSD_GAUGE, STATSD_SET };
+ typedef enum metric_type_e metric_type_t;
+
diff -r 14920c229710 -r a2a5ae0d992e sysutils/collectd/patches/patch-src_utils__format__kairosdb.c
--- a/sysutils/collectd/patches/patch-src_utils__format__kairosdb.c Thu Jan 19 14:58:33 2017 +0000
+++ b/sysutils/collectd/patches/patch-src_utils__format__kairosdb.c Thu Jan 19 17:20:42 2017 +0000
@@ -1,4 +1,7 @@
-$NetBSD: patch-src_utils__format__kairosdb.c,v 1.3 2016/12/24 10:16:07 joerg Exp $
+$NetBSD: patch-src_utils__format__kairosdb.c,v 1.4 2017/01/19 17:20:42 he Exp $
+
+Cast arguments to isalnum() and tolower() to "unsigned char" to
+squelch warnings.
--- src/utils_format_kairosdb.c.orig 2016-11-30 08:52:01.000000000 +0000
+++ src/utils_format_kairosdb.c
Home |
Main Index |
Thread Index |
Old Index