free

Parses the output of Linux's `free`.

npm install free
2 downloads in the last week
4 downloads in the last month

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);
  });
}());
npm loves you