node-stat

the statistics tool like dstat which outputs JSON. This module works only on Linux >= 2.6

Usage no npm install needed!

<script type="module">
  import nodeStat from 'https://cdn.skypack.dev/node-stat';
</script>

README

node-stat

node-stat provides monitoring of Linux statistics to applications based on node.js.

Usage

Use on console

npm install -g node-stat
nodestat
nodestat -i 5

Use as module

var nodestat = require('node-stat');
setInterval(function() {
    nodestat.get('stat','net','load','disk', function(err, data) {
        console.log(JSON.stringify(data));
    });
}, 1000);

License

MIT