pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/collectd Update sysutils/collectd to 5.6.2.
details: https://anonhg.NetBSD.org/pkgsrc/rev/1a1dccd24123
branches: trunk
changeset: 355628:1a1dccd24123
user: fhajny <fhajny%pkgsrc.org@localhost>
date: Wed Dec 07 17:28:39 2016 +0000
description:
Update sysutils/collectd to 5.6.2.
Most of the NetBSD specific patches were re-applied due to code
syntax changes.
Upstream changes in 5.6.2:
- collectd: A compile error on AIX has been fixed: "MSG_DONTWAIT" is not
available on AIX.
- collectd: The capability checking has been rewritten to be more
portable.
- collectd.conf(5): Various typos have been fixed.
- collectd-tg: Incorrect usage of "nanosleep()" has been fixed which
caused the tool to sleep (almost) indefinitely.
- Build system: Detection of the Java environment has been made
deterministic to allow for reproducible builds.
- Build system: Detection of the Lua headers has been improved.
- APC UPS plugin: Unavailable metrics are now skipped instead of
reported as 0 (zero).
- Modbus plugin: Build issues on FreeBSD have been fixed.
- OpenVPN plugin: Gracefully handle empty configurations.
- PowerDNS plugin: The "recursor command" has been fixed so PowerDNS can
correctly parse all requested fields.
- Write Graphite and AMQP plugins: A bug that could lead to a missing
null-termination has been fixed.
- Write HTTP plugin: A logic error when checking the correctness of the
data set has been fixed.
- Write Kafka plugin: The "Key Random" config option has been fixed.
- Write Kafka plugin: Support for librdkafka 0.9.0 has been added.
- Write Riemann plugin: Build issues on Solaris have been fixed.
- ZFS ARC plugin: A duplicate metric has been removed.
diffstat:
sysutils/collectd/Makefile.common | 4 +-
sysutils/collectd/distinfo | 34 +-
sysutils/collectd/patches/patch-src_cpu.c | 68 +-
sysutils/collectd/patches/patch-src_df.c | 10 +-
sysutils/collectd/patches/patch-src_disk.c | 297 +++---
sysutils/collectd/patches/patch-src_entropy.c | 107 +-
sysutils/collectd/patches/patch-src_irq.c | 114 +-
sysutils/collectd/patches/patch-src_libcollectclient_network__buffer.c | 20 +-
sysutils/collectd/patches/patch-src_memory.c | 110 +-
sysutils/collectd/patches/patch-src_processes.c | 396 +++++----
sysutils/collectd/patches/patch-src_swap.c | 175 ++--
sysutils/collectd/patches/patch-src_tcpconns.c | 22 +-
sysutils/collectd/patches/patch-src_utils__dns.c | 8 +-
sysutils/collectd/patches/patch-src_utils__format__kairosdb.c | 26 +-
14 files changed, 699 insertions(+), 692 deletions(-)
diffs (truncated from 1823 to 300 lines):
diff -r 94c2d3f3d5a3 -r 1a1dccd24123 sysutils/collectd/Makefile.common
--- a/sysutils/collectd/Makefile.common Wed Dec 07 12:56:19 2016 +0000
+++ b/sysutils/collectd/Makefile.common Wed Dec 07 17:28:39 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.12 2016/10/13 15:17:28 fhajny Exp $
+# $NetBSD: Makefile.common,v 1.13 2016/12/07 17:28:39 fhajny Exp $
#
# used by sysutils/collectd/Makefile
# used by sysutils/collectd-amqp/Makefile
@@ -16,7 +16,7 @@
# used by sysutils/p5-collectd/Makefile
# used by sysutils/py-collectd/Makefile
-DISTNAME= collectd-5.6.1
+DISTNAME= collectd-5.6.2
MASTER_SITES= http://collectd.org/files/
CATEGORIES= sysutils
EXTRACT_SUFX= .tar.bz2
diff -r 94c2d3f3d5a3 -r 1a1dccd24123 sysutils/collectd/distinfo
--- a/sysutils/collectd/distinfo Wed Dec 07 12:56:19 2016 +0000
+++ b/sysutils/collectd/distinfo Wed Dec 07 17:28:39 2016 +0000
@@ -1,24 +1,24 @@
-$NetBSD: distinfo,v 1.29 2016/11/20 22:11:28 joerg Exp $
+$NetBSD: distinfo,v 1.30 2016/12/07 17:28:39 fhajny Exp $
-SHA1 (collectd-5.6.1.tar.bz2) = 20b773928743b346e0962fc1dc37167390a16d80
-RMD160 (collectd-5.6.1.tar.bz2) = 5247f6b4a0936ac9715189e16afe6f65bee94788
-SHA512 (collectd-5.6.1.tar.bz2) = da25f1a9cbaf47533f5a4d2f5f78b966317d4f21865c5a714954ad9d7d02b4798a3e0471ce52199dc80e01dc2808376cb10a7e19c402aafc984bf595f09951a6
-Size (collectd-5.6.1.tar.bz2) = 1903962 bytes
+SHA1 (collectd-5.6.2.tar.bz2) = 358b53ac5e0b00532d74bd40eb2658c6772d1458
+RMD160 (collectd-5.6.2.tar.bz2) = 81818c24db06f7a8922dc24e7be8cbf5d86e050c
+SHA512 (collectd-5.6.2.tar.bz2) = 81438e2e653649cf8a447f475b41844b7adb8ec436b43fb395ba9cf8b09b56a068633fe4b6c802d5cde3909d85a3af2542f5804005b3843f7936a37553911d61
+Size (collectd-5.6.2.tar.bz2) = 1806969 bytes
SHA1 (patch-Makefile.am) = ed45b75293a4ea2dd577d04eeb3b9017b8f47319
SHA1 (patch-configure.ac) = f450d6b00e5c7c37214b4d90ca057c515ed08fa1
SHA1 (patch-src_Makefile.am) = 1d5cc2f58ce776df04feab2afc937f12ee7b0765
SHA1 (patch-src_collectd.conf.in) = f0b35085cf0ddfd766e140b145177ab1f1326f5f
-SHA1 (patch-src_cpu.c) = 32af60d7e49edf9d16481b705bc1ea429c90c82b
+SHA1 (patch-src_cpu.c) = e645ae6b05c051c3c878f88a493fbbd7d548bb66
SHA1 (patch-src_daemon_Makefile.am) = e38d465faf8bdd750fd9cb7f0bd9f041fcc8f83c
-SHA1 (patch-src_df.c) = 7e75dfbc72ecad48eb0eb7427a19329daf6b9a60
-SHA1 (patch-src_disk.c) = 159862e8ca1e841e3c4013c03ba03f059fdbbab5
-SHA1 (patch-src_entropy.c) = 4fa683654936f57fb7366faebb93d572af08db9c
-SHA1 (patch-src_irq.c) = 6e414b6fd664e784edd5aa9f907c8cfa80a0cd48
-SHA1 (patch-src_libcollectclient_network__buffer.c) = 76c94284b4078259985b70168342ac306b4505b7
-SHA1 (patch-src_memory.c) = b15225915ff23beed0b75c45be2eb3940d3717fd
+SHA1 (patch-src_df.c) = 5c6549cd9ec72efed5cdb7d8dd9297c50491426e
+SHA1 (patch-src_disk.c) = 1d458db9753be9c8ad1ae5edb3468acf7419a66b
+SHA1 (patch-src_entropy.c) = 86e4a1a2160ae5967c8a6d242aefcc298eeb8cbf
+SHA1 (patch-src_irq.c) = 78f1757ff2ed6db9fb1d0e773c2a01eb190d53a0
+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) = e00d2edf6b4e6bfe3663e34fffb05f40652affe5
-SHA1 (patch-src_swap.c) = 304a25324099495fb875127221ed5fc95173a164
-SHA1 (patch-src_tcpconns.c) = 712af1b821d62217283df884dd283d5b1218ab7c
-SHA1 (patch-src_utils__dns.c) = c3782dc9127f42da30e3142b853aa2cb2259af94
-SHA1 (patch-src_utils__format__kairosdb.c) = 4fd05adcf0bf47ed94ce60aad5d7332279b06224
+SHA1 (patch-src_processes.c) = 9a1a7a6943ea05d1a38cedf26e7aab8508df7ff1
+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) = 1b82ee092f8188a27645bcd67c811f0d31d54b70
diff -r 94c2d3f3d5a3 -r 1a1dccd24123 sysutils/collectd/patches/patch-src_cpu.c
--- a/sysutils/collectd/patches/patch-src_cpu.c Wed Dec 07 12:56:19 2016 +0000
+++ b/sysutils/collectd/patches/patch-src_cpu.c Wed Dec 07 17:28:39 2016 +0000
@@ -1,50 +1,48 @@
-$NetBSD: patch-src_cpu.c,v 1.2 2016/10/13 15:17:28 fhajny Exp $
+$NetBSD: patch-src_cpu.c,v 1.3 2016/12/07 17:28:39 fhajny Exp $
Port this too to NetBSD.
---- src/cpu.c.orig 2016-09-11 08:10:25.255038733 +0000
+--- src/cpu.c.orig 2016-11-30 08:52:01.308911943 +0000
+++ src/cpu.c
-@@ -80,7 +80,9 @@
+@@ -81,7 +81,7 @@
#if HAVE_SYSCTL
- # if defined(CTL_HW) && defined(HW_NCPU) \
-- && defined(CTL_KERN) && defined(KERN_CPTIME) && defined(CPUSTATES)
-+ && defined(CTL_KERN) \
-+ && (defined(KERN_CPTIME) || defined(KERN_CP_TIME)) \
-+ && defined(CPUSTATES)
- # define CAN_USE_SYSCTL 1
- # else
- # define CAN_USE_SYSCTL 0
-@@ -696,6 +698,24 @@ static int cpu_read (void)
+ #if defined(CTL_HW) && defined(HW_NCPU) && defined(CTL_KERN) && \
+- defined(KERN_CPTIME) && defined(CPUSTATES)
++ (defined(KERN_CPTIME) || defined(KERN_CP_TIME)) && defined(CPUSTATES)
+ #define CAN_USE_SYSCTL 1
+ #else
+ #define CAN_USE_SYSCTL 0
+@@ -673,6 +673,24 @@ static int cpu_read(void) {
- memset (cpuinfo, 0, sizeof (cpuinfo));
+ memset(cpuinfo, 0, sizeof(cpuinfo));
+#if defined(KERN_CP_TIME) && defined(KERNEL_NETBSD)
-+ {
-+ int mib[] = {CTL_KERN, KERN_CP_TIME};
++ {
++ int mib[] = {CTL_KERN, KERN_CP_TIME};
+
-+ cpuinfo_size = sizeof(cpuinfo[0]) * numcpu * CPUSTATES;
-+ status = sysctl(mib, 2, cpuinfo, &cpuinfo_size, NULL, 0);
-+ if (status == -1) {
-+ char errbuf[1024];
++ cpuinfo_size = sizeof(cpuinfo[0]) * numcpu * CPUSTATES;
++ status = sysctl(mib, 2, cpuinfo, &cpuinfo_size, NULL, 0);
++ if (status == -1) {
++ char errbuf[1024];
+
-+ ERROR ("cpu plugin: sysctl failed: %s.",
-+ sstrerror (errno, errbuf, sizeof (errbuf)));
-+ return -1;
-+ }
-+ if (cpuinfo_size == (sizeof(cpuinfo[0]) * CPUSTATES)) {
-+ numcpu = 1;
-+ }
-+ }
++ ERROR ("cpu plugin: sysctl failed: %s.",
++ sstrerror (errno, errbuf, sizeof (errbuf)));
++ return -1;
++ }
++ if (cpuinfo_size == (sizeof(cpuinfo[0]) * CPUSTATES)) {
++ numcpu = 1;
++ }
++ }
+#else /* defined(KERN_CP_TIME) && defined(KERNEL_NETBSD) */
#if defined(KERN_CPTIME2)
- if (numcpu > 1) {
- for (int i = 0; i < numcpu; i++) {
-@@ -735,6 +755,7 @@ static int cpu_read (void)
- cpuinfo[0][i] = cpuinfo_tmp[i];
- }
- }
+ if (numcpu > 1) {
+ for (int i = 0; i < numcpu; i++) {
+@@ -710,6 +728,7 @@ static int cpu_read(void) {
+ cpuinfo[0][i] = cpuinfo_tmp[i];
+ }
+ }
+#endif /* defined(KERN_CP_TIME) && defined(KERNEL_NETBSD) */
- for (int i = 0; i < numcpu; i++) {
- cpu_stage (i, COLLECTD_CPU_STATE_USER, (derive_t) cpuinfo[i][CP_USER], now);
+ for (int i = 0; i < numcpu; i++) {
+ cpu_stage(i, COLLECTD_CPU_STATE_USER, (derive_t)cpuinfo[i][CP_USER], now);
diff -r 94c2d3f3d5a3 -r 1a1dccd24123 sysutils/collectd/patches/patch-src_df.c
--- a/sysutils/collectd/patches/patch-src_df.c Wed Dec 07 12:56:19 2016 +0000
+++ b/sysutils/collectd/patches/patch-src_df.c Wed Dec 07 17:28:39 2016 +0000
@@ -1,12 +1,12 @@
-$NetBSD: patch-src_df.c,v 1.4 2015/08/18 07:52:20 he Exp $
+$NetBSD: patch-src_df.c,v 1.5 2016/12/07 17:28:39 fhajny Exp $
Older NetBSD doesn't have float_t.
---- src/df.c.orig 2015-03-10 14:14:45.000000000 +0000
+--- src/df.c.orig 2016-11-30 08:52:01.312911569 +0000
+++ src/df.c
@@ -28,6 +28,14 @@
+ #include "utils_ignorelist.h"
#include "utils_mount.h"
- #include "utils_ignorelist.h"
+#if defined(__NetBSD__)
+#include <sys/param.h>
@@ -17,5 +17,5 @@
+#endif
+
#if HAVE_STATVFS
- # if HAVE_SYS_STATVFS_H
- # include <sys/statvfs.h>
+ #if HAVE_SYS_STATVFS_H
+ #include <sys/statvfs.h>
diff -r 94c2d3f3d5a3 -r 1a1dccd24123 sysutils/collectd/patches/patch-src_disk.c
--- a/sysutils/collectd/patches/patch-src_disk.c Wed Dec 07 12:56:19 2016 +0000
+++ b/sysutils/collectd/patches/patch-src_disk.c Wed Dec 07 17:28:39 2016 +0000
@@ -1,10 +1,10 @@
-$NetBSD: patch-src_disk.c,v 1.1 2015/08/11 13:19:21 he Exp $
+$NetBSD: patch-src_disk.c,v 1.2 2016/12/07 17:28:39 fhajny Exp $
Provide a port to NetBSD.
---- src/disk.c.orig 2015-03-10 14:14:45.000000000 +0000
+--- src/disk.c.orig 2016-11-30 08:52:01.312911569 +0000
+++ src/disk.c
-@@ -124,6 +124,35 @@ static int numdisk;
+@@ -135,6 +135,35 @@ static int numdisk;
static int pnumdisk;
/* #endif HAVE_PERFSTAT */
@@ -14,21 +14,21 @@
+#include <sys/iostat.h>
+
+typedef struct diskstats {
-+ char *name;
++ char *name;
+
-+ u_int poll_count;
++ u_int poll_count;
+
-+ derive_t read_ops;
-+ derive_t write_ops;
++ derive_t read_ops;
++ derive_t write_ops;
+
-+ derive_t read_bytes;
-+ derive_t write_bytes;
++ derive_t read_bytes;
++ derive_t write_bytes;
+
-+ derive_t avg_io_time;
++ derive_t avg_io_time;
+
-+ struct io_sysctl stats;
++ struct io_sysctl stats;
+
-+ struct diskstats *next;
++ struct diskstats *next;
+} diskstats_t;
+
+static diskstats_t *disklist;
@@ -38,172 +38,171 @@
+/* #endif HAVE_SYSCTL && KERNEL_NETBSD */
+
#else
- # error "No applicable input method."
+ #error "No applicable input method."
#endif
-@@ -241,7 +270,34 @@ static int disk_init (void)
- continue;
- ksp[numdisk++] = ksp_chain;
- }
+@@ -253,7 +282,33 @@ static int disk_init(void) {
+ continue;
+ ksp[numdisk++] = ksp_chain;
+ }
-#endif /* HAVE_LIBKSTAT */
+/* #endif HAVE_LIBKSTAT */
+
+#elif HAVE_SYSCTL && KERNEL_NETBSD
-+ int mib[3];
-+ size_t size;
++ int mib[3];
++ size_t size;
+
-+ /* figure out number of drives */
-+ mib[0] = CTL_HW;
-+ mib[1] = HW_IOSTATS;
-+ mib[2] = sizeof(struct io_sysctl);
-+ if (sysctl(mib, 3, NULL, &size, NULL, 0) == -1) {
-+ ERROR ("disk plugin: sysctl for ndrives failed");
-+ return -1;
-+ }
-+ ndrive = size / sizeof(struct io_sysctl);
++ /* figure out number of drives */
++ mib[0] = CTL_HW;
++ mib[1] = HW_IOSTATS;
++ mib[2] = sizeof(struct io_sysctl);
++ if (sysctl(mib, 3, NULL, &size, NULL, 0) == -1) {
++ ERROR ("disk plugin: sysctl for ndrives failed");
++ return -1;
++ }
++ ndrive = size / sizeof(struct io_sysctl);
+
-+ if (size == 0 ) {
-+ ERROR ("disk plugin: no drives found");
-+ return -1;
-+ }
-+ drives = (struct io_sysctl *)malloc(size);
-+ if (drives == NULL) {
-+ ERROR ("disk plugin: memory allocation failure");
-+ return -1;
-+ }
++ if (size == 0 ) {
++ ERROR ("disk plugin: no drives found");
++ return -1;
++ }
++ drives = (struct io_sysctl *)malloc(size);
++ if (drives == NULL) {
++ ERROR ("disk plugin: memory allocation failure");
++ return -1;
++ }
+
-+#endif /* HAVE_SYSCTL && KERNEL_NETBSD */
-+
++#endif /* HAVE_SYSCTL && KERNEL_NETBSD */
- return (0);
+ return (0);
} /* int disk_init */
-@@ -929,7 +985,129 @@ static int disk_read (void)
- write_time *= ((double)(_system_configuration.Xint)/(double)(_system_configuration.Xfrac)) / 1000000.0;
- disk_submit (stat_disk[i].name, "disk_time", read_time, write_time);
- }
+@@ -1026,7 +1081,129 @@ static int disk_read(void) {
+ 1000000.0;
Home |
Main Index |
Thread Index |
Old Index