lh-l4v/misc/autostop
Matthew Fernandez e846657e0f misc: Add options to constrain autostop's bloodthirsty rampage.
Autostop is quite handy for keeping your system under control, but when things
go pear shaped the guidance provided by Linux's OOM score doesn't necessarily
align with what the user cares about. In particular, it can take down parts of
your windowing subsystem or a harmless browser tab going about its business.
This commit adds command line options to give autostop a list of processes
which are the only ones you would like stopped. Existing behaviour remains
unchanged.
2014-12-04 09:50:41 +11:00
..
Makefile Import release snapshot. 2014-07-14 21:32:44 +02:00
README Import release snapshot. 2014-07-14 21:32:44 +02:00
killbig.c Import release snapshot. 2014-07-14 21:32:44 +02:00
stop.c misc: Add options to constrain autostop's bloodthirsty rampage. 2014-12-04 09:50:41 +11:00

README

#
# Copyright 2014, NICTA
#
# This software may be distributed and modified according to the terms of
# the BSD 2-Clause license. Note that NO WARRANTY is provided.
# See "LICENSE_BSD2.txt" for details.
#
# @TAG(NICTA_BSD)
#

Running 64-bit Isabelle is a dangerous task. In particular, it is liable to
suck up all your RAM and send your system into swap-death on quite a regular
basis.

This Linux utility will regularly scan the system for signs of swap-death
(i.e., low memory and high pagefault rate and high load average) and send
SIGSTOP to processes suspected of being the cause.

Compile, and setup the script to run in root's home directory as follows:

    gcc -O2 stop.c -o stop
    sudo mv stop /root

Then add the following line to root's crontab:

    @reboot /root/stop

When it triggers, it will write to syslog stating the process stopped.

Known problems:

    * Chrome is memory hungry, so it will often stop your chrome processes
      prior to Isabelle.

    * Compiz is memory hungry, so it will sometimes stop your compiz process
      before Isabelle.