tiny bug fix fsStats, DisksIO OSX

This commit is contained in:
Sebastian Hildebrandt 2016-09-02 09:49:58 +02:00
parent b5a02e3cd7
commit 036753186b
2 changed files with 6 additions and 2 deletions

View File

@ -10,6 +10,8 @@ Simple system and OS information library for [node.js][nodejs-url]
## Quick Start ## Quick Start
Collection of 25+ functions to retrieve detailed hardware, system and OS information (linux and OSX only)
### Installation ### Installation
```bash ```bash
@ -375,6 +377,7 @@ I am happy to discuss any comments and suggestions. Please feel free to contact
| Version | Date | Comment | | Version | Date | Comment |
| -------------- | -------------- | -------- | | -------------- | -------------- | -------- |
| 3.4.3 | 2016-09-02 | tiny bug fix fsStats, DisksIO OSX |
| 3.4.2 | 2016-09-01 | improved default network interface | | 3.4.2 | 2016-09-01 | improved default network interface |
| 3.4.1 | 2016-08-30 | updated docs | | 3.4.1 | 2016-08-30 | updated docs |
| 3.4.0 | 2016-08-30 | rewritten processes current cpu usage | | 3.4.0 | 2016-08-30 | rewritten processes current cpu usage |

View File

@ -80,6 +80,7 @@
// -------------------------------- // --------------------------------
// //
// version date comment // version date comment
// 3.4.3 2016-09-02 tiny bug fix fsStats, DisksIO OSX
// 3.4.2 2016-09-01 improved default network interface // 3.4.2 2016-09-01 improved default network interface
// 3.4.1 2016-08-30 updated docs // 3.4.1 2016-08-30 updated docs
// 3.4.0 2016-08-30 rewritten current process cpu usage (linux) // 3.4.0 2016-08-30 rewritten current process cpu usage (linux)
@ -1021,7 +1022,7 @@ function fsStats(callback) {
}) })
} }
if (_darwin) { if (_darwin) {
exec("ioreg -c IOBlockStorageDriver -k Statistics -r -w0 | sed -n '/IOBlockStorageDriver/,/Statistics/p' | grep 'Statistics' | tr -d [:alpha:] | tr -d [:punct:] | awk '{print $3, $10}'", function (error, stdout) { exec("ioreg -c IOBlockStorageDriver -k Statistics -r -w0 | sed -n '/IOBlockStorageDriver/,/Statistics/p' | grep 'Statistics' | tr -cd '01234567890,\n' | awk -F',' '{print $3, $10}'", function (error, stdout) {
if (!error) { if (!error) {
let lines = stdout.toString().split('\n'); let lines = stdout.toString().split('\n');
lines.forEach(function (line) { lines.forEach(function (line) {
@ -1121,7 +1122,7 @@ function disksIO(callback) {
}); });
} }
if (_darwin) { if (_darwin) {
exec("ioreg -c IOBlockStorageDriver -k Statistics -r -w0 | sed -n '/IOBlockStorageDriver/,/Statistics/p' | grep 'Statistics' | tr -d [:alpha:] | tr -d [:punct:] | awk '{print $1, $11}'", function (error, stdout) { exec("ioreg -c IOBlockStorageDriver -k Statistics -r -w0 | sed -n '/IOBlockStorageDriver/,/Statistics/p' | grep 'Statistics' | tr -cd '01234567890,\n' | awk -F',' '{print $1, $11}'", function (error, stdout) {
if (!error) { if (!error) {
let lines = stdout.toString().split('\n'); let lines = stdout.toString().split('\n');
lines.forEach(function (line) { lines.forEach(function (line) {