Stop most hogging CPU process when CPUs are pegged
npm install runaway
|16||downloads in the last month|
|Version||0.1.3 last updated 9 months ago|
|Keywords||util, nodejs, express, web, html5|
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!