node package manager
We need your input. Help make JavaScript better: Take the 2017 JavaScript Ecosystem survey »



Kill runaway CPU hogging process. Checks the system every minute, and if uptime reports > .90 CPU in last minute, kills the highest CPU process.


$ npm runaway -g
$ runaway


$ npm runaway
$ node runaway &


Check every n minutes instead of 2

$ checkevery=10 node runaway &

Show all details to console.log

$ debug=1 node runaway &

Write all details to log.txt file

$ debug=1 node runaway & > log.txt


Runaway uses nodejs, no additional modules, and system commands uptime, and ps, standard Linux/Unix biz, but doesn't work on Windows.

$ node badprocess

Is an infinite loop and simulates a process gone wrong. If you run it, then run runaway, after about a minute or so, runaway should catch it and kill badprocess.

BEWARE - badprocess spins up a CPU core to the max, so be careful on important or shared systems!