Skip to content
This repository has been archived by the owner on Nov 12, 2019. It is now read-only.

dominictarr/hud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HUD - Head Up Display

pre-configured graphing for monitoring node stuff in real-time.

var hud = require('hud')()
var from = require('from') 
var os   = require('os')

//take something you want to monitor.
//oh yeah, make it a stream.
//from == a simple way to make a readable stream.
var osStream = 
  from(function (i, next) {
    this.emit('data', {
      memory: 1 - (os.freemem() / os.totalmem()),
      //make sure you add a time property.
      //else, monitor will use the time it receives the data
      //which may not be accurate.
      time: Date.now()
    })
    setTimeout(next, 1e3)
  })

osStream.pipe(hud.createStream('memory'))

//start a server on local host...
hud.listen(6464)

now, open http://localhost:6464 in your browser!

//hud can even monitor it self!
//using probe-stream
hud.probe.pipe(hud.createStream('monitor'))

Of course, you can monitor anything! I recommend using probe-stream

How

hud uses smoothie-stream it will graph the properties that are numbers.

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published