Skip to content

GavinDmello/promon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Calculates/ collects memory stats

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published