Pm2: How Kill PM2 Agent?

Created on 13 Jul 2018  Β·  7Comments  Β·  Source: Unitech/pm2

What's going wrong?

How could we reproduce this issue?

Supporting information

$ pm2 report
β¬’  okoer-api ξ‚  dev-sensors βœ— ps -ef | grep pm2
  502 52564     1   0 11:12上午 ??         0:01.28 PM2 Agent (/Users/tomato/.pm2)
  502 52565     1   0 11:12上午 ??         0:01.36 PM2 Agent (/Users/tomato/.pm2)
  502 52568     1   0 11:12上午 ??         0:01.35 PM2 Agent (/Users/tomato/.pm2)
  502 52569     1   0 11:12上午 ??         0:01.36 PM2 Agent (/Users/tomato/.pm2)
  502 52582     1   0 11:12上午 ??         0:01.16 PM2 Agent (/Users/tomato/.pm2)
  502 52583 52564   0 11:12上午 ??         0:01.22 PM2 Agent (/Users/tomato/.pm2)
  502 52584 52568   0 11:12上午 ??         0:01.28 PM2 Agent (/Users/tomato/.pm2)
  502 52585 52582   0 11:12上午 ??         0:01.25 PM2 Agent (/Users/tomato/.pm2)
  502 52586 52569   0 11:12上午 ??         0:01.32 PM2 Agent (/Users/tomato/.pm2)
  502 52587 52565   0 11:12上午 ??         0:01.21 PM2 Agent (/Users/tomato/.pm2)
  502 52687 52583   0 11:12上午 ??         0:01.06 PM2 Agent (/Users/tomato/.pm2)
  502 52704 52585   0 11:12上午 ??         0:01.06 PM2 Agent (/Users/tomato/.pm2)
  502 52707 52586   0 11:12上午 ??         0:01.00 PM2 Agent (/Users/tomato/.pm2)
  502 52709 52584   0 11:12上午 ??         0:00.79 PM2 Agent (/Users/tomato/.pm2)
  502 52710 52587   0 11:12上午 ??         0:00.81 PM2 Agent (/Users/tomato/.pm2)
  502 52712   564   0 11:12上午 ttys003    0:00.02 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn pm2
β¬’  okoer-api ξ‚  dev-sensors βœ— pm2 report
[PM2] Spawning PM2 daemon with pm2_home=/Users/tomato/.pm2
[PM2.IO] Using (Public key: k4709r3rwmxk75f) (Private key: xy3yf9r5qg2ytb5)
[PM2.IO][WARNING] Not managed to connect to PM2 Plus, retrying in background.
[PM2] PM2 Successfully daemonized
===============================================================================
--- PM2 REPORT (Fri Jul 13 2018 11:40:02 GMT+0800 (CST)) ----------------------
===============================================================================
--- Daemon -------------------------------------------------
pm2d version         : 3.0.0
node version         : 9.11.1
node path            : /usr/local/bin/pm2
argv                 : /usr/local/bin/node,/usr/local/lib/node_modules/pm2/lib/Daemon.js
argv0                : node
user                 : tomato
uid                  : 502
gid                  : 20
uptime               : 0min
===============================================================================
--- CLI ----------------------------------------------------
local pm2            : 3.0.0
node version         : 9.11.1
node path            : /usr/local/bin/pm2
argv                 : /usr/local/bin/node,/usr/local/bin/pm2,report
argv0                : node
user                 : tomato
uid                  : 502
gid                  : 20
===============================================================================
--- System info --------------------------------------------
arch                 : x64
platform             : darwin
type                 : Darwin
cpus                 : Intel(R) Core(TM) i7-4960HQ CPU @ 2.60GHz
cpus nb              : 8
freemem              : 17874944
totalmem             : 17179869184
home                 : /Users/tomato
===============================================================================
--- PM2 list -----------------------------------------------
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ App name β”‚ id β”‚ mode β”‚ pid β”‚ status β”‚ restart β”‚ uptime β”‚ cpu β”‚ mem β”‚ user β”‚ watching β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
===============================================================================
--- Daemon logs --------------------------------------------
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ App name β”‚ id β”‚ mode β”‚ pid β”‚ status β”‚ restart β”‚ uptime β”‚ cpu β”‚ mem β”‚ user β”‚ watching β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
 Use `pm2 show <id|name>` to get more details about an app

All 7 comments

Do you want to kill pm2 process?

pm2 kill

@moto-a This does not stop... pm2 list is empty

Stop temporarily: pm2 link stop
Or
Stop permanently: pm2 link delete

image

@Unitech

pm2 version: 3.0.4

image

Aouch

We've published a version yesterday that avoid duplication
Please run the following commands:

npm install pm2@latest -g
pkill -f Agent
pm2 link

pm2 eat too much memory, now I give up this and move back to supervisor.d

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  Β·  3Comments

mario-mui picture mario-mui  Β·  3Comments

morfies picture morfies  Β·  3Comments

alexpts picture alexpts  Β·  3Comments

liujb picture liujb  Β·  3Comments