Node.js Binding to SIGAR (System Information Gatherer And Reporter)
OTHER License
A complete binding to the SIGAR library.
Documentation is available on the project website.
Note, documentation include important installation instruction for some platforms.
SIGAR is a cross platform interface for gathering system information. From the project website, such information include:
var sigar = require('sigar');
console.log(sigar.version()); // returns the version
// invoke the library
var Sigar = sigar.init();
console.log(sigar.cpu()); // {}
Sigar.mem();
> {
ram: Number
total: Number
used: Number
free: Number
actual_used: Number
actual_free: Number
used_percent: Number
free_percent: Number
}
Sigar.swap();
{
total: Number
used: Number
free: Number
page_in: Number
page_out: Number
}
Sigar.uptime();
> 52883 // seconds
Sigar.loadavg();
[0.11, 0.13, 0.09]
Sigar.resourceLimit(); Sigar.whoList(); Sigar.sysInfo(); Sigar.fqdn(); // CPU Sigar.cpu(); Sigar.cpuList(); Sigar.cpuInfoList(); // Process Sigar.procList(); Sigar.procStat(); Sigar.procMem(); Sigar.procCred(); Sigar.procTime(); Sigar.procCpu(); Sigar.procState(); Sigar.procArgs(); Sigar.procEnv(); Sigar.procFd(); Sigar.procExe(); Sigar.procModules(); Sigar.procPort(); Sigar.threadCpu(); // Disk Sigar.fileSystemList(); Sigar.fileSystemUsage(); Sigar.fileSystemPing(); // Network Sigar.netInfo(); Sigar.netRouteList(); Sigar.netInterfaceList(); Sigar.netInterfaceConfig(); Sigar.netInterfaceConfigPrimary(); Sigar.netInterfaceStat(); Sigar.netConnectionList(); Sigar.netListenAddress(); Sigar.netStat(); Sigar.netStatPort(); Sigar.tcp(); Sigar.nfsClientV2(); Sigar.nfsServerV2(); Sigar.arpList(); // Misc Sigar.rpcPing();
sigar_format.c
functionsnode_sigar_utils.cc::node_sigar_str2net_address()
)Node Sigar is licensed under the BSD license.