systeminformation 5.21.23 → 5.21.24
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/cpu.js +2 -2
- package/lib/osinfo.js +6 -2
- package/package.json +1 -1
package/lib/cpu.js
CHANGED
|
@@ -766,8 +766,8 @@ function getCpu() {
|
|
|
766
766
|
|
|
767
767
|
const threadsPerCore = util.getValue(lines, 'thread(s) per core') || '1';
|
|
768
768
|
const processors = util.getValue(lines, 'socket(s)') || '1';
|
|
769
|
-
|
|
770
|
-
|
|
769
|
+
const threadsPerCoreInt = parseInt(threadsPerCore, 10); // threads per code (normally only for performance cores)
|
|
770
|
+
const processorsInt = parseInt(processors, 10) || 1; // number of sockets / processor units in machine (normally 1)
|
|
771
771
|
const coresPerSocket = parseInt(util.getValue(lines, 'core(s) per socket'), 10); // number of cores (e.g. 16 on i12900)
|
|
772
772
|
result.physicalCores = coresPerSocket ? coresPerSocket * processorsInt : result.cores / threadsPerCoreInt;
|
|
773
773
|
result.performanceCores = threadsPerCoreInt > 1 ? result.cores - result.physicalCores : result.cores;
|
package/lib/osinfo.js
CHANGED
|
@@ -243,14 +243,18 @@ function osInfo(callback) {
|
|
|
243
243
|
release[line.split('=')[0].trim().toUpperCase()] = line.split('=')[1].trim();
|
|
244
244
|
}
|
|
245
245
|
});
|
|
246
|
+
result.distro = (release.DISTRIB_ID || release.NAME || 'unknown').replace(/"/g, '');
|
|
247
|
+
result.logofile = getLogoFile(result.distro);
|
|
246
248
|
let releaseVersion = (release.VERSION || '').replace(/"/g, '');
|
|
247
249
|
let codename = (release.DISTRIB_CODENAME || release.VERSION_CODENAME || '').replace(/"/g, '');
|
|
250
|
+
const prettyName = (release.PRETTY_NAME || '').replace(/"/g, '');
|
|
251
|
+
if (prettyName.indexOf(result.distro + ' ') === 0) {
|
|
252
|
+
releaseVersion = prettyName.replace(result.distro + ' ', '').trim();
|
|
253
|
+
}
|
|
248
254
|
if (releaseVersion.indexOf('(') >= 0) {
|
|
249
255
|
codename = releaseVersion.split('(')[1].replace(/[()]/g, '').trim();
|
|
250
256
|
releaseVersion = releaseVersion.split('(')[0].trim();
|
|
251
257
|
}
|
|
252
|
-
result.distro = (release.DISTRIB_ID || release.NAME || 'unknown').replace(/"/g, '');
|
|
253
|
-
result.logofile = getLogoFile(result.distro);
|
|
254
258
|
result.release = (releaseVersion || release.DISTRIB_RELEASE || release.VERSION_ID || 'unknown').replace(/"/g, '');
|
|
255
259
|
result.codename = codename;
|
|
256
260
|
result.codepage = util.getCodepage();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "systeminformation",
|
|
3
|
-
"version": "5.21.
|
|
3
|
+
"version": "5.21.24",
|
|
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)",
|