1.0.0 • Published 10 years ago
disable-oom-killer v1.0.0
disable-oom-killer
Disable the OOM (Out Of Memory) Killer for a process (linux only)
examples
var disableOomKiller = require('disable-oom-killer')
disableOomKiller(function (err) {
// swallow errors
})var cp = require('child_process')
var disableOomKiller = require('disable-oom-killer')
var lsr = cp.spawn('ls', [ '-R' ])
disableOomKiller(lsr)api
var disableOomKiller = require('disable-oom-killer')disableOomKiller([opts], [cb])
optsis an optional object: -pidis a string/number of the pid to kill. Defaults toprocess.pid. If the PID is not running, it will likely cause an error. -oom_adjis a string/number of the oom_adj. Defaults to-17-oom_score_adjis a string/number of the oom_score_adj. Defaults to-1000cb(err)is an optional callback function. Will call back with an error if on a non-linux system. If no callback is supplied, errors will be thrown.
disableOomKiller.sync([opts])
Synchronous version of disableOomKiller(). Any errors that occur will be thrown.
opts- Same as above.
install
With npm do:
npm install disable-oom-killerlicense
1.0.0
10 years ago