For some reason the Nagios package in Debian / Ubuntu does not provide a plugin to check the memory consumption so I built a simple script to do that. It ignores swap space (since if your machine starts swapping you’re lost anyway) and caches (it’s nice to have memory available for caches but this isn’t really required). That way only the real memory consumption is checked and if that passes a certain threshold you can rest assured that you’re in for trouble.

(more…)