free
v1.0.0
Published
Parses the output of Linux's `free`.
Downloads
269
Readme
node-free
Parses the output of Linux's free
.
Usage
Put the output of free
to a file
free > free.output.txt
Read in the file, or exec free
from NodeJS
(function () {
"use strict";
var Free = require('./')
, txt = fs.readFileSync('./free.output.txt', 'utf8')
;
// parse a string
console.log(Free.parse(txt));
// exec `free`
Free.free(function (err, mstat) {
console.log(err, mstat);
});
}());