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..
This commit is contained in:
landry 2016-12-12 17:55:24 +00:00
parent cb8fdf5d6d
commit c55f7ac65c
2 changed files with 13 additions and 4 deletions

View File

@ -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

View File

@ -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();