cpu() improved detection (win)
This commit is contained in:
parent
595c17abaf
commit
ec513b88bd
@ -77,6 +77,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
|
|||||||
|
|
||||||
| Version | Date | Comment |
|
| Version | Date | Comment |
|
||||||
| -------------- | -------------- | -------- |
|
| -------------- | -------------- | -------- |
|
||||||
|
| 5.8.6 | 2021-08-26 | `cpu()` improved detection (win) |
|
||||||
| 5.8.5 | 2021-08-26 | `osInfo()` hyper-v detection fix (win VM) |
|
| 5.8.5 | 2021-08-26 | `osInfo()` hyper-v detection fix (win VM) |
|
||||||
| 5.8.4 | 2021-08-26 | `graphics()` added vendor (macOS) |
|
| 5.8.4 | 2021-08-26 | `graphics()` added vendor (macOS) |
|
||||||
| 5.8.3 | 2021-08-26 | `graphics()` fix empty controller (macOS) |
|
| 5.8.3 | 2021-08-26 | `graphics()` fix empty controller (macOS) |
|
||||||
|
|||||||
@ -56,6 +56,11 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">5.8.6</th>
|
||||||
|
<td>2021-08-26</td>
|
||||||
|
<td><span class="code">cpu()</span> improved detection (win)</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">5.8.5</th>
|
<th scope="row">5.8.5</th>
|
||||||
<td>2021-08-26</td>
|
<td>2021-08-26</td>
|
||||||
|
|||||||
@ -170,7 +170,7 @@
|
|||||||
<img class="logo" src="assets/logo.png">
|
<img class="logo" src="assets/logo.png">
|
||||||
<div class="title">systeminformation</div>
|
<div class="title">systeminformation</div>
|
||||||
<div class="subtitle"><span id="typed"></span> </div>
|
<div class="subtitle"><span id="typed"></span> </div>
|
||||||
<div class="version">New Version: <span id="version">5.8.5</span></div>
|
<div class="version">New Version: <span id="version">5.8.6</span></div>
|
||||||
<button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button>
|
<button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="down">
|
<div class="down">
|
||||||
|
|||||||
11
lib/cpu.js
11
lib/cpu.js
@ -753,7 +753,8 @@ function getCpu() {
|
|||||||
const workload = [];
|
const workload = [];
|
||||||
workload.push(util.wmic('cpu get /value'));
|
workload.push(util.wmic('cpu get /value'));
|
||||||
workload.push(util.wmic('path Win32_CacheMemory get CacheType,InstalledSize,Purpose'));
|
workload.push(util.wmic('path Win32_CacheMemory get CacheType,InstalledSize,Purpose'));
|
||||||
workload.push(util.powerShell('Get-ComputerInfo -property "HyperV*"'));
|
// workload.push(util.powerShell('Get-ComputerInfo -property "HyperV*"'));
|
||||||
|
workload.push(util.powerShell('(Get-CimInstance Win32_ComputerSystem).HypervisorPresent'));
|
||||||
|
|
||||||
Promise.all(
|
Promise.all(
|
||||||
workload
|
workload
|
||||||
@ -832,9 +833,11 @@ function getCpu() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
lines = data[2].split('\r\n');
|
// lines = data[2].split('\r\n');
|
||||||
result.virtualization = (util.getValue(lines, 'HyperVRequirementVirtualizationFirmwareEnabled').toLowerCase() === 'true');
|
// result.virtualization = (util.getValue(lines, 'HyperVRequirementVirtualizationFirmwareEnabled').toLowerCase() === 'true');
|
||||||
result.virtualization = (util.getValue(lines, 'HyperVisorPresent').toLowerCase() === 'true');
|
// result.virtualization = (util.getValue(lines, 'HyperVisorPresent').toLowerCase() === 'true');
|
||||||
|
const hyperv = data[2] ? data[2].toString().toLowerCase() : '';
|
||||||
|
result.virtualization = hyperv.indexOf('true') !== -1;
|
||||||
|
|
||||||
resolve(result);
|
resolve(result);
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user