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 = ; //Print the number of hard drives connected to the serverprobes;
Function Documentation
hardDriveProbe
probes; results = fileSystem : name totalSpace : Ko usedSpace : Ko availableSpace : Ko percentUsed : percent mountPoint : path;
folderProbe
probes; results = folderSizeKo;
cpuProbe
probes; results = spot : percentRigthNow one : averageLastMinute five : averageLastFiveMinutes fifteen : averageLastFifteenMinutes;
memoryProbe
probes; results = freeMemory : freeMemory activeMemory : usedMemory totalMemory : totalMemory;
processListProbe
probes; results = pid : processPid name : commandName time : elapsedTime pcpu : percentOfCpuUsed pmem : percentOfMemoryUsed;