systeminformation 5.24.8 → 5.25.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/LICENSE +1 -1
- package/README.md +14 -6
- package/lib/audio.js +1 -1
- package/lib/battery.js +1 -1
- package/lib/bluetooth.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/cpu.js +21 -8
- package/lib/docker.js +1 -1
- package/lib/dockerSocket.js +1 -1
- package/lib/filesystem.js +1 -1
- package/lib/graphics.js +1 -1
- package/lib/index.js +1 -1
- package/lib/internet.js +1 -1
- package/lib/memory.js +1 -1
- package/lib/network.js +1 -1
- package/lib/osinfo.js +13 -2
- package/lib/printer.js +1 -1
- package/lib/processes.js +1 -1
- package/lib/system.js +1 -1
- package/lib/usb.js +1 -1
- package/lib/users.js +1 -1
- package/lib/util.js +2 -2
- package/lib/virtualbox.js +1 -1
- package/lib/wifi.js +1 -1
- package/package.json +1 -1
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2014-
|
|
3
|
+
Copyright (c) 2014-2025 Sebastian Hildebrandt
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
6
|
this software and associated documentation files (the "Software"), to deal in
|
package/README.md
CHANGED
|
@@ -67,6 +67,15 @@ appreciated - [Buy me a coffee](https://www.buymeacoffee.com/systeminfo).
|
|
|
67
67
|
**Your contribution** make it possible for me to keep working on this project,
|
|
68
68
|
add new features and support more platforms. Thank you in advance!
|
|
69
69
|
|
|
70
|
+
## Node.js ✅, Bun ✅ and Deno ✅
|
|
71
|
+
|
|
72
|
+
I tested this library with Node.js, Bun and Deno (V2.x) with no issues. There is
|
|
73
|
+
currently only one problem on Denos side: os.freemem() pollyfill is currently
|
|
74
|
+
not correct (version 2.1.4) but there is already a fix (not yet published).
|
|
75
|
+
|
|
76
|
+
**Attention**: This library is supposed to be used as a backend/server-side
|
|
77
|
+
library and **will definitely not work within a browser**.
|
|
78
|
+
|
|
70
79
|
## New Version 5.0
|
|
71
80
|
|
|
72
81
|
The new Version 5 is here - this next major version release 5.0 comes with new
|
|
@@ -109,9 +118,6 @@ and OS information.
|
|
|
109
118
|
Android support
|
|
110
119
|
- no npm dependencies
|
|
111
120
|
|
|
112
|
-
**Attention**: this is a `node.js` library. It is supposed to be used as a
|
|
113
|
-
backend/server-side library and will definitely not work within a browser.
|
|
114
|
-
|
|
115
121
|
### Installation
|
|
116
122
|
|
|
117
123
|
```bash
|
|
@@ -172,6 +178,7 @@ si.cpu()
|
|
|
172
178
|
|
|
173
179
|
(last 7 major and minor version releases)
|
|
174
180
|
|
|
181
|
+
- Version 5.24.0: `versions()` added homebrew
|
|
175
182
|
- Version 5.24.0: `versions()` added bun and deno
|
|
176
183
|
- Version 5.23.0: `usb()` added serial number (linux)
|
|
177
184
|
- Version 5.22.0: `wifiConnections()` added signal quality
|
|
@@ -1123,7 +1130,7 @@ OSX Temperature: credits here are going to:
|
|
|
1123
1130
|
|
|
1124
1131
|
Linux is a registered trademark of Linus Torvalds. Apple, macOS, OS X are
|
|
1125
1132
|
registered trademarks of Apple Inc., Windows is a registered trademark of
|
|
1126
|
-
Microsoft Corporation. Node.js is a trademark of
|
|
1133
|
+
Microsoft Corporation. Node.js is a trademark of OpenJS Foundation, Intel is a
|
|
1127
1134
|
trademark of Intel Corporation, AMD is a trademark of Advanced Micro Devices
|
|
1128
1135
|
Inc., Raspberry Pi is a trademark of the Raspberry Pi Foundation, Debian is a
|
|
1129
1136
|
trademark owned by Software in the Public Interest, Inc., Ubuntu is a trademark
|
|
@@ -1135,7 +1142,8 @@ Oracle Corporation, Xen is a registered trademark of Xen Project, QEMU is a
|
|
|
1135
1142
|
trademark of Fabrice Bellard, bochs is a trademark of The Bochs Project, USB and
|
|
1136
1143
|
USB Logo are trademarks of USB Implementation Forum, Bluetooth and Bluetooth
|
|
1137
1144
|
Logo are trademarks of Bluetooth SIG, Android is a trademark of Google LLC,
|
|
1138
|
-
Parallels is a trademarks of Parallels International GmbH.
|
|
1145
|
+
Parallels is a trademarks of Parallels International GmbH. Bun is a trademark of
|
|
1146
|
+
Codeblog Corp. Deno is a trademark of Deno Land Inc.
|
|
1139
1147
|
|
|
1140
1148
|
All other trademarks are the property of their respective owners.
|
|
1141
1149
|
|
|
@@ -1143,7 +1151,7 @@ All other trademarks are the property of their respective owners.
|
|
|
1143
1151
|
|
|
1144
1152
|
> The [`MIT`][license-url] License (MIT)
|
|
1145
1153
|
>
|
|
1146
|
-
> Copyright © 2014-
|
|
1154
|
+
> Copyright © 2014-2025 Sebastian Hildebrandt,
|
|
1147
1155
|
> [+innovations](http://www.plus-innovations.com).
|
|
1148
1156
|
>
|
|
1149
1157
|
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
package/lib/audio.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// ----------------------------------------------------------------------------------
|
|
6
6
|
// Description: System Information - library
|
|
7
7
|
// for Node.js
|
|
8
|
-
// Copyright: (c) 2014 -
|
|
8
|
+
// Copyright: (c) 2014 - 2025
|
|
9
9
|
// Author: Sebastian Hildebrandt
|
|
10
10
|
// ----------------------------------------------------------------------------------
|
|
11
11
|
// License: MIT
|
package/lib/battery.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// ----------------------------------------------------------------------------------
|
|
6
6
|
// Description: System Information - library
|
|
7
7
|
// for Node.js
|
|
8
|
-
// Copyright: (c) 2014 -
|
|
8
|
+
// Copyright: (c) 2014 - 2025
|
|
9
9
|
// Author: Sebastian Hildebrandt
|
|
10
10
|
// ----------------------------------------------------------------------------------
|
|
11
11
|
// License: MIT
|
package/lib/bluetooth.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// ----------------------------------------------------------------------------------
|
|
6
6
|
// Description: System Information - library
|
|
7
7
|
// for Node.js
|
|
8
|
-
// Copyright: (c) 2014 -
|
|
8
|
+
// Copyright: (c) 2014 - 2025
|
|
9
9
|
// Author: Sebastian Hildebrandt
|
|
10
10
|
// ----------------------------------------------------------------------------------
|
|
11
11
|
// License: MIT
|
package/lib/cli.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
// ----------------------------------------------------------------------------------
|
|
8
8
|
// Description: System Information - library
|
|
9
9
|
// for Node.js
|
|
10
|
-
// Copyright: (c) 2014 -
|
|
10
|
+
// Copyright: (c) 2014 - 2025
|
|
11
11
|
// Author: Sebastian Hildebrandt
|
|
12
12
|
// ----------------------------------------------------------------------------------
|
|
13
13
|
// License: MIT
|
package/lib/cpu.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// ----------------------------------------------------------------------------------
|
|
6
6
|
// Description: System Information - library
|
|
7
7
|
// for Node.js
|
|
8
|
-
// Copyright: (c) 2014 -
|
|
8
|
+
// Copyright: (c) 2014 - 2025
|
|
9
9
|
// Author: Sebastian Hildebrandt
|
|
10
10
|
// ----------------------------------------------------------------------------------
|
|
11
11
|
// License: MIT
|
|
@@ -995,16 +995,29 @@ function getCpuCurrentSpeedSync() {
|
|
|
995
995
|
let maxFreq = 0;
|
|
996
996
|
let avgFreq = 0;
|
|
997
997
|
let cores = [];
|
|
998
|
+
let speeds = [];
|
|
998
999
|
|
|
999
|
-
if (cpus && cpus.length) {
|
|
1000
|
+
if (cpus && cpus.length && cpus[0].speed) {
|
|
1000
1001
|
for (let i in cpus) {
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1002
|
+
speeds.push(cpus[i].speed > 100 ? (cpus[i].speed + 1) / 1000 : cpus[i].speed / 10);
|
|
1003
|
+
}
|
|
1004
|
+
} else if (_linux) {
|
|
1005
|
+
try {
|
|
1006
|
+
speedStrings = execSync('cat /proc/cpuinfo | grep "cpu MHz" | cut -d " " -f 3', util.execOptsLinux).toString().split('\n');
|
|
1007
|
+
for (let i in speedStrings) {
|
|
1008
|
+
speeds.push(parseInt(speedStrings, 10));
|
|
1007
1009
|
}
|
|
1010
|
+
} catch {
|
|
1011
|
+
util.noop();
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
if (speeds && speeds.length) {
|
|
1016
|
+
for (let i in speeds) {
|
|
1017
|
+
avgFreq = avgFreq + speeds[i];
|
|
1018
|
+
if (speeds[i] > maxFreq) { maxFreq = speeds[i]; }
|
|
1019
|
+
if (speeds[i] < minFreq) { minFreq = speeds[i]; }
|
|
1020
|
+
cores.push(parseFloat(speeds[i].toFixed(2)));
|
|
1008
1021
|
}
|
|
1009
1022
|
avgFreq = avgFreq / cpus.length;
|
|
1010
1023
|
return {
|
package/lib/docker.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// ----------------------------------------------------------------------------------
|
|
6
6
|
// Description: System Information - library
|
|
7
7
|
// for Node.js
|
|
8
|
-
// Copyright: (c) 2014 -
|
|
8
|
+
// Copyright: (c) 2014 - 2025
|
|
9
9
|
// Author: Sebastian Hildebrandt
|
|
10
10
|
// ----------------------------------------------------------------------------------
|
|
11
11
|
// License: MIT
|
package/lib/dockerSocket.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// ----------------------------------------------------------------------------------
|
|
6
6
|
// Description: System Information - library
|
|
7
7
|
// for Node.js
|
|
8
|
-
// Copyright: (c) 2014 -
|
|
8
|
+
// Copyright: (c) 2014 - 2025
|
|
9
9
|
// Author: Sebastian Hildebrandt
|
|
10
10
|
// ----------------------------------------------------------------------------------
|
|
11
11
|
// License: MIT
|
package/lib/filesystem.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// ----------------------------------------------------------------------------------
|
|
6
6
|
// Description: System Information - library
|
|
7
7
|
// for Node.js
|
|
8
|
-
// Copyright: (c) 2014 -
|
|
8
|
+
// Copyright: (c) 2014 - 2025
|
|
9
9
|
// Author: Sebastian Hildebrandt
|
|
10
10
|
// ----------------------------------------------------------------------------------
|
|
11
11
|
// License: MIT
|
package/lib/graphics.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// ----------------------------------------------------------------------------------
|
|
6
6
|
// Description: System Information - library
|
|
7
7
|
// for Node.js
|
|
8
|
-
// Copyright: (c) 2014 -
|
|
8
|
+
// Copyright: (c) 2014 - 2025
|
|
9
9
|
// Author: Sebastian Hildebrandt
|
|
10
10
|
// ----------------------------------------------------------------------------------
|
|
11
11
|
// License: MIT
|
package/lib/index.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// ----------------------------------------------------------------------------------
|
|
6
6
|
// Description: System Information - library
|
|
7
7
|
// for Node.js
|
|
8
|
-
// Copyright: (c) 2014 -
|
|
8
|
+
// Copyright: (c) 2014 - 2025
|
|
9
9
|
// Author: Sebastian Hildebrandt
|
|
10
10
|
// ----------------------------------------------------------------------------------
|
|
11
11
|
// Contributors: Guillaume Legrain (https://github.com/glegrain)
|
package/lib/internet.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// ----------------------------------------------------------------------------------
|
|
6
6
|
// Description: System Information - library
|
|
7
7
|
// for Node.js
|
|
8
|
-
// Copyright: (c) 2014 -
|
|
8
|
+
// Copyright: (c) 2014 - 2025
|
|
9
9
|
// Author: Sebastian Hildebrandt
|
|
10
10
|
// ----------------------------------------------------------------------------------
|
|
11
11
|
// License: MIT
|
package/lib/memory.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// ----------------------------------------------------------------------------------
|
|
6
6
|
// Description: System Information - library
|
|
7
7
|
// for Node.js
|
|
8
|
-
// Copyright: (c) 2014 -
|
|
8
|
+
// Copyright: (c) 2014 - 2025
|
|
9
9
|
// Author: Sebastian Hildebrandt
|
|
10
10
|
// ----------------------------------------------------------------------------------
|
|
11
11
|
// License: MIT
|
package/lib/network.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// ----------------------------------------------------------------------------------
|
|
6
6
|
// Description: System Information - library
|
|
7
7
|
// for Node.js
|
|
8
|
-
// Copyright: (c) 2014 -
|
|
8
|
+
// Copyright: (c) 2014 - 2025
|
|
9
9
|
// Author: Sebastian Hildebrandt
|
|
10
10
|
// ----------------------------------------------------------------------------------
|
|
11
11
|
// License: MIT
|
package/lib/osinfo.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// ----------------------------------------------------------------------------------
|
|
6
6
|
// Description: System Information - library
|
|
7
7
|
// for Node.js
|
|
8
|
-
// Copyright: (c) 2014 -
|
|
8
|
+
// Copyright: (c) 2014 - 2025
|
|
9
9
|
// Author: Sebastian Hildebrandt
|
|
10
10
|
// ----------------------------------------------------------------------------------
|
|
11
11
|
// License: MIT
|
|
@@ -463,6 +463,7 @@ function versions(apps, callback) {
|
|
|
463
463
|
git: '',
|
|
464
464
|
grunt: '',
|
|
465
465
|
gulp: '',
|
|
466
|
+
homebrew: '',
|
|
466
467
|
java: '',
|
|
467
468
|
mongodb: '',
|
|
468
469
|
mysql: '',
|
|
@@ -494,7 +495,7 @@ function versions(apps, callback) {
|
|
|
494
495
|
if (apps === '*') {
|
|
495
496
|
return {
|
|
496
497
|
versions: versionObject,
|
|
497
|
-
counter:
|
|
498
|
+
counter: 34
|
|
498
499
|
};
|
|
499
500
|
}
|
|
500
501
|
if (!Array.isArray(apps)) {
|
|
@@ -609,6 +610,16 @@ function versions(apps, callback) {
|
|
|
609
610
|
functionProcessed();
|
|
610
611
|
});
|
|
611
612
|
}
|
|
613
|
+
if ({}.hasOwnProperty.call(appsObj.versions, 'homebrew')) {
|
|
614
|
+
cmd = 'brew';
|
|
615
|
+
exec(`${cmd} --version`, function (error, stdout) {
|
|
616
|
+
if (!error) {
|
|
617
|
+
const brew = stdout.toString().split('\n')[0] || '';
|
|
618
|
+
appsObj.versions.homebrew = (brew.toLowerCase().split(' ')[1] || '').trim();
|
|
619
|
+
}
|
|
620
|
+
functionProcessed();
|
|
621
|
+
});
|
|
622
|
+
}
|
|
612
623
|
if ({}.hasOwnProperty.call(appsObj.versions, 'tsc')) {
|
|
613
624
|
cmd = 'tsc';
|
|
614
625
|
if (_windows) {
|
package/lib/printer.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// ----------------------------------------------------------------------------------
|
|
6
6
|
// Description: System Information - library
|
|
7
7
|
// for Node.js
|
|
8
|
-
// Copyright: (c) 2014 -
|
|
8
|
+
// Copyright: (c) 2014 - 2025
|
|
9
9
|
// Author: Sebastian Hildebrandt
|
|
10
10
|
// ----------------------------------------------------------------------------------
|
|
11
11
|
// License: MIT
|
package/lib/processes.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// ----------------------------------------------------------------------------------
|
|
6
6
|
// Description: System Information - library
|
|
7
7
|
// for Node.js
|
|
8
|
-
// Copyright: (c) 2014 -
|
|
8
|
+
// Copyright: (c) 2014 - 2025
|
|
9
9
|
// Author: Sebastian Hildebrandt
|
|
10
10
|
// ----------------------------------------------------------------------------------
|
|
11
11
|
// License: MIT
|
package/lib/system.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// ----------------------------------------------------------------------------------
|
|
6
6
|
// Description: System Information - library
|
|
7
7
|
// for Node.js
|
|
8
|
-
// Copyright: (c) 2014 -
|
|
8
|
+
// Copyright: (c) 2014 - 2025
|
|
9
9
|
// Author: Sebastian Hildebrandt
|
|
10
10
|
// ----------------------------------------------------------------------------------
|
|
11
11
|
// License: MIT
|
package/lib/usb.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// ----------------------------------------------------------------------------------
|
|
6
6
|
// Description: System Information - library
|
|
7
7
|
// for Node.js
|
|
8
|
-
// Copyright: (c) 2014 -
|
|
8
|
+
// Copyright: (c) 2014 - 2025
|
|
9
9
|
// Author: Sebastian Hildebrandt
|
|
10
10
|
// ----------------------------------------------------------------------------------
|
|
11
11
|
// License: MIT
|
package/lib/users.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// ----------------------------------------------------------------------------------
|
|
6
6
|
// Description: System Information - library
|
|
7
7
|
// for Node.js
|
|
8
|
-
// Copyright: (c) 2014 -
|
|
8
|
+
// Copyright: (c) 2014 - 2025
|
|
9
9
|
// Author: Sebastian Hildebrandt
|
|
10
10
|
// ----------------------------------------------------------------------------------
|
|
11
11
|
// License: MIT
|
package/lib/util.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// ----------------------------------------------------------------------------------
|
|
6
6
|
// Description: System Information - library
|
|
7
7
|
// for Node.js
|
|
8
|
-
// Copyright: (c) 2014 -
|
|
8
|
+
// Copyright: (c) 2014 - 2025
|
|
9
9
|
// Author: Sebastian Hildebrandt
|
|
10
10
|
// ----------------------------------------------------------------------------------
|
|
11
11
|
// License: MIT
|
|
@@ -2515,7 +2515,7 @@ function checkWebsite(url, timeout = 5000) {
|
|
|
2515
2515
|
const t = Date.now();
|
|
2516
2516
|
return new Promise((resolve) => {
|
|
2517
2517
|
const request = http
|
|
2518
|
-
.get(url,
|
|
2518
|
+
.get(url, function (res) {
|
|
2519
2519
|
res.on('data', () => { });
|
|
2520
2520
|
res.on('end', () => {
|
|
2521
2521
|
resolve({
|
package/lib/virtualbox.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// ----------------------------------------------------------------------------------
|
|
6
6
|
// Description: System Information - library
|
|
7
7
|
// for Node.js
|
|
8
|
-
// Copyright: (c) 2014 -
|
|
8
|
+
// Copyright: (c) 2014 - 2025
|
|
9
9
|
// Author: Sebastian Hildebrandt
|
|
10
10
|
// ----------------------------------------------------------------------------------
|
|
11
11
|
// License: MIT
|
package/lib/wifi.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// ----------------------------------------------------------------------------------
|
|
6
6
|
// Description: System Information - library
|
|
7
7
|
// for Node.js
|
|
8
|
-
// Copyright: (c) 2014 -
|
|
8
|
+
// Copyright: (c) 2014 - 2025
|
|
9
9
|
// Author: Sebastian Hildebrandt
|
|
10
10
|
// ----------------------------------------------------------------------------------
|
|
11
11
|
// License: MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "systeminformation",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.25.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)",
|