summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bb978c1)
raw | patch | inline | side by side (parent: bb978c1)
author | Marc Fournier <marc.fournier@camptocamp.com> | |
Tue, 12 Jan 2016 21:21:39 +0000 (22:21 +0100) | ||
committer | Marc Fournier <marc.fournier@camptocamp.com> | |
Tue, 9 Feb 2016 20:40:47 +0000 (21:40 +0100) |
Fixes #1284
src/collectd.conf.pod | patch | blob | history | |
src/processes.c | patch | blob | history |
diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod
index d856d21cab7c7f90d524a734426580daec39bab2..3b7b9e6495d4f91ea716387d07a1581259ed0e12 100644 (file)
--- a/src/collectd.conf.pod
+++ b/src/collectd.conf.pod
(RSS), user- and system-time used, number of processes and number of threads,
io data (where available) and minor and major pagefaults.
+Some platforms have a limit on the length of process names. I<Name> must stay
+below this limit.
+
=item B<ProcessMatch> I<name> I<regex>
Similar to the B<Process> option this allows to select more detailed
diff --git a/src/processes.c b/src/processes.c
index 8648614752a301e417f05ea40adf8e5cb1354e96..b77751549d9d31e96a86569ad48b360326d02109 100644 (file)
--- a/src/processes.c
+++ b/src/processes.c
{
int i;
+#if KERNEL_LINUX
+ const size_t max_procname_len = 15;
+#endif
+
for (i = 0; i < ci->children_num; ++i) {
oconfig_item_t *c = ci->children + i;
c->children_num, c->values[0].value.string);
}
+#if KERNEL_LINUX
+ if (strlen (c->values[0].value.string) > max_procname_len) {
+ WARNING ("processes plugin: this platform has a %lu character limit "
+ "to process names. The `Process \"%s\"' option will "
+ "not work as expected.",
+ max_procname_len, c->values[0].value.string);
+ }
+#endif
+
ps_list_register (c->values[0].value.string, NULL);
}
else if (strcasecmp (c->key, "ProcessMatch") == 0)