From c55f7ac65c20966b486fdc24dd29678109a73383 Mon Sep 17 00:00:00 2001 From: landry Date: Mon, 12 Dec 2016 17:55:24 +0000 Subject: [PATCH] Ugly bandaid: bump CMDLINE_BUFFER_SIZE to 16k instead of defaulting to 4k, i'm hitting "processes plugin: Command line did not fit into buffer." warning way too much and this spams logs. Better solution would be to dynamically alloc the array on the fly as-needed like top/ps does.. --- sysutils/collectd/Makefile | 4 ++-- sysutils/collectd/patches/patch-src_processes_c | 13 +++++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/sysutils/collectd/Makefile b/sysutils/collectd/Makefile index 12fb5a2aeb6..d41c43167e8 100644 --- a/sysutils/collectd/Makefile +++ b/sysutils/collectd/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.43 2016/12/04 16:56:53 jca Exp $ +# $OpenBSD: Makefile,v 1.44 2016/12/12 17:55:24 landry Exp $ COMMENT-main = system metrics collection engine COMMENT-mysql = collectd mysql plugin @@ -11,7 +11,7 @@ COMMENT-memcachec = collectd memcachec plugin COMMENT-nut = collectd nut plugin COMMENT-riemann = collectd riemann plugin -REVISION-main = 0 +REVISION-main = 1 V = 5.6.2 DISTNAME = collectd-$V PKGNAME-main = collectd-$V diff --git a/sysutils/collectd/patches/patch-src_processes_c b/sysutils/collectd/patches/patch-src_processes_c index 983af51adc9..3a45407efdb 100644 --- a/sysutils/collectd/patches/patch-src_processes_c +++ b/sysutils/collectd/patches/patch-src_processes_c @@ -1,10 +1,19 @@ -$OpenBSD: patch-src_processes_c,v 1.8 2016/12/08 10:06:42 landry Exp $ +$OpenBSD: patch-src_processes_c,v 1.9 2016/12/12 17:55:24 landry Exp $ https://github.com/collectd/collectd/issues/2061 https://github.com/collectd/collectd/pull/2088 --- src/processes.c.orig Wed Nov 30 09:52:01 2016 -+++ src/processes.c Sun Dec 4 16:22:15 2016 ++++ src/processes.c Mon Dec 12 18:52:34 2016 +@@ -155,7 +155,7 @@ + #if defined(ARG_MAX) && (ARG_MAX < 4096) + #define CMDLINE_BUFFER_SIZE ARG_MAX + #else +-#define CMDLINE_BUFFER_SIZE 4096 ++#define CMDLINE_BUFFER_SIZE 4*4096 + #endif + #endif + @@ -1937,7 +1937,7 @@ static int ps_read(void) { ps_list_reset();