lh-l4v/misc/autostop
Gerwin Klein 092b1207f7 run astyle on all C files in the repository
Leaves parse tests and generated files unchanged, and provides a style
filter for these.

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-04-19 13:50:17 +08:00
..
Makefile licenses: convert license tags to SPDX 2020-03-13 14:38:24 +08:00
README licenses: convert license tags to SPDX 2020-03-13 14:38:24 +08:00
killbig.c run astyle on all C files in the repository 2020-04-19 13:50:17 +08:00
stop.c run astyle on all C files in the repository 2020-04-19 13:50:17 +08:00

README

<!--
     Copyright 2020, Data61, CSIRO (ABN 41 687 119 230)

     SPDX-License-Identifier: BSD-2-Clause
-->

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.