systeminformation 5.33.0 → 5.33.1
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/lib/network.js +15 -13
- package/package.json +1 -1
package/lib/network.js
CHANGED
|
@@ -1321,17 +1321,18 @@ function networkStatsSingle(iface) {
|
|
|
1321
1321
|
if (sections[i].trim() !== '') {
|
|
1322
1322
|
const lines = sections[i].trim().split('\r\n');
|
|
1323
1323
|
perfData.push({
|
|
1324
|
-
name: util
|
|
1325
|
-
|
|
1324
|
+
name: util.getValue(lines, 'Name', ':').toLowerCase(),
|
|
1325
|
+
desc: util
|
|
1326
|
+
.getValue(lines, 'InterfaceDescription', ':')
|
|
1326
1327
|
.replace(/[()[\] ]+/g, '')
|
|
1327
1328
|
.replace(/#|\//g, '_')
|
|
1328
1329
|
.toLowerCase(),
|
|
1329
|
-
rx_bytes: parseInt(util.getValue(lines, '
|
|
1330
|
-
rx_errors: parseInt(util.getValue(lines, '
|
|
1331
|
-
rx_dropped: parseInt(util.getValue(lines, '
|
|
1332
|
-
tx_bytes: parseInt(util.getValue(lines, '
|
|
1333
|
-
tx_errors: parseInt(util.getValue(lines, '
|
|
1334
|
-
tx_dropped: parseInt(util.getValue(lines, '
|
|
1330
|
+
rx_bytes: parseInt(util.getValue(lines, 'ReceivedBytes', ':'), 10),
|
|
1331
|
+
rx_errors: parseInt(util.getValue(lines, 'ReceivedPacketErrors', ':'), 10),
|
|
1332
|
+
rx_dropped: parseInt(util.getValue(lines, 'ReceivedDiscardedPackets', ':'), 10),
|
|
1333
|
+
tx_bytes: parseInt(util.getValue(lines, 'SentBytes', ':'), 10),
|
|
1334
|
+
tx_errors: parseInt(util.getValue(lines, 'OutboundPacketErrors', ':'), 10),
|
|
1335
|
+
tx_dropped: parseInt(util.getValue(lines, 'OutboundDiscardedPackets', ':'), 10)
|
|
1335
1336
|
});
|
|
1336
1337
|
}
|
|
1337
1338
|
}
|
|
@@ -1480,7 +1481,7 @@ function networkStatsSingle(iface) {
|
|
|
1480
1481
|
// Performance Data
|
|
1481
1482
|
util
|
|
1482
1483
|
.powerShell(
|
|
1483
|
-
'Get-
|
|
1484
|
+
'Get-NetAdapterStatistics | select Name,InterfaceDescription,ReceivedBytes,ReceivedPacketErrors,ReceivedDiscardedPackets,SentBytes,OutboundPacketErrors,OutboundDiscardedPackets | fl'
|
|
1484
1485
|
)
|
|
1485
1486
|
.then((stdout, error) => {
|
|
1486
1487
|
if (!error) {
|
|
@@ -1508,10 +1509,11 @@ function networkStatsSingle(iface) {
|
|
|
1508
1509
|
.replace(/[()[\] ]+/g, '')
|
|
1509
1510
|
.replace('#', '_')
|
|
1510
1511
|
.toLowerCase()) &&
|
|
1511
|
-
det.
|
|
1512
|
-
.
|
|
1513
|
-
|
|
1514
|
-
|
|
1512
|
+
(det.iface.toLowerCase() === detail.name ||
|
|
1513
|
+
det.ifaceName
|
|
1514
|
+
.replace(/[()[\] ]+/g, '')
|
|
1515
|
+
.replace(/#|\//g, '_')
|
|
1516
|
+
.toLowerCase() === detail.desc)
|
|
1515
1517
|
) {
|
|
1516
1518
|
ifaceName = det.iface;
|
|
1517
1519
|
rx_bytes = detail.rx_bytes;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "systeminformation",
|
|
3
|
-
"version": "5.33.
|
|
3
|
+
"version": "5.33.1",
|
|
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)",
|