systeminformation 5.19.1 → 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 +3 -0
- package/lib/index.d.ts +2 -0
- package/lib/memory.js +7 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -128,6 +128,7 @@ 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
134
|
- Version 5.17.0: `graphics()` added positionX, positionY (macOS)
|
|
@@ -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
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "systeminformation",
|
|
3
|
-
"version": "5.
|
|
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)",
|