โโโโโโโโโโโโโโโโโโโโโโโฌโโโโโฌโโโโโโโโโโฌโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโโโฌโโโโโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโโ
โ App name โ id โ mode โ pid โ status โ restart โ uptime โ cpu โ mem โ user โ watching โ
โโโโโโโโโโโโโโโโโโโโโโโผโโโโโผโโโโโโโโโโผโโโโโโโโผโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโค
โ AXM-INTERACTION-APP โ 11 โ cluster โ 46589 โ online โ 0 โ 85m โ 2.05% โ 380.0 MB โ ubuntu โ disabled โ
โ AXM-INTERACTION-APP โ 20 โ cluster โ 46835 โ online โ 0 โ 85m โ 1.65625% โ 361.6 MB โ ubuntu โ disabled โ
โ AXM-INTERACTION-APP โ 19 โ cluster โ 46811 โ online โ 0 โ 85m โ 2.21875% โ 302.6 MB โ ubuntu โ disabled โ
โ AXM-INTERACTION-APP โ 4 โ cluster โ 46389 โ online โ 0 โ 85m โ 2.365625% โ 356.1 MB โ ubuntu โ disabled โ
โ AXM-INTERACTION-APP โ 18 โ cluster โ 46791 โ online โ 0 โ 85m โ 1.928125% โ 367.4 MB โ ubuntu โ disabled โ
CPU usage is not properly displayed. It should be around 40%-70%.
===============================================================================
--- PM2 REPORT (Mon Jun 11 2018 17:45:05 GMT+0200 (CEST)) ---------------------
===============================================================================
--- Daemon -------------------------------------------------
pm2d version : 3.0.0-alpha1
node version : 8.11.1
node path : /usr/local/bin/pm2
argv : /usr/bin/node,/usr/local/share/.config/yarn/global/node_modules/pm2/lib/Daemon.js
argv0 : node
user : ubuntu
uid : 1000
gid : 1000
uptime : 85min
===============================================================================
--- CLI ----------------------------------------------------
local pm2 : 3.0.0-alpha1
node version : 8.11.1
node path : /usr/local/bin/pm2
argv : /usr/bin/node,/usr/local/bin/pm2,report
argv0 : node
user : ubuntu
uid : 1000
gid : 1000
===============================================================================
--- System info --------------------------------------------
arch : x64
platform : linux
type : Linux
cpus : Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz
cpus nb : 32
freemem : 121331007488
totalmem : 135081730048
home : /home/ubuntu
===============================================================================
Maybe this commit is guilty https://github.com/soyuka/pidusage/commit/88972d8cd38d4137b70261a830af22283b69c57c
@soyuka any ideas ?
Do the number stabilize over time?
@simonepri this is what I was afraid of and was trying to explain :P.
From first sight it looks like the user is expecting ~40% cpu usage, without taking cores into consideration in the calculus. With 32 cores, because we naively divide the result by the number of cores, cpu usage is indeed close to 1.25 per core. Still it's not as representative as the 40% of total cpu.
I don't want to revert the PR because the maths are correct, but I wonder if we shouldn't give the total usage and the "per core" usage separately. Do you have an opinion?
ping @kittyhacker101 also :)
we shouldn't give the total usage and the "per core" usage separately.
FWIK we don't know the "per core" usage actually.
We know how much CPU time the scheduler has given to the program.
This time could have been spent on any CPU.
(A 100% values on 100*vcore scale doesn't mean that the program is using 100% of a single CPU, it just means that is proportionally doing so. That's the reason why the value can be greater than 100% for multi threaded apps.)
PS: Please correct me if I am wrong.
So the point here is what kind of range we want to use by default.
Ideally, there isn't a lot of difference between them, is just a constant multiplication/division factor.
For the moment, probably, it's better to adopt the default that ps uses (Do not divide for the number of cores) and let the user do the math instead if they need a 0-100 scale.
In that way, no-ones code gets broken.
@soyuka we need to double check the math for the procfile version.
I'm not 100% sure it's correct for multi threaded processes.
https://github.com/soyuka/pidusage/issues/58
@soyuka In this case we are expecting much more (@Eywek work @keymetrics btw).
We have upgraded to the dev version of pm2 few of our production servers (which contained the last version of pidusage) and saw our numbers dropped from 80-100 to 0.5-1.5 which is, 100 times lower than the actual cpu usage (maybe someone missed a * 100 somwhere ?)
@vmarchaud if you multiply the percentages for the number of vcores you should get the old percentage back. Can you confirm this?
You can check the modifications here:
https://github.com/soyuka/pidusage/pull/59/files
Exactly what you said @simonepri !
@vmarchaud for now I'll just revert the patch that introduced this bug and we'll keep you up to date on how we can introduce support for cores computation in pidusage.
@soyuka actually is not that easy.
the ps, procfile and wmic version should all behave coherently about the percentage range.
I think that now they all reports 0-100 readings but as I said I'm not 100% sure.
thanks @soyuka for the revert, we will test this tomorrow.
However i dont see the point of getting the cpu usage for one app compared to the server, you want to know how much core your app using right ?
Should be fixed in 2.0.8 (npm update pm2 might be enough).
However i dont see the point of getting the cpu usage for one app compared to the server, you want to know how much core your app using right ?
It's really tricky because all comes to "what is actually cpu usage?". We're going to do more research, maybe that we could output a new value that gives additional information to output the ratio 100/core.
For now, let's keep the value given by ps without additional work :).
/edit: #61 mentions:
These values measure time spent in user and system code respectively, and may end up being greater than actual elapsed time if multiple CPU cores are performing work for this process.
So, I guess the cleanest is to allow values > 100% (we can't know how much per core, but the number will be between 1 et 100*vcores). WDYT @vmarchaud ?
It seems works on 1 server
โโโโโโโโโโโโโโโโโโโโโโโฌโโโโโฌโโโโโโโโโโฌโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโฌโโโโโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโโ
โ App name โ id โ mode โ pid โ status โ restart โ uptime โ cpu โ mem โ user โ watching โ
โโโโโโโโโโโโโโโโโโโโโโโผโโโโโผโโโโโโโโโโผโโโโโโโโผโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโผโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโค
โ AXM-DIGESTERS โ 13 โ cluster โ 11992 โ online โ 0 โ 5m โ 28.4% โ 123.2 MB โ ubuntu โ disabled โ
โ AXM-DIGESTERS โ 12 โ cluster โ 11964 โ online โ 0 โ 5m โ 32.5% โ 117.4 MB โ ubuntu โ disabled โ
โ AXM-INTERACTION-APP โ 9 โ cluster โ 11921 โ online โ 0 โ 5m โ 25.6% โ 159.7 MB โ ubuntu โ disabled โ
But on another server, I can't do pm2 ls:
ubuntu@tau-web:~$ pm2 ls
ubuntu@tau-web:~$ echo $?
1
Only sudo pm2 ls works. But CPU values still broken:
โโโโโโโโโโโโโโโโโโโโโโโฌโโโโโฌโโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโโโฌโโโโโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโโ
โ App name โ id โ mode โ pid โ status โ restart โ uptime โ cpu โ mem โ user โ watching โ
โโโโโโโโโโโโโโโโโโโโโโโผโโโโโผโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโค
โ AXM-INTERACTION-APP โ 11 โ cluster โ 118154 โ online โ 0 โ 8m โ 2.33125% โ 277.9 MB โ ubuntu โ disabled โ
โ AXM-INTERACTION-APP โ 20 โ cluster โ 118395 โ online โ 0 โ 8m โ 1.896875% โ 236.9 MB โ ubuntu โ disabled โ
โ AXM-INTERACTION-APP โ 19 โ cluster โ 118373 โ online โ 0 โ 8m โ 1.7375% โ 254.2 MB โ ubuntu โ disabled โ
pm2 report for broken server:
===============================================================================
--- PM2 REPORT (Tue Jun 12 2018 11:18:54 GMT+0200 (CEST)) ---------------------
===============================================================================
--- Daemon -------------------------------------------------
pm2d version : 3.0.0-alpha1
node version : 8.11.1
node path : undefined
argv : /usr/bin/node,/usr/local/share/.config/yarn/global/node_modules/pm2/lib/Daemon.js
argv0 : node
user : root
uid : 0
gid : 0
uptime : 9min
===============================================================================
--- CLI ----------------------------------------------------
local pm2 : 3.0.0-alpha1
node version : 8.11.1
node path : undefined
argv : /usr/bin/node,/usr/local/bin/pm2,report
argv0 : node
user : root
uid : 0
gid : 0
===============================================================================
--- System info --------------------------------------------
arch : x64
platform : linux
type : Linux
cpus : Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz
cpus nb : 32
freemem : 119064248320
totalmem : 135081730048
home : /home/ubuntu
===============================================================================
--- PM2 list -----------------------------------------------
โโโโโโโโโโโโโโโโโโโโโโโฌโโโโโฌโโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโโโฌโโโโโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโโ
โ App name โ id โ mode โ pid โ status โ restart โ uptime โ cpu โ mem โ user โ watching โ
โโโโโโโโโโโโโโโโโโโโโโโผโโโโโผโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโค
โ AXM-INTERACTION-APP โ 11 โ cluster โ 118154 โ online โ 0 โ 9m โ 2.35625% โ 282.0 MB โ ubuntu โ disabled โ
โ AXM-INTERACTION-APP โ 20 โ cluster โ 118395 โ online โ 0 โ 9m โ 1.903125% โ 238.6 MB โ ubuntu โ disabled โ
โ AXM-INTERACTION-APP โ 19 โ cluster โ 118373 โ online โ 0 โ 9m โ 1.746875% โ 252.3 MB โ ubuntu โ disabled โ
โ AXM-INTERACTION-APP โ 4 โ cluster โ 117944 โ online โ 0 โ 9m โ 2.096875% โ 268.1 MB โ ubuntu โ disabled โ
โ AXM-INTERACTION-APP โ 18 โ cluster โ 118329 โ online โ 0 โ 9m โ 1.9375% โ 260.6 MB โ ubuntu โ disabled โ
โ AXM-INTERACTION-APP โ 6 โ cluster โ 117976 โ online โ 0 โ 9m โ 2.125% โ 263.6 MB โ ubuntu โ disabled โ
โ AXM-INTERACTION-APP โ 7 โ cluster โ 118021 โ online โ 0 โ 9m โ 2.859375% โ 245.2 MB โ ubuntu โ disabled โ
โ AXM-INTERACTION-APP โ 8 โ cluster โ 118044 โ online โ 0 โ 9m โ 1.965625% โ 264.1 MB โ ubuntu โ disabled โ
โ AXM-INTERACTION-APP โ 9 โ cluster โ 118083 โ online โ 0 โ 9m โ 2.346875% โ 298.6 MB โ ubuntu โ disabled โ
โ AXM-INTERACTION-APP โ 10 โ cluster โ 118108 โ online โ 0 โ 9m โ 1.934375% โ 249.7 MB โ ubuntu โ disabled โ
โ AXM-INTERACTION-APP โ 17 โ cluster โ 118315 โ online โ 0 โ 9m โ 1.884375% โ 257.2 MB โ ubuntu โ disabled โ
โ AXM-INTERACTION-APP โ 1 โ cluster โ 117912 โ online โ 0 โ 9m โ 2.396875% โ 247.2 MB โ ubuntu โ disabled โ
โ AXM-INTERACTION-APP โ 16 โ cluster โ 118277 โ online โ 0 โ 9m โ 2.446875% โ 225.2 MB โ ubuntu โ disabled โ
โ AXM-INTERACTION-APP โ 14 โ cluster โ 118226 โ online โ 0 โ 9m โ 2.009375% โ 262.4 MB โ ubuntu โ disabled โ
โ AXM-INTERACTION-APP โ 15 โ cluster โ 118267 โ online โ 0 โ 9m โ 3.6875% โ 1.7 GB โ ubuntu โ disabled โ
โ AXM-LIMIT-WORKER โ 5 โ fork โ 117966 โ online โ 0 โ 9m โ 1.621875% โ 136.0 MB โ ubuntu โ disabled โ
โ AXM-NOTIFICATION โ 2 โ fork โ 117928 โ online โ 0 โ 9m โ 0.015625% โ 91.0 MB โ ubuntu โ disabled โ
โ AXM-PROXY โ 13 โ cluster โ 118210 โ online โ 0 โ 9m โ 0.090625% โ 104.9 MB โ ubuntu โ disabled โ
โ AXM-PROXY โ 12 โ cluster โ 118165 โ online โ 0 โ 9m โ 0.09375% โ 103.9 MB โ ubuntu โ disabled โ
โ AXM-REALTIME โ 3 โ fork โ 117936 โ online โ 0 โ 9m โ 0.384375% โ 164.7 MB โ ubuntu โ disabled โ
โ AXM-WEB-API โฑ โ 0 โ fork โ 117917 โ online โ 0 โ 9m โ 0.31875% โ 78.7 MB โ ubuntu โ disabled โ
โโโโโโโโโโโโโโโโโโโโโโโดโโโโโดโโโโโโโโโโดโโโโโโโโโดโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโดโโโโโโโโโโโโดโโโโโโโโโโโโโดโโโโโโโโโดโโโโโโโโโโโ
Module activated
โโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโฌโโโโโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโฌโโโโโโโโโโโโฌโโโโโโโโโโโโโโโฌโโโโโโโ
โ Module โ version โ target PID โ status โ restart โ cpu โ memory โ user โ
โโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโค
โ pm2-agent-monitoring โ 1.5.1 โ 118540 โ online โ 0 โ 0.046875% โ 66.156 MB โ root โ
โ pm2-probe โ 1.5.5 โ 117902 โ online โ 0 โ 0.215625% โ 86.332 MB โ root โ
โ pm2-redis โ 2.1.0 โ 10799 โ online โ 0 โ 1.903125% โ 125.324 MB โ root โ
โ pm2-server-monit โ 2.6.2 โ N/A โ online โ 0 โ 0.053125% โ 44.387 MB โ root โ
โโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโโโโโดโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโโโโดโโโโโโโโโโโโโโโดโโโโโโโ
===============================================================================
--- Daemon logs --------------------------------------------
/home/ubuntu/.pm2/pm2.log last 20 lines:
PM2 | [2018-06-12 11:09:29] PM2 error: (node:117902) [DEP0007] DeprecationWarning: worker.suicide is deprecated. Please use worker.exitedAfterDisconnect.
PM2 | [2018-06-12 11:09:29] PM2 log: Starting execution sequence in -cluster mode- for app name:AXM-INTERACTION-APP id:18
PM2 | [2018-06-12 11:09:29] PM2 log: App name:AXM-INTERACTION-APP id:17 online
PM2 | [2018-06-12 11:09:29] PM2 error: (node:117902) [DEP0007] DeprecationWarning: worker.suicide is deprecated. Please use worker.exitedAfterDisconnect.
PM2 | [2018-06-12 11:09:29] PM2 log: Starting execution sequence in -cluster mode- for app name:AXM-INTERACTION-APP id:19
PM2 | [2018-06-12 11:09:29] PM2 log: App name:AXM-INTERACTION-APP id:18 online
PM2 | [2018-06-12 11:09:29] PM2 error: (node:117902) [DEP0007] DeprecationWarning: worker.suicide is deprecated. Please use worker.exitedAfterDisconnect.
PM2 | [2018-06-12 11:09:29] PM2 log: Starting execution sequence in -cluster mode- for app name:AXM-INTERACTION-APP id:20
PM2 | [2018-06-12 11:09:29] PM2 log: App name:AXM-INTERACTION-APP id:20 online
PM2 | [2018-06-12 11:09:29] PM2 error: (node:117902) [DEP0007] DeprecationWarning: worker.suicide is deprecated. Please use worker.exitedAfterDisconnect.
PM2 | [2018-06-12 11:09:29] PM2 log: App name:AXM-INTERACTION-APP id:19 online
PM2 | [2018-06-12 11:09:29] PM2 error: (node:117902) [DEP0007] DeprecationWarning: worker.suicide is deprecated. Please use worker.exitedAfterDisconnect.
PM2 | [2018-06-12 11:09:29] PM2 log: Starting execution sequence in -fork mode- for app name:pm2-server-monit id:21
PM2 | [2018-06-12 11:09:29] PM2 log: App name:pm2-server-monit id:21 online
PM2 | [2018-06-12 11:09:29] PM2 log: Starting execution sequence in -fork mode- for app name:pm2-redis id:22
PM2 | [2018-06-12 11:09:29] PM2 log: App name:pm2-redis id:22 online
PM2 | [2018-06-12 11:09:29] PM2 log: Starting execution sequence in -fork mode- for app name:pm2-agent-monitoring id:23
PM2 | [2018-06-12 11:09:29] PM2 log: App name:pm2-agent-monitoring id:23 online
PM2 | [2018-06-12 11:09:29] PM2 log: Starting execution sequence in -fork mode- for app name:pm2-probe id:24
PM2 | [2018-06-12 11:09:29] PM2 log: App name:pm2-probe id:24 online
Only sudo pm2 ls works. But CPU values still broken:
The npm update should be done with the correct user.
Yep and it still broken
Yep and it still broken
Because pm2 is still using the old version of pidusage with your root user :). I can't really help you more on this.
Fixed sorry
@soyuka In the regards of what wee should show :
These values measure time spent in user and system code respectively, and may end up being greater than actual elapsed time if multiple CPU cores are performing work for this process.
I think the main problem here is indeed that the definition of cpu usage is different from people to people.
What i think it the main definition is : How much CPU my application is using ?
In the context of NodeJS (because every runtime has his own threading model), we can assume that only one thread do all the work (the one of the event loop) so one application should range between 0-100% (since one thread can't be actually shared between cores, it should max at one cpu used).
If we look at one of the most used monitoring tool in the world (htop/top), the cpu usage is clearly defined as . And changing this would be really hard for user to understand
In contrary, what (i think) you tried to achieve is to answer was : How much CPU resource of my server this application is using ?
In this case, giving the usage compared to the whole server is a correct metric, but the world didn't choose this as a definition of cpu usage (at least in my view).
I completely agree on that!
Let me know if there's another issue with pidusage since last patch ;). We'll keep the value between 0 and 100! I'll add a new metric to get the proper value though.
In the context of NodeJS (because every runtime has his own threading model), we can assume that only one thread do all the work (the one of the event loop) so one application should range between 0-100% (since one thread can't be actually shared between cores, it should max at one cpu used).
FWIK each async i/o operation done by the code creates a new thread and then the result is processed by the event loop thread.
This means that for a NodeJS process it may happen that the cpu usage is greater than 100%.
We'll keep the value between 0 and 100! I'll add a new metric to get the proper value though.
Let's just say that we report the cpu usage as ps/top and others does. (0 - 100*vcore)
There's a reason because also the built in cpuUsage() function mention about the possibility that the elapsed time is less than the cpu time consumed.
In a node process you should generally get values in range 0-100% but if you use a package that does some heavy async work in c++ and your event loop also does something else while waiting for the output, you will go above 100% really easily.
Should be fixed.
FWIK each async i/o operation done by the code creates a new thread and then the result is processed by the event loop thread.
This means that for a NodeJS process it may happen that the cpu usage is greater than 100%.
Nope, the thread pool is only used for specific async operation (fs,dns), other API rely on epoll (specially the network), the thread pool is never used otherwise.
But i agree that you can go over 100% percentage if you rely a lot on the filesystem for example.
Nope, the thread pool is only used for specific async operation (fs,dns), other API rely on epoll (specially the network), the thread pool is never used otherwise.
But i agree that you can go over 100% percentage if you rely a lot on the filesystem for example.
True ! But in any case when we get CPU usage for node process it only take into account how much CPU event loop is consuming.
Indeed it will not take into account thread or async librairies consumption I guess.
I'm not sure there is a way to solve this point.
@vmarchaud thank you for the explanation!
@wallet77 The consumption should be per process, so I immagine that if the process has more than 1 thread the consumption will be cumulative of the work of all the threads.
@wallet77 I agree with @simonepri that we need to show the cpu usage of all the threads that inherit from the main thread of the process, and thats the current behavior i think
We can also obtain per thread readings, if possible we will try to integrate this functionality in the future.
See these examples:
https://github.com/soyuka/pidusage/issues/57#issue-310089748
https://github.com/soyuka/pidusage/issues/57#issuecomment-396705077
So, now with [email protected], the CPU usage seems work like before, but with pm2 ls the display is weird:
โโโโโโโโโโโโโโโโโโโโโโโฌโโโโโฌโโโโโโโโโโฌโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโโ
โ App name โ id โ mode โ pid โ status โ restart โ uptime โ cpu โ mem โ user โ watching โ
โโโโโโโโโโโโโโโโโโโโโโโผโโโโโผโโโโโโโโโโผโโโโโโโโผโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโค
โ AXM-DIGESTERS โ 7 โ cluster โ 32248 โ online โ 0 โ 3D โ 0% โ 130.6 MB โ ubuntu โ disabled โ
โ AXM-DIGESTERS โ 8 โ cluster โ 32265 โ online โ 0 โ 3D โ 0% โ 135.0 MB โ ubuntu โ disabled โ
โ AXM-INTERACTION-APP โ 4 โ cluster โ 32206 โ online โ 0 โ 3D โ 100.00000223517422% โ 257.9 MB โ ubuntu โ disabled โ
โ AXM-INTERACTION-APP โ 1 โ cluster โ 32173 โ online โ 0 โ 3D โ 0% โ 218.3 MB โ ubuntu โ disabled โ
โ AXM-LIMIT-WORKER โ 6 โ fork โ 32255 โ online โ 0 โ 3D โ 0% โ 114.3 MB โ ubuntu โ disabled โ
โ AXM-NOTIFICATION โ 2 โ fork โ 32189 โ online โ 0 โ 3D โ 0% โ 123.7 MB โ ubuntu โ disabled โ
โ AXM-PROXY โ 5 โ cluster โ 5992 โ online โ 1 โ 3D โ 0% โ 115.0 MB โ ubuntu โ disabled โ
โ AXM-REALTIME โ 3 โ fork โ 32198 โ online โ 0 โ 3D โ 0% โ 119.8 MB โ ubuntu โ disabled โ
โ AXM-WEB-API โ 0 โ fork โ 32178 โ online โ 0 โ 3D โ 0% โ 135.8 MB โ ubuntu โ disabled โ
โโโโโโโโโโโโโโโโโโโโโโโดโโโโโดโโโโโโโโโโดโโโโโโโโดโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโดโโโโโโโโโดโโโโโโโโโโโ
Module activated
โโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโฌโโโโโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโฌโโโโโโโโโ
โ Module โ version โ target PID โ status โ restart โ cpu โ memory โ user โ
โโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโค
โ pm2-agent-monitoring โ 1.5.1 โ 32514 โ online โ 1 โ 0% โ 57.258 MB โ ubuntu โ
โ pm2-elasticsearch โ 1.0.0 โ N/A โ online โ 0 โ 0% โ 0 B โ ubuntu โ
โ pm2-probe โ 1.5.5 โ 32161 โ online โ 0 โ 100.00000223517422% โ 90.008 MB โ ubuntu โ
โ pm2-redis โ 2.1.0 โ 15167 โ online โ 0 โ 100.00000223517422% โ 67.953 MB โ ubuntu โ
โ pm2-server-monit โ 2.6.2 โ N/A โ online โ 0 โ 0% โ 61.008 MB โ ubuntu โ
โโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโโโโโดโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโดโโโโโโโโโ
Use `pm2 show <id|name>` to get more details about an app
But pm2 report display the right cpu usage:
--- PM2 list -----------------------------------------------
โโโโโโโโโโโโโโโโโโโโโโโฌโโโโโฌโโโโโโโโโโฌโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโโ
โ App name โ id โ mode โ pid โ status โ restart โ uptime โ cpu โ mem โ user โ watching โ
โโโโโโโโโโโโโโโโโโโโโโโผโโโโโผโโโโโโโโโโผโโโโโโโโผโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโค
โ AXM-DIGESTERS โ 7 โ cluster โ 32248 โ online โ 0 โ 3D โ 33.870967735830035% โ 130.7 MB โ ubuntu โ disabled โ
โ AXM-DIGESTERS โ 8 โ cluster โ 32265 โ online โ 0 โ 3D โ 25.806451608251457% โ 138.0 MB โ ubuntu โ disabled โ
โ AXM-INTERACTION-APP โ 4 โ cluster โ 32206 โ online โ 0 โ 3D โ 19.354838706188595% โ 259.5 MB โ ubuntu โ disabled โ
โ AXM-INTERACTION-APP โ 1 โ cluster โ 32173 โ online โ 0 โ 3D โ 38.70967741237719% โ 217.8 MB โ ubuntu โ disabled โ
โ AXM-LIMIT-WORKER โ 6 โ fork โ 32255 โ online โ 0 โ 3D โ 0% โ 112.3 MB โ ubuntu โ disabled โ
โ AXM-NOTIFICATION โ 2 โ fork โ 32189 โ online โ 0 โ 3D โ 0% โ 124.2 MB โ ubuntu โ disabled โ
โ AXM-PROXY โ 5 โ cluster โ 5992 โ online โ 1 โ 3D โ 1.612903225515716% โ 115.0 MB โ ubuntu โ disabled โ
โ AXM-REALTIME โ 3 โ fork โ 32198 โ online โ 0 โ 3D โ 4.838709676547149% โ 115.9 MB โ ubuntu โ disabled โ
โ AXM-WEB-API โ 0 โ fork โ 32178 โ online โ 0 โ 3D โ 0% โ 139.8 MB โ ubuntu โ disabled โ
โโโโโโโโโโโโโโโโโโโโโโโดโโโโโดโโโโโโโโโโดโโโโโโโโดโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโดโโโโโโโโโดโโโโโโโโโโโ
Module activated
โโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโฌโโโโโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโฌโโโโโโโโโ
โ Module โ version โ target PID โ status โ restart โ cpu โ memory โ user โ
โโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโค
โ pm2-agent-monitoring โ 1.5.1 โ 32514 โ online โ 1 โ 0% โ 55.008 MB โ ubuntu โ
โ pm2-elasticsearch โ 1.0.0 โ N/A โ online โ 0 โ 0% โ 0 B โ ubuntu โ
โ pm2-probe โ 1.5.5 โ 32161 โ online โ 0 โ 1.612903225515716% โ 88.746 MB โ ubuntu โ
โ pm2-redis โ 2.1.0 โ 15167 โ online โ 0 โ 22.58064515722003% โ 67.207 MB โ ubuntu โ
โ pm2-server-monit โ 2.6.2 โ N/A โ online โ 0 โ 1.612903225515716% โ 61.098 MB โ ubuntu โ
โโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโโโโโดโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโดโโโโโโโโโ
===============================================================================
And pm2-io-agent get the right value too.
As I said on slack, for pm2 list it'd be better to use ctime / elapsed to have a "global cpu usage" metric.
Hi there,
@soyuka we will release pm2 thursday (21/06).
So we need to fix this or to rollback.
So, it works with #3725, but CPU is not rounded for modules:
Module activated
โโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโฌโโโโโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโฌโโโโโโโโโ
โ Module โ version โ target PID โ status โ restart โ cpu โ memory โ user โ
โโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโค
โ pm2-agent-monitoring โ 1.5.1 โ 118381 โ online โ 0 โ 2.564102566306878% โ 64.191 MB โ ubuntu โ
โ pm2-probe โ 1.5.5 โ 117741 โ online โ 0 โ 5.128205132613756% โ 80.980 MB โ ubuntu โ
โ pm2-redis โ 2.1.0 โ 10799 โ online โ 0 โ 48.71794875983068% โ 130.645 MB โ ubuntu โ
โ pm2-server-monit โ 2.6.2 โ N/A โ online โ 0 โ 0% โ 33.180 MB โ ubuntu โ
โโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโโโโโดโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโดโโโโโโโโโ
I've patched CliUx but may have forgot modules UI! Where is it located in the code @wallet77 ?
https://github.com/Unitech/pm2/pull/3725/files#diff-36617d5cf74241f64b44c1968da9a024R330
PM2 3.0.0 has been released:
$ npm install pm2@latest -g
$ pm2 update
Be aware of breaking changes, especially drop support for node 0.12.
Full list here : https://github.com/Unitech/pm2/blob/master/CHANGELOG.md