Capturing Garbage collection details of a Node js application

75 views
Skip to first unread message

suman kumar

unread,
Jan 6, 2016, 1:04:07 AM1/6/16
to nodejs
I am working on a Node js APM solution and want to capture  the garbage collection details such as  GC time and type of GC..any idea how to achieve this through Node js instrumentation?

Toby Corbin

unread,
Jan 10, 2016, 1:40:30 AM1/10/16
to nodejs
A really simple way to visualize garbage collection details from your Node.js application is to capture the data to file and then load that data in by using the free Garbage Collection and Memory Visualizer software http://www.ibm.com/developerworks/java/jdk/tools/gcmv/

GCMC is available to install from the Eclipse Marketplace with details in the link above

Online documentation is availbable here

http://www-01.ibm.com/support/knowledgecenter/SS3KLZ/com.ibm.java.diagnostics.visualizer.doc/homepage/plugin-homepage-gcmv.html


To capture the data,
use the --trace_gc command-line parameter to generate garbage collection data and pipe to a file. You can additionally specify either the --trace_gc_nvp or --trace_gc-verboseparameters to generate more detailed, single-line or multiple-line information.

Once you have the data, load it into GCMV and it will tell you all about the garbage collection activity of you application.

If you need any help or more information, please let me know

Toby

Michael Dawson

unread,
Jan 11, 2016, 10:36:09 AM1/11/16
to nodejs

Another option to look at is https://www.npmjs.com/package/appmetrics if you want something that you can use within your APM solution.
Reply all
Reply to author
Forward
0 new messages