start [options] <file|json|stdin|app_name|pm_id…> |
start and daemonize an app |
trigger <proc_name> <action_name> [params] |
deploy your json |
deploy <file|environment> |
deploy your json |
startOrRestart <json> |
start or restart JSON file |
startOrReload <json> |
start or gracefully reload JSON file |
pid [app_name] |
return pid of [app_name] or all |
startOrGracefulReload <json> |
start or gracefully reload JSON file |
stop [options] <id|name|all|json|stdin…> |
stop a process (to start it again, do pm2 restart <app>) |
restart [options] <id|name|all|json|stdin…> |
restart a process |
scale <app_name> <number> |
scale up/down a process in cluster mode depending on total_number param |
snapshot |
snapshot PM2 memory |
profile <command> |
profile CPU |
reload <name|all> |
reload processes (note that its for app using HTTP/HTTPS) |
gracefulReload <name|all> |
gracefully reload a process. Send a “shutdown” message to close all connections. |
id <name> |
get process id by name |
delete <name|id|script|all|json|stdin…> |
stop and delete a process from pm2 process list |
sendSignal <signal> <pm2_id|name> |
send a system signal to the target process |
ping |
ping pm2 daemon - if not up it will launch it |
updatePM2 |
update in-memory PM2 with local PM2 |
update |
(alias) update in-memory PM2 with local PM2 |
install|module:install [options] [module|git:/] |
install or update a module (or a set of modules) and run it forever |
module:update <module|git:/> |
update a module and run it forever |
module:generate [app_name] |
Generate a sample module in current folder |
uninstall|module:uninstall <module> |
stop and uninstall a module |
publish|module:publish |
Publish the module you are currently on |
set [key] [value] |
sets the specified config <key> <value> |
multiset <value> |
multiset eg “key1 val1 key2 val2 |
get [key] |
get value for <key> |
conf [key] [value] |
get / set module config values |
config <key> [value] |
get / set module config values |
unset <key> |
clears the specified config <key> |
report |
give a full pm2 report for https://github.com/Unitech/pm2/issues |
link|interact [options] [secret] [public] [name] |
linking action to keymetrics.io - command can be stop|info|delete|restart |
unlink |
linking action to keymetrics.io - command can be stop|info|delete|restart |
unmonitor [name] |
unmonitor target process |
monitor [name] |
monitor target process |
open |
open dashboard in browser |
register |
create an account on keymetrics |
login |
login to keymetrics and link current PM2 |
web |
launch a health API on 0.0.0.0:9615 |
dump|save |
dump all processes for resurrecting them later |
send <pm_id> <line> |
send stdin to <pm_id> |
attach <pm_id> [comman] |
attach stdin/stdout to application identified by <pm_id> |
resurrect |
resurrect previously dumped processes |
unstartup [platform] |
disable and clear auto startup - [platform]=systemd,upstart,launchd,rcd |
startup [platform] |
setup script for pm2 at boot - [platform]=systemd,upstart,launchd,rcd |
logrotate |
copy default logrotate configuration |
ecosystem|init [mode] |
generate a process conf file. (mode = null or simple) |
reset <name|id|all> |
reset counters for process |
describe <id> |
describe all parameters of a process id |
desc <id> |
(alias) describe all parameters of a process id |
info <id> |
(alias) describe all parameters of a process id |
show <id> |
(alias) describe all parameters of a process id |
list|ls |
list all processes |
l |
(alias) list all processes |
ps |
(alias) list all processes |
status |
(alias) list all processes |
jlist |
list all processes in JSON format |
prettylist |
print json in a prettified JSON |
monit |
launch termcaps monitoring |
imonit |
launch legacy termcaps monitoring |
dashboard|dash |
launch dashboard with monitoring and logs |
flush |
flush logs |
reloadLogs |
reload all logs |
logs [options] [id|name] |
stream logs file. Default stream all logs |
kill |
kill daemon |
pull <name> [commit_id] |
updates repository for a given app |
forward <name> |
updates repository to the next commit for a given app |
backward <name> |
downgrades repository to the previous commit for a given app |
gc |
force PM2 to trigger garbage collection |
deepUpdate |
performs a deep update of PM2 |
serve|expose [path] [port] |
serve a directory over http via port |