First page Back Continue Last page Overview Graphics
Meet The Reaper
“The Reaper” keeps logs that were only intended to be human parsable.
Eventually, we needed to parse those logs automatically.
Notes:
The reaper is a script we use at pair to monitor and then renice or terminate processes that exceed certain resource usage boundaries.
It builds really long log lines like this:
Sat Apr 17 13:31:33 EDT 2004 :: (Long-running process) NICE 20: USER ehdonhon, CMD '/usr/local/bin/perl ./score.pl -b -t 0.5'/'perl'
Sat Apr 17 13:32:03 EDT 2004 :: (Long-running runaway) KILL -9: PID 13378, USER ehdonhon, CMD '/usr/local/bin/perl ./score.pl -b -t 0.5'/'perl'
Sat Apr 17 13:49:34 EDT 2004 :: (Common mail command) NICE 20: USER mattr, CMD '/bin/sh -c preline /usr/local/bin/procmail'/'sh'