free

1.0.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i free

Weekly Downloads

16

Version

1.0.0

License

Apache2

Last publish

Collaborators

  • coolaj86