diff options
author | he <he@pkgsrc.org> | 2017-11-21 16:02:20 +0000 |
---|---|---|
committer | he <he@pkgsrc.org> | 2017-11-21 16:02:20 +0000 |
commit | df26e33c617f3467ed00fc069c8f7c56bebc69dd (patch) | |
tree | c1df9bd7448c17db9568457ed8f787310d6ea29b /sysutils/collectd | |
parent | 1936587dd7cf8ea0b374bfe08759775a52218dca (diff) | |
download | pkgsrc-df26e33c617f3467ed00fc069c8f7c56bebc69dd.tar.gz |
Adapt and re-enable the process plugin for NetBSD.
Bump PKGREVISION.
Diffstat (limited to 'sysutils/collectd')
-rw-r--r-- | sysutils/collectd/Makefile | 4 | ||||
-rw-r--r-- | sysutils/collectd/distinfo | 4 | ||||
-rw-r--r-- | sysutils/collectd/options.mk | 6 | ||||
-rw-r--r-- | sysutils/collectd/patches/patch-src_processes.c | 24 |
4 files changed, 25 insertions, 13 deletions
diff --git a/sysutils/collectd/Makefile b/sysutils/collectd/Makefile index f80ad7ad4c2..d5bf67bf507 100644 --- a/sysutils/collectd/Makefile +++ b/sysutils/collectd/Makefile @@ -1,7 +1,9 @@ -# $NetBSD: Makefile,v 1.22 2017/06/14 13:42:53 fhajny Exp $ +# $NetBSD: Makefile,v 1.23 2017/11/21 16:02:20 he Exp $ .include "../../sysutils/collectd/Makefile.common" +PKGREVISION= 1 + COMMENT= Statistics collection daemon base RCD_SCRIPTS= collectd diff --git a/sysutils/collectd/distinfo b/sysutils/collectd/distinfo index 7a359e97cac..2153fff345f 100644 --- a/sysutils/collectd/distinfo +++ b/sysutils/collectd/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.40 2017/11/21 15:18:22 fhajny Exp $ +$NetBSD: distinfo,v 1.41 2017/11/21 16:02:20 he Exp $ SHA1 (collectd-5.8.0.tar.bz2) = eb3567563de471e1950b7388e8883b911be3756a RMD160 (collectd-5.8.0.tar.bz2) = 7b812b1046d57a9047213bb182b8744d98606547 @@ -18,7 +18,7 @@ SHA1 (patch-src_libcollectclient_network__buffer.c) = a19e1658017279c35fd9860e2a SHA1 (patch-src_lua.c) = 656934889976f489abb80a8244492f845a3bd9f8 SHA1 (patch-src_memory.c) = 3276b09d0c09e0a9446519bd6c304d95c30b617a SHA1 (patch-src_netstat__udp.c) = 30cb12d25f56c60959658dbd181783212e00cc61 -SHA1 (patch-src_processes.c) = 3dd8510bfd0d25051f30519f62d638536c45a6e2 +SHA1 (patch-src_processes.c) = a22b1e9d7935c7924b65c57990b4212990acc6b7 SHA1 (patch-src_statsd.c) = 35f4349d2d2c9bddc0f4770344f969157cd012f6 SHA1 (patch-src_swap.c) = 98984dc7c6eee4f17b2f291124431172b06aa6c2 SHA1 (patch-src_tcpconns.c) = 0469ffe477ae96a79e4fd28c4428a1e7682e9461 diff --git a/sysutils/collectd/options.mk b/sysutils/collectd/options.mk index 30757ac703f..e43564771f7 100644 --- a/sysutils/collectd/options.mk +++ b/sysutils/collectd/options.mk @@ -1,13 +1,13 @@ -# $NetBSD: options.mk,v 1.10 2017/11/21 15:18:22 fhajny Exp $ +# $NetBSD: options.mk,v 1.11 2017/11/21 16:02:20 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 # processes +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 # processes +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 --git a/sysutils/collectd/patches/patch-src_processes.c b/sysutils/collectd/patches/patch-src_processes.c index 0272e8a0cbe..a61690e77e3 100644 --- a/sysutils/collectd/patches/patch-src_processes.c +++ b/sysutils/collectd/patches/patch-src_processes.c @@ -1,10 +1,10 @@ -$NetBSD: patch-src_processes.c,v 1.7 2017/06/23 16:52:45 kamil Exp $ +$NetBSD: patch-src_processes.c,v 1.8 2017/11/21 16:02:20 he Exp $ Add a port to NetBSD. --- src/processes.c.orig 2017-06-06 18:13:54.693164693 +0000 +++ src/processes.c -@@ -95,14 +95,16 @@ +@@ -97,14 +97,16 @@ /* #endif KERNEL_LINUX */ #elif HAVE_LIBKVM_GETPROCS && \ @@ -23,7 +23,7 @@ Add a port to NetBSD. #elif HAVE_PROCINFO_H #include <procinfo.h> -@@ -244,10 +246,15 @@ static void ps_fill_details(const procst +@@ -286,10 +288,15 @@ static void ps_fill_details(const procst /* #endif KERNEL_LINUX */ #elif HAVE_LIBKVM_GETPROCS && \ @@ -41,7 +41,7 @@ Add a port to NetBSD. #elif HAVE_PROCINFO_H static struct procentry64 procentry[MAXPROCENTRY]; -@@ -601,10 +608,21 @@ static int ps_init(void) { +@@ -673,10 +680,21 @@ static int ps_init(void) { /* #endif KERNEL_LINUX */ #elif HAVE_LIBKVM_GETPROCS && \ @@ -65,7 +65,7 @@ Add a port to NetBSD. #elif HAVE_PROCINFO_H pagesize = getpagesize(); -@@ -1896,6 +1914,187 @@ static int ps_read(void) { +@@ -2074,6 +2092,197 @@ static int ps_read(void) { ps_submit_proc_list(ps_ptr); /* #endif HAVE_LIBKVM_GETPROCS && HAVE_STRUCT_KINFO_PROC_FREEBSD */ @@ -89,7 +89,7 @@ Add a port to NetBSD. + struct kinfo_lwp *kl; + + procstat_t *ps_ptr; -+ procstat_entry_t pse; ++ process_entry_t pse; + + ps_list_reset (); + @@ -148,8 +148,8 @@ Add a port to NetBSD. + } + } /* if (process has argument list) */ + ++ memset(&pse, 0, sizeof(pse)); + pse.id = procs[i].p_pid; -+ pse.age = 0; + + pse.num_proc = 1; + pse.num_lwp = procs[i].p_nlwps; @@ -188,6 +188,16 @@ Add a port to NetBSD. + pse.io_syscr = procs[i].p_uru_inblock; + pse.io_syscw = procs[i].p_uru_oublock; + ++ /* file descriptor count not implemented */ ++ pse.num_fd = 0; ++ ++ /* Number of memory mappings */ ++ pse.num_maps = 0; ++ ++ /* context switch counters not implemented */ ++ pse.cswitch_vol = -1; ++ pse.cswitch_invol = -1; ++ + ps_list_add (procs[i].p_comm, have_cmdline ? cmdline : NULL, &pse); + } /* if ((proc_ptr == NULL) || (proc_ptr->ki_pid != procs[i].ki_pid)) */ + |