How to monitor the memory usage of Node.js?

前端 未结 6 2190
攒了一身酷
攒了一身酷 2020-12-02 05:25

How can I monitor the memory usage of Node.js?

6条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-02 06:21

    Also, if you'd like to know global memory rather than node process':

    var os = require('os');
    
    os.freemem();
    os.totalmem();
    

    See documentation

提交回复
热议问题