最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to find out which ecosystem.json file is used to start a process in pm2 - Stack Overflow

programmeradmin1浏览0评论

I have a bunch of processes started by PM2 on a server. pm2 list shows this:

I'm sure that each of them is started with an ecosystem config file. What I want to know is that what pm2 ecosystem config file is used to start for example process with the id 62 and the ecosystem config file path.

So is there any pm2 mand for that?

I have a bunch of processes started by PM2 on a server. pm2 list shows this:

I'm sure that each of them is started with an ecosystem config file. What I want to know is that what pm2 ecosystem config file is used to start for example process with the id 62 and the ecosystem config file path.

So is there any pm2 mand for that?

Share Improve this question asked Aug 30, 2021 at 8:06 AMDAMD 2033 silver badges11 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 6

Well, you can differ processes by app name (so you should set unique name in each ecosystem config file) or you can use a NODE_APP_INSTANCE variable to differ processes in cluster.

[EDIT]

There is no way how to find specific ecosystem file but you can use pm2 describe [processID/name] to find directory where was pm2 start executed (exec cwd parameter). If there is more ecosystem files than 1 you can differ processes only by name.

发布评论

评论列表(0)

  1. 暂无评论