~]# pm2 list
pm2 프로세스 확인
~]# pm2 scale app_name 4
app_name 클러스터를 4개로 조절
pm2 기본 명령어
# Fork mode
pm2 start app.js --name my-api # Name process
# Cluster mode
pm2 start app.js -i 0 # Will start maximum processes with LB depending on available CPUs
pm2 start app.js -i max # Same as above, but deprecated.
pm2 scale app +3 # Scales `app` up by 3 workers
pm2 scale app 2 # Scales `app` up or down to 2 workers total
# Listing
pm2 list # Display all processes status
pm2 jlist # Print process list in raw JSON
pm2 prettylist # Print process list in beautified JSON
pm2 describe 0 # Display all informations about a specific process
pm2 monit # Monitor all processes
# Logs
pm2 logs [--raw] # Display all processes logs in streaming
pm2 flush # Empty all log files
pm2 reloadLogs # Reload all logs
# Actions
pm2 stop all # Stop all processes
pm2 restart all # Restart all processes
pm2 reload all # Will 0s downtime reload (for NETWORKED apps)
pm2 stop 0 # Stop specific process id
pm2 restart 0 # Restart specific process id
pm2 delete 0 # Will remove process from pm2 list
pm2 delete all # Will remove all processes from pm2 list
# Misc
pm2 reset <process> # Reset meta data (restarted time...)
pm2 updatePM2 # Update in memory pm2
pm2 ping # Ensure pm2 daemon has been launched
pm2 sendSignal SIGUSR2 my-app # Send system signal to script
pm2 start app.js --no-daemon
pm2 start app.js --no-vizion
pm2 start app.js --no-autorestart
'Server(Windows&Linux)' 카테고리의 다른 글
[Linux] ssh 접속 실패 로그 확인 하기, login Fail log (0) | 2019.04.16 |
---|---|
[Linux] firewall-cmd IP 막기 reject (0) | 2019.04.10 |
[Linux] Ubuntu eGalax TouchScreen eGTouch Install (설치) (2) | 2018.08.22 |
[Linux] Runlevel 변경 ( with CentOS 7 ) (0) | 2018.07.03 |
[Linux] CentOS 7 SSH PORT 변경 ( Job for ssh.service failed because the control process exited with error code...) (1) | 2018.06.21 |