pm2 icon indicating copy to clipboard operation
pm2 copied to clipboard

How to stop god daemon?

Open sospedra opened this issue 11 years ago • 8 comments

I cannot find any command and it's disturbing and unclean to have it on the user sudo, for example, just because we miss sometimes and pm2 list on a different user. I tried to kill the process, but as the daemon that it is, it auto respawn automatically.

sospedra avatar Dec 03 '15 12:12 sospedra

@edravis Have you tried pm2 kill or are you looking for something different which I misunderstood?

JNK avatar Dec 07 '15 12:12 JNK

Have you linked PM2 to Keymetrics?

Unitech avatar Dec 07 '15 15:12 Unitech

If a PM2 is linked to Keymetrics and you need to kill PM2 by hand, please do a pm2 link stop first

Else the Keymetrics Watchdog will restart PM2 as long as it is not alive

Unitech avatar Dec 08 '15 17:12 Unitech

Ooops! Looks like I didn't explain myself well. We've got multiple users in our machines. But only one of them should run pm2. Sometimes, we run some command like pm2 list as any users that shouldn't start pm2 never. Therefore, pm2 starts the pm2 God Daemon. And I'm guessing how to stop this Daemon. For example, giving the following ps aux | grep PM2 output:

noRunPm2     15595  1.6  0.4 902060 33400 ?        Ssl  17:46   0:00 PM2 v0.15.10: God Daemon
runPm2       18545  0.5  0.4 938220 31288 ?        Ssl  Nov23 124:18 PM2 v0.15.10: God Daemon

I would love to kill the process with the PID 15595. But when I run commands like: kill -9 15595 it respawn again and again.

So, how do I stop forever the pm2 god daemon?

P.S: Thanks for the time and sorry for the late follow up

sospedra avatar Dec 09 '15 17:12 sospedra

run pm2 unstartup and that will give you a command which you run to disable setup and then reboot your machine.

ahmadfaizalbh avatar Jan 31 '17 05:01 ahmadfaizalbh

If you call 'pm2 --help', you should find 'pm2 kill' in there.

oddorphan avatar Mar 24 '17 22:03 oddorphan

why would they name the daemon God? that is messed up

xinthose avatar Mar 22 '21 17:03 xinthose