promon

0.1.0 • Public • Published

Promon

Collects information from /proc/pid/stat for linux/unix systems

npm install promon

API

  • getStats(callback) // returns all information associated to pid
  • getCPUPercentage() // returns CPU percentage used by the application
  • getMemory() // returns rss memory of the application in MB

Example

    var Stats = require('promon')
    var s = new Stats()
    s.getStats(function (err, data) {
        console.log(err, data)
    })
    var cpuPercent = s.getCPUPercentage()
    var memory = s.getMemory()
 

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.0
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.0
    0

Package Sidebar

Install

npm i promon

Weekly Downloads

0

Version

0.1.0

License

MIT

Last publish

Collaborators

  • bat_coder