9

There is New Relic for Rails, but I could not find anything available for node.js. Is there any tool or an API to monitor memory usage of heroku dynos?

pars
  • 3,700
  • 7
  • 38
  • 57
  • 1
    when you find it please post back here - we decided against using node based on the fact that we couldn't monitor it (at the time - 6 months ago) effectively on Heroku to decide if/when we need to scale. We got in touch with NR who had nothing to say about it at the time. – John Beynon Mar 13 '12 at 16:17
  • Support stuff said there is no official tool or API however you could make use of `heroku run /proc/*/statm` (I didn't figure it out myself yet) – pars Mar 14 '12 at 15:18
  • @celalo use [node-usage](https://github.com/arunoda/node-usage) which is based on /proc – Arunoda Susiripala Feb 22 '13 at 16:17

3 Answers3

4

This may not be the full solution you're looking for, but you can get the current memory usage of a Node.js process via process.memoryUsage().

Michelle Tilley
  • 157,729
  • 40
  • 374
  • 311
  • Could you tell how the values can be used? I see, we have rss, headTotal and heapMaster? How can I calculate this to MB and how is this related to the 512 MB RAM of a dyno? – shredding Sep 25 '12 at 13:59
  • This SO post explains the values: http://stackoverflow.com/questions/12023359/what-do-the-return-values-of-node-js-process-memoryusage-stand-for – bendytree Aug 07 '13 at 17:33
1

Although not as full-featured as New Relic, the nodetime npm package (and matching site) does provide memory usage, latency and similar monitoring.

mikegradek
  • 359
  • 2
  • 6
1

Use node-usage, additionally you can see the CPU usage too.

Arunoda Susiripala
  • 2,516
  • 1
  • 25
  • 30