5 authors: { github: "Dr-Dino" }
11 | Command | Description |
13 | `pm2 start app.js --name my-api` | Start and name a process |
17 | Command | Description |
19 | `pm2 start app.js -i 0` | Will start maximum processes with LB depending on available CPUs |
23 | Command | Description |
25 | `pm2 list` | Display all processes status |
26 | `pm2 jlist` | Print process list in raw JSON |
27 | `pm2 prettylist` | Print process list in beautified JSON |
29 | `pm2 describe 0` | Display all information about a specific process |
31 | `pm2 monit` | Monitor all processes |
35 | Command | Description |
37 | `pm2 logs [--raw]` | Display all processes logs in streaming |
38 | `pm2 flush` | Empty all log files |
39 | `pm2 reloadLogs` | Reload all logs |
43 | Command | Description |
45 | `pm2 stop all` | Stop all processes |
46 | `pm2 restart all` | Restart all processes |
48 | `pm2 reload all` | Will 0s downtime reload (for NETWORKED apps) |
50 | `pm2 stop 0` | Stop specific process id |
51 | `pm2 restart 0` | Restart specific process id |
53 | `pm2 delete 0` | Will remove process from pm2 list |
54 | `pm2 delete all` | Will remove all processes from pm2 list |
56 | `pm2 save` | Save processes list to respawn at reboot |
60 | Command | Description |
62 | `pm2 reset <process>` | Reset meta data (restarted time...) |
63 | `pm2 updatePM2` | Update in memory pm2 |
64 | `pm2 ping` | Ensure pm2 daemon has been launched |
65 | `pm2 sendSignal SIGUSR2 my-app` | Send system signal to script |
67 | `pm2 start app.js --no-daemon` | Run pm2 daemon in the foreground if it doesn't exist already |
68 | `pm2 start app.js --no-vizion` | Skip vizion features (versioning control) |
69 | `pm2 start app.js --no-autorestart` | Do not automatically restart app |