runaway

0.1.3 • Public • Published

runaway

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

Global

$ npm runaway -g
$ runaway

Local

$ npm runaway
$ node runaway &

Options

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

Testing

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!

Readme

Keywords

none

Package Sidebar

Install

npm i runaway

Weekly Downloads

1

Version

0.1.3

License

none

Last publish

Collaborators

  • dpweb