pm2

May 12, 02:23 PM

NOTE – i had to manually edit the pm2-init.sh file since jobs were getting lost.

useful article

pm2 startup commands as of 2017-03-08

pm2 start —name voiceSpiceNodeServer /home/comptonpeslonline.com/public_html/voiceSpiceNode/voiceSpiceNodeServer/voiceSpiceNodeServer.js — —port 8000 ;

pm2 start /home/comptonpeslonline.com/public_html/html5Audio/html5AudioNodeSSH/nodeWaveFormPlayer.js — —port 8001;

pm2 start /home/blah/html5AudioNodeSSH/nodeWaveFormPlayer.js — —port 8001 ;
pm2 start /usr/local/bash/monitorProcess.php — 15 40 30 20 1 ;

pm2 start —name ds-prod /usr/bin/deepstream — start ;

pm2 start —name messagePlayback /home/comptonpeslonline.com/public_html/comptonPractice/comptonPracticeNode/messagePlayback/messagePlayback.js — —port 9000;

pm2 start —name validateLogin /home/comptonpeslonline.com/public_html/comptonPractice/comptonPracticeNode/validateLogin/validateLogin.js — —port 9002 ;

end of pm2 startup command ==========

pm2 save ; ## save the current running jobs
pm2 startup centos ; ## make sure pm2 runs after next boot

pm2 start 1;
pm2 restart 1 ;
pm2 reload 1 ;
pm2 show 2;
pm2 stop 2;
pm2 delete 3;

  1. 2016-09-19 added these
    pm2 reset 0 ; ## reset the “restart” counter
    pm2 monit ; ## new feature to monitor activity dynamically (like the keymetrics website interface)
    pm2 interact stop;
    pm2 interact start ; ## interact with keymetrics

pm2 startup centos ; ## reboot stuff

more /etc/init.d/pm2-init.sh;

ls -l ~/.pm2/dump.pm2 ;

tail /root/.pm2/logs/voiceSpiceNodeServer-error-1.log ;

= 2016-06-04 cp -v /usr/local/lib/node_modules/pm2/lib/scripts/pm2-init.sh /etc/systemd/system/

Mark Edwards

,

---

Commenting is closed for this article.

---