Skip to content

ProlificLab/Probes.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

https://www.codeship.io/projects/28901820-b33f-0131-c8ce-0aac319845e5/status

Probes.js

  • A Node.js module to get server load statistics

Probes.js provides a simple toolkit to measure the load of a server and to get basic information for a running process. It has been tested to work on Mac Os X and Linux.

Basic Example

Installation npm install Probes.js

How to Use

var probes = require('Probes.js');

//Print the number of hard drives connected to the server
probes.hardDriveProbe(function(err,results){
    if(!err)console.log(results.length);
});

Function Documentation

hardDriveProbe

probes.hardDriveProbe(function(err,results){});

results = [{fileSystem      : name,
            totalSpace      : Ko,
            usedSpace       : Ko,
            availableSpace  : Ko,
            percentUsed     : percent,
            mountPoint      : path}];

folderProbe

probes.folderProbe(path,function(err,results){});

results = folderSizeKo;

cpuProbe

probes.cpuProbe(function(err,results){});

results = { spot    : percentRigthNow,
            one     : averageLastMinute,
            five    : averageLastFiveMinutes,
            fifteen : averageLastFifteenMinutes};

memoryProbe

probes.memoryProbe(function(err,results){});

results = {freeMemory       : freeMemory,
            activeMemory    : usedMemory,
            totalMemory     : totalMemory};

processListProbe

probes.processListProbe(function(err,results){});

results = [{pid  : processPid,
            name : commandName,
            time : elapsedTime,
            pcpu : percentOfCpuUsed,
            pmem : percentOfMemoryUsed}];

About

Node.js module to monitor key system statistics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published