systeminformation 5.19.0 → 5.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -128,13 +128,14 @@ si.cpu()
128
128
 
129
129
  (last 7 major and minor version releases)
130
130
 
131
+ - Version 5.20.0: `mem()` added writeback and dirty (linux)
131
132
  - Version 5.19.0: `currentLoad()` added steal and guest time (linux)
132
133
  - Version 5.18.0: `fsSize()` added optional drive parameter
133
- - Version 5.17.0: `graphics()` added positionX, positionY (mac OS)
134
+ - Version 5.17.0: `graphics()` added positionX, positionY (macOS)
134
135
  - Version 5.16.0: `fsSize()` added rw property
135
136
  - Version 5.15.0: `blockDevices()` added device
136
137
  - Version 5.14.0: `blockDevices()` added raid group member (linux)
137
- - Version 5.13.0: `networkConnections()` added process name (mac OS)
138
+ - Version 5.13.0: `networkConnections()` added process name (macOS)
138
139
  - Version 5.12.0: `cpu()` added performance and efficiency cores
139
140
  - Version 5.11.0: `networkInterfaces()` added default property and default parameter
140
141
  - Version 5.10.0: basic `android` support
@@ -283,6 +284,8 @@ Full function reference with examples can be found at [https://systeminformation
283
284
  | | swaptotal | X | X | X | X | X | |
284
285
  | | swapused | X | X | X | X | X | |
285
286
  | | swapfree | X | X | X | X | X | |
287
+ | | writeback | X | | | | | |
288
+ | | dirty | X | | | | | |
286
289
  | si.memLayout(cb) | [{...}] | X | X | X | X | | Memory Layout (array) |
287
290
  | | [0].size | X | X | X | X | | size in bytes |
288
291
  | | [0].bank | X | X | | X | | memory bank |
package/lib/index.d.ts CHANGED
@@ -126,6 +126,8 @@ export namespace Systeminformation {
126
126
  swaptotal: number;
127
127
  swapused: number;
128
128
  swapfree: number;
129
+ writeback: number | null;
130
+ dirty: number | null;
129
131
  }
130
132
 
131
133
  interface MemLayoutData {
package/lib/memory.js CHANGED
@@ -162,7 +162,9 @@ function mem(callback) {
162
162
 
163
163
  swaptotal: 0,
164
164
  swapused: 0,
165
- swapfree: 0
165
+ swapfree: 0,
166
+ writeback: null,
167
+ dirty: null
166
168
  };
167
169
 
168
170
  if (_linux) {
@@ -193,6 +195,10 @@ function mem(callback) {
193
195
  result.swapfree = parseInt(util.getValue(lines, 'swapfree'), 10);
194
196
  result.swapfree = result.swapfree ? result.swapfree * 1024 : 0;
195
197
  result.swapused = result.swaptotal - result.swapfree;
198
+ result.writeback = parseInt(util.getValue(lines, 'writeback'), 10);
199
+ result.writeback = result.writeback ? result.writeback * 1024 : 0;
200
+ result.dirty = parseInt(util.getValue(lines, 'dirty'), 10);
201
+ result.dirty = result.dirty ? result.dirty * 1024 : 0;
196
202
  }
197
203
  if (callback) { callback(result); }
198
204
  resolve(result);
package/lib/wifi.js CHANGED
@@ -366,9 +366,9 @@ function parseWifiDarwin(wifiObj) {
366
366
  });
367
367
  }
368
368
  }
369
- // if (wifiItem.SSID) {
370
- // ssid = Buffer.from(wifiItem.SSID, 'base64').toString('utf8');
371
- // }
369
+ if (wifiItem.SSID) {
370
+ ssid = Buffer.from(wifiItem.SSID, 'base64').toString('utf8');
371
+ }
372
372
  result.push({
373
373
  ssid,
374
374
  bssid: wifiItem.BSSID || '',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "systeminformation",
3
- "version": "5.19.0",
3
+ "version": "5.20.0",
4
4
  "description": "Advanced, lightweight system and OS information library",
5
5
  "license": "MIT",
6
6
  "author": "Sebastian Hildebrandt <hildebrandt@plus-innovations.com> (https://plus-innovations.com)",