Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/binocarlos/pingstat
A node statsd client that emits system metrics like memory and load
https://github.com/binocarlos/pingstat
Last synced: 11 days ago
JSON representation
A node statsd client that emits system metrics like memory and load
- Host: GitHub
- URL: https://github.com/binocarlos/pingstat
- Owner: binocarlos
- License: mit
- Created: 2013-08-05T12:57:04.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-08-18T19:40:21.000Z (over 11 years ago)
- Last Synced: 2024-10-07T02:36:52.899Z (about 1 month ago)
- Language: JavaScript
- Size: 113 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
pingstat
========System monitor event emitter
## installation
$ npm install pingstat
## usage
```js
var pingstat = require('pingstat');// run the monitor every 10 seconds after 1 second delay
var ping = pingstat({
delay:1000,
interval:10000
})/*
data is:
{
"cpu": {
"usage": 0
},
"load": {
"load1": 0.03271484375,
"load5": 0.041015625,
"load15": 0.04541015625
},
"system": {
"uptime": 27171.171459071
},
"memory": {
"used": 287416,
"free": 731252,
"total": 1018668
}
}
*/
ping.on('stat', function(data){
})// start monitoring
ping.start();// stop monitoring after 15 seconds (i.e. do it once)
setTimeout(function(){
ping.stop();
}, 15000)```
## licence
MIT