0.0.14 • Published 11 years ago

os-utils v0.0.14

Weekly downloads
17,259
License
-
Repository
github
Last release
11 years ago

os-utils

An operating system utility library. Some methods are wrappers of node libraries and others are calculations made by the module.

Installation

One line installation with npm.

npm install os-utils

Then in your code

var os 	= require('os-utils');


os.cpuUsage(function(v){
	console.log( 'CPU Usage (%): ' + v );
});

os.cpuFree(function(v){
	console.log( 'CPU Free:' + v );
});

Usage

The following methods are available:

Calculate CPU usage for the next second

This is not an average of CPU usage like it is in the "os" module. The callback will receive a parameter with the value.

os.cpuUsage( function(value) { /* ... */ } );

Calculate free CPU for the next second

This is not based on average CPU usage like it is in the "os" module. The callback will receive a parameter with the value.

os.cpuFree( function(value) { /* ... */ } );

Get the platform name

os.platform();

Get number of CPUs

os.cpuCount()

Get current free memory

os.freemem()

Get total memory

os.totalmem()

Get a current free memory percentage

os.freememPercentage()

Get the number of seconds the system has been running for

os.sysUptime();

Get the number of seconds the process has been running

os.processUptime() 

Get average load for 1, 5 or 15 minutes

os.loadavg(1)
os.loadavg(5)
os.loadavg(15)
@zuus/serverrandom-wrapperk8-healthchecksbuerli-nodecentronodes@schiphol-nl/station1@aliconnect/aim-v1avrorajsviolet-evergardenstatuspage-ls@avrora/enginejhonalcala@reekoh/reekoh-testreekoh-node-devreekoh-testreekoh-test-devredi-os@infinitebrahmanuniverse/nolb-os-nomercymediaserver@everything-registry/sub-chunk-2389yoyorobotvtopvtop-node10wsninjatyzxbsuap-gatewayusentry-clivalheim-managervlc2vlclustervelitvelexpress-health@squirrelmobile/logger-hook@sumor-cloud/deployer@sumor/utilsepsagon-frameworks@saulx/selva-server@skbkontur/monitoring-client@sporttotal/selva-serveraccessesadugah-dashboard-pluginaladug@ashinga48/pm2-server-monitor-single@acter/gateway@xytoki/xystatus-client@webtypen/monitor-client@aliconnect/sdk@axeridev/embergfke-supportapplebyestatetrackingmnk-sdblockermnksoft-sdblockermscksdblockermsc-sdblockermulti-monitoring-nodejsmulti-monitoring-os@ecurrah/valheim-managermywhatsapp-api-node-baileys-mdmywhatsapp-api-node-whatsapp-web.jslow-usagediscord-god.jslongtandkaframeworkdesmix_monitor_serverdesmix_monitor_serverslaoliu2577docker-dashboardcal-infohjadunemo-monitoring-module@bionicmetrics/bionicannamsaxeri-emberawv3-node@buerli.io/nodenode-instance-managernode-instance-manager-apinode-health-checkernode-dashmonitorest@egodigital/egoosebasicservice@cesarhub/logger-hook@chain-reactor/gate@classcad/nodehey-joehealthchecks-apihealthchecks-apisjetronome-clientjgb-clijgb-sharedboidcmdboidcmd-clusterboidcmd-cluster-pibotbrainsjz-process-managercrystalsystem.jskook-bot-tskoishi-plugin-iirose-media-request
0.0.14

11 years ago

0.0.13

12 years ago

0.0.12

12 years ago

0.0.11

12 years ago

0.0.10

12 years ago

0.0.9

12 years ago

0.0.6

12 years ago

0.0.4

12 years ago

0.0.3

12 years ago

0.0.2

12 years ago

0.0.1

12 years ago