lh-l4v/misc/autostop
Matthew Fernandez 7e3b35d348 misc/autostop: Teach stop how to send SIGABRT and SIGTERM. 2015-07-02 15:28:14 +10: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/autostop: Teach stop how to send SIGABRT and SIGTERM. 2015-07-02 15:28:14 +10: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.