Comparing version 0.0.11 to 0.0.12
@@ -42,3 +42,3 @@ var _os = require('os'); | ||
require('child_process').exec('df -h', function(error, stdout, stderr) { | ||
require('child_process').exec('df -k', function(error, stdout, stderr) { | ||
@@ -55,5 +55,5 @@ var total = 0; | ||
total = disk_info[1] | ||
used = disk_info[2] | ||
free = disk_info[3] | ||
total = Math.ceil((disk_info[1] * 1024)/ Math.pow(1024,3)); | ||
used = Math.ceil(disk_info[2] * 1024 / Math.pow(1024,3)) ; | ||
free = Math.ceil(disk_info[3] * 1024 / Math.pow(1024,3)) ; | ||
@@ -64,3 +64,11 @@ callback(total, free, used); | ||
/* | ||
* Returns All the load average usage for 1, 5 or 15 minutes. | ||
*/ | ||
exports.allLoadavg = function(){ | ||
var loads = _os.loadavg(); | ||
return loads[0]+', '+loads[1]+', '+loads[2]; | ||
} | ||
@@ -67,0 +75,0 @@ /* |
{ | ||
"name" : "os-utils", | ||
"version" : "0.0.11", | ||
"version" : "0.0.12", | ||
"description" : "an operating-system utility library", | ||
@@ -5,0 +5,0 @@ "url" : "http://oscar-mejia.com", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7368
146