First of all; If you’re not familiar with Munin, and need to do monitoring (especially of hosts running Linux or any type of Unix), I recommend you check it out.
So, I’ve been pondering if there’s any plugins for Munin which monitors information of named processes. It seems that the only ones I could find, monitored the process count – which is fair enough, but we can do so much more, such as counting threads, memory usage, CPU usage, context switches, to name some things. If we have a server running five different services, and notice that it runs out of memory, you can easier figure out which service is the one leaking if you have historical graphs available, for instance.
You can achieve this by parsing the /proc-filesystem. A simple “grep processname /proc/*/stat” should give you a bunch of values which you can parse and use. Nice documentation of what the different values means are in the proc(5) man-file. And this is what I do.
You can get the plugin from muninexchange, or from my munin-plugins repository on github. Please note that the plugin hasn’t been thoroughly tested in a production environment, but I’m quite happy with what I can get so far







