From: Marc Fournier Date: Thu, 21 Jan 2016 14:45:51 +0000 (+0100) Subject: processes: also warn about long process names on Solaris X-Git-Tag: collectd-5.5.2~6^2~10^2~1 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=fa517c8d3f561bd65c2c3281ff631101444a1570;p=collectd.git processes: also warn about long process names on Solaris --- diff --git a/src/processes.c b/src/processes.c index 2c6afc29..7804f7b8 100644 --- a/src/processes.c +++ b/src/processes.c @@ -128,6 +128,7 @@ # undef SAVE_FOB_64 #endif +# include # include /* #endif KERNEL_SOLARIS */ @@ -548,6 +549,8 @@ static int ps_config (oconfig_item_t *ci) #if KERNEL_LINUX const size_t max_procname_len = 15; +#elif KERNEL_SOLARIS + const size_t max_procname_len = MAXCOMLEN -1; #endif for (i = 0; i < ci->children_num; ++i) { @@ -570,7 +573,7 @@ static int ps_config (oconfig_item_t *ci) c->children_num, c->values[0].value.string); } -#if KERNEL_LINUX +#if KERNEL_LINUX || KERNEL_SOLARIS if (strlen (c->values[0].value.string) > max_procname_len) { WARNING ("processes plugin: this platform has a %zu character limit " "to process names. The `Process \"%s\"' option will "