os-monitor 一个非常简单的监视器,用于监视Node.js中的内置os模块。 使您可以观察某些OS参数,例如可用内存或平均负载。 安装 npm install os-monitor 概要 const monitor = require ( "os-monitor" ) ; // basic usage monitor . start ( ) ; // more advanced usage with configs. monitor . start ( { delay : 3000 // interval in ms between monitor cycles , freemem : 1000000000 // freemem under which event 'freemem' is triggered , upti