How do I view the history of pm2 operations?

how can I see how other people start programs using pm2? how do I start them with pm2? For example,
someone started a server, with pm2 start app.js. I don"t really know how he started it. Did pm2 record this historical operation and let me see the command started by
?

Feb.27,2021

you can check the server's history commands. History try it


PM2 has log. The details are not clear. You can check the app currently running with PM2


by executing PM2 list or PM2 monit on the server you want to see.

pm2 without this command, pm2 can be started in two ways, one is to start through the execution file

pm2 start xxx.js

one is to start through the configuration file

pm2 start xxx.json

if you can find the pm2 startup configuration file on the server, then congratulations. If not, it is unfortunately the first one. You need to see if there is a startup command on package.json under the project. If not, it is a pity that you can only see if any environment variables are used in the code to infer the startup command.

Menu