projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
339f53c
)
processes: also warn about long process names on Solaris
author
Marc Fournier
<marc.fournier@camptocamp.com>
Thu, 21 Jan 2016 14:45:51 +0000
(15:45 +0100)
committer
Marc Fournier
<marc.fournier@camptocamp.com>
Tue, 9 Feb 2016 20:40:47 +0000
(21:40 +0100)
src/processes.c
patch
|
blob
|
history
diff --git
a/src/processes.c
b/src/processes.c
index
2c6afc2
..
7804f7b
100644
(file)
--- a/
src/processes.c
+++ b/
src/processes.c
@@
-128,6
+128,7
@@
# undef SAVE_FOB_64
#endif
# undef SAVE_FOB_64
#endif
+# include <sys/user.h>
# include <dirent.h>
/* #endif KERNEL_SOLARIS */
# include <dirent.h>
/* #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;
#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) {
#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);
}
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 "
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 "