Disable kernel core writing if available disk is < 10%
authorTim Pepper <timothy.c.pepper@linux.intel.com>
Tue, 16 Oct 2012 16:04:47 +0000 (09:04 -0700)
committerTim Pepper <timothy.c.pepper@linux.intel.com>
Tue, 16 Oct 2012 16:04:47 +0000 (09:04 -0700)
commit31860d273f7be2b762453bdae96594d55e47dad3
tree12c74a7834d72f663be319082429f83f5443ed12
parentccc5fb7c4844f4f58dcd5690faddbce249063250
Disable kernel core writing if available disk is < 10%

In an attempt to be more system friendly, corewatcher will disable its
kernel core_pattern if the core_folder's available disk drops below 10%.
It will reenable when disk availability comes back up about 12%.

This code runs at corewatcher's start and at the poll interval (currently
15 minutes).

Someday the core_pattern might be namespaced, but currently there is a
single linux kernel / system global core_pattern.  Only one core watching
type program can own it, with the obvious potential for conflict/confusion
if multiple daemons are writing a pattern there and expecting cores in
the denoted location/form.

Signed-off-by: Tim Pepper <timothy.c.pepper@linux.intel.com>
src/coredump.c