collectd/collectd — Issue #11: processes plugin ignores processes with whitespace in their name (/proc/<PID>/stat)
Author: octo
Created: 2012-02-19 20:52:11+00:00
State: open

From: Darrell Bishop (Mantis #43)

**Description:** When a process changes its name to include whitespace (eg. a space), the parsing code in `processes.c`, `ps_read_process()`, splits on that whitespace causing subsequent sanity-checks to fail and the process is ignored. Gunicorn does this, for example:

```
$ cat /proc/973/stat
973 (gunicorn: maste) S 967 973 967 ...
```

I have a patch to fix the parsing, but it probably needs some cleanup and more robustness for bogus `/proc//stat` file content.

**Steps to reproduce:** Have a process with a space in its name. Try to match it with Process or ProcessMatch. Written stats will be zero, as if the process (or processes) were not running.

**Additional notes:** This is almost certainly a LInux-only problem (since the file in question is `/proc//stat`).