Taking Node-report of already running process

8 views
Skip to first unread message

Kumar Nikhil

unread,
Mar 7, 2018, 1:39:32 AM3/7/18
to nodejs
Hello ,

 As of now "node -r node-report application.js" creates a new process and takes the report of the new process. 
But I want to take the node-report of the existing running process.  

Is there any way to do that ?

Zlatko

unread,
Mar 8, 2018, 11:13:39 AM3/8/18
to nodejs
Well, did you look at the docs? "can also be triggered by sending a USR2 signal to a Node.js process"

So, `kill -USR2 <pid of node process>` should do the trick.


Btw, their docs say you can do this:

var nodereport = require('node-report');
nodereport.triggerReport();

So if all else fails, build yourself this into a function, and shoot this on interval, or maybe on an external trigger (e.g. protected API endpoint if this is a web app).
Reply all
Reply to author
Forward
0 new messages