0.0.4 • Published 9 years ago

pm2-mon v0.0.4

Weekly downloads
2
License
-
Repository
github
Last release
9 years ago

pm2-mon

monit pm2 process by "pgrep node", if only node process, run specified restart command/script.

(I make this thing only because pm2 sometimes crashes, I do not know why it crash, and I have to restart it anyway)

install

npm install pm2-mon -g

help

pm2-mon --help

  Usage: pm2-mon [options]

  monit pm2 process by "pgrep node", if only node process, run specified restart command/script

  Options:

    -h, --help     output usage information
    -V, --version  output the version number
    -t, --timer    check pm2 every {timer} milli second, optional, default is 5000
    -c, --cmd      the restart shell-script path, required, will be runned by sh
    -n, --num      when node process less than {num}, the restart shell-script will run, optional, default is 2

run

pm2-mon -t 5000 -c example/restart.sh -n 3

suggestion

use tj/mon to run this pm2-mon script.

change log

0.0.3 add num param

License

MIT

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago