pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/sysutils/collectd



Module Name:    pkgsrc
Committed By:   he
Date:           Tue Nov 21 16:02:21 UTC 2017

Modified Files:
        pkgsrc/sysutils/collectd: Makefile distinfo options.mk
        pkgsrc/sysutils/collectd/patches: patch-src_processes.c

Log Message:
Adapt and re-enable the process plugin for NetBSD.
Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 pkgsrc/sysutils/collectd/Makefile
cvs rdiff -u -r1.40 -r1.41 pkgsrc/sysutils/collectd/distinfo
cvs rdiff -u -r1.10 -r1.11 pkgsrc/sysutils/collectd/options.mk
cvs rdiff -u -r1.7 -r1.8 \
    pkgsrc/sysutils/collectd/patches/patch-src_processes.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/sysutils/collectd/Makefile
diff -u pkgsrc/sysutils/collectd/Makefile:1.22 pkgsrc/sysutils/collectd/Makefile:1.23
--- pkgsrc/sysutils/collectd/Makefile:1.22      Wed Jun 14 13:42:53 2017
+++ pkgsrc/sysutils/collectd/Makefile   Tue Nov 21 16:02:20 2017
@@ -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

Index: pkgsrc/sysutils/collectd/distinfo
diff -u pkgsrc/sysutils/collectd/distinfo:1.40 pkgsrc/sysutils/collectd/distinfo:1.41
--- pkgsrc/sysutils/collectd/distinfo:1.40      Tue Nov 21 15:18:22 2017
+++ pkgsrc/sysutils/collectd/distinfo   Tue Nov 21 16:02:20 2017
@@ -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
 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

Index: pkgsrc/sysutils/collectd/options.mk
diff -u pkgsrc/sysutils/collectd/options.mk:1.10 pkgsrc/sysutils/collectd/options.mk:1.11
--- pkgsrc/sysutils/collectd/options.mk:1.10    Tue Nov 21 15:18:22 2017
+++ pkgsrc/sysutils/collectd/options.mk Tue Nov 21 16:02:20 2017
@@ -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

Index: pkgsrc/sysutils/collectd/patches/patch-src_processes.c
diff -u pkgsrc/sysutils/collectd/patches/patch-src_processes.c:1.7 pkgsrc/sysutils/collectd/patches/patch-src_processes.c:1.8
--- pkgsrc/sysutils/collectd/patches/patch-src_processes.c:1.7  Fri Jun 23 16:52:45 2017
+++ pkgsrc/sysutils/collectd/patches/patch-src_processes.c      Tue Nov 21 16:02:20 2017
@@ -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)) */
 +



Home | Main Index | Thread Index | Old Index