pm2-perfmonitor 2.3.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/app.js +3 -1
- package/package.json +1 -1
package/lib/app.js
CHANGED
|
@@ -198,9 +198,11 @@ const processChecker = async () => {
|
|
|
198
198
|
const { name, pid, pm_id, monit, pm2_env } = app
|
|
199
199
|
|
|
200
200
|
const sysCpuUsage = await getSysCpuUsageByPid(pid)
|
|
201
|
+
const pm2CpuUsage = monit?.cpu
|
|
201
202
|
|
|
202
203
|
const appStatus = pm2_env?.status
|
|
203
|
-
const appCpuUsage =
|
|
204
|
+
const appCpuUsage =
|
|
205
|
+
typeof sysCpuUsage === 'number' ? sysCpuUsage : pm2CpuUsage
|
|
204
206
|
|
|
205
207
|
// 非目标应用,跳过
|
|
206
208
|
if (
|