strongloop / strong-arc

StrongLoop Arc has been replaced by API Connect. We recommend Arc users move to the Essentials edition of API Connect. If you have questions, please email reachsl@us.ibm.com.
http://strongloop.com/
Other
114 stars 36 forks source link

How do we know which heapshot/cpuprofile files relates to which PID w/o loading #1676

Open smartmouse opened 8 years ago

smartmouse commented 8 years ago

-rw-r--r-- 1 nodebot nodebot 189980672 Dec 7 21:48 minkelite.db -rw-rw-r-- 1 nodebot nodebot 14081 Dec 7 21:01 profile.1.cpuprofile -rw-rw-r-- 1 nodebot nodebot 12934 Dec 7 21:02 profile.2.cpuprofile -rw-rw-r-- 1 nodebot nodebot 18905 Dec 7 21:02 profile.3.cpuprofile -rw-rw-r-- 1 nodebot nodebot 63648 Dec 7 21:06 profile.4.cpuprofile -rw-rw-r-- 1 nodebot nodebot 24319 Dec 7 21:06 profile.5.cpuprofile -rw-rw-r-- 1 nodebot nodebot 45136 Dec 7 21:06 profile.6.cpuprofile -rw-rw-r-- 1 nodebot nodebot 25678345 Dec 7 21:06 profile.7.heapsnapshot -rw-rw-r-- 1 nodebot nodebot 25787072 Dec 7 21:07 profile.8.heapsnapshot -rw-rw-r-- 1 nodebot nodebot 9214 Dec 7 17:47 start.log -rw-rw-r-- 1 nodebot nodebot 90342 Dec 7 21:48 strong-pm.json

There are mulitple clusters/PID(process) running and we take diffetent heap and cpu profile on different PID process in ARC.

Is there a way to tell just which PID from the cpuprofile or heapsnapshot

cgole commented 8 years ago

@jtary when you run cpu profiling through Arc they show up with pid number in the left side bar which is good enough. These profiles also get saved in ~/.strong-pm but there they are saved as @smartmouse pointed out, without pid numbers. Can we keep them in sync and have the pid numbers in the profiles when we save them?

jtary commented 8 years ago

Would probably be fairly straight forward, but it's on the PM side. @sam-github would know better if there would be any particular issue with changing the naming scheme.

sam-github commented 8 years ago

@smartmouse you are looking directly into strong-pm's internal DB... you can if you want, but its not intended to be user-readable. Use strong-arc to connect to strong-pm and browse the profiles.

FYI, the number is the profile ID, you can observe what app/pid/worker/etc. it is from by looking in explorer.

And, mea culpa, we don't have a CLI equivalent of the strong-arg profile browser... we should.

Anyhow, definitely not a bug, but a reasonable feature request to have a CLI way of browsing and accessing the profiles. Can you remove bug label and backlog this?

/cc @kraman

sam-github commented 8 years ago

It should be backlogged against strong-pm in nodeops, not in arc.