LinuxCommandLibrary

pm2

pm2

TLDR

Start a process with a name that can be used for later operations

$ pm2 start [app.js] --name [application_name]
copy


List processes
$ pm2 list
copy


Monitor all processes
$ pm2 monit
copy


Stop a process
$ pm2 stop [application_name]
copy


Restart a process
$ pm2 restart [application_name]
copy


Dump all processes for resurrecting them later
$ pm2 save
copy


Resurrect previously dumped processes
$ pm2 resurrect
copy

Copied to clipboard