Nikhil Kumar Agrawal
Nikhil Kumar Agrawal

Reputation: 724

How to take node-report of an existing running process in Nodejs?

In nodejs, we can take the node-report by running the process with "node -r node-report server.js".

But here it creates a new process and takes the report for the new process.

I want to take node-report of already running process and without changing any code of my application and without restarting the application.

Upvotes: 0

Views: 168

Answers (1)

jcolebrand
jcolebrand

Reputation: 16025

There is not. This is a wrapper around the process, and must be running before your process starts, so to speak. If this were baked into node proper, at the root of the source code, then it would be possible to grab this functionality. The downside to that integration is that there are performance overheads to any additional bit of code you use, so some people may not want that. Additionally, someone may have an alternate "report" they want to use in place of this one, so that would limit their freedom and flexibility to do so.

Sorry mate.

Upvotes: 1

Related Questions