I'm trying to diagnose occasional spikes in memory usage on a Linux server. If the spikes are high enough the OOM Killer kicks in, which results in /var/log/messages containing a useful dump of the process list at the time.
However, I'm also experiencing spikes that aren't severe enough to cause the OOM Killer to kick in, but are still enough to cause heavy swap usage. Any way to automatically log the process table during such periods?