1

I'd like to monitor any node.js process that pops up on my machine and eventually print out the maximum memory used by the process when the process dies. Is there any monitoring software that does this already and if not, what is the best way to go about doing this?

Since I know which type of Node.js processes I want to monitor, I could put a check (setInterval) inside each process and then just log the maximum memory used that way. I believe I can access the amount of memory used via process.memoryUsage() and just store the maximum amount and log that upon exit using process.on('exit').

However, is there a way to monitor a group of node.js processes somehow? How do I know which group I am looking at? In other words, how can I mark certain node.js processes so that I can monitor different groups?

1 Answer 1

1

Check StrongLoop Arc: https://strongloop.com/strongblog/node-js-performance-heap-profiling-tip/

You can add title to your processes using process.title. You may also want to check memwatch. And finally, check this blog post: http://blog.yld.io/2015/08/10/debugging-memory-leaks-in-node-js-a-walkthrough/

Hope this helps.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.