summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics/inc
diff options
context:
space:
mode:
authorSimon Rettberg2023-09-25 15:25:02 +0200
committerSimon Rettberg2023-09-25 15:25:02 +0200
commite440e54e36a5a79555b7ff8275cc50138d8ea766 (patch)
tree981a5a262bcc556d34a30bd49f9f78052f467c79 /modules-available/statistics/inc
parent[rebootcontrol] Make subnet deletion timoeut match that of machines (diff)
downloadslx-admin-e440e54e36a5a79555b7ff8275cc50138d8ea766.tar.gz
slx-admin-e440e54e36a5a79555b7ff8275cc50138d8ea766.tar.xz
slx-admin-e440e54e36a5a79555b7ff8275cc50138d8ea766.zip
[statistics] Add hints for old CPUs (to be implemented on client)
Diffstat (limited to 'modules-available/statistics/inc')
-rw-r--r--modules-available/statistics/inc/hardwareparser.inc.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules-available/statistics/inc/hardwareparser.inc.php b/modules-available/statistics/inc/hardwareparser.inc.php
index caa011d9..1c549976 100644
--- a/modules-available/statistics/inc/hardwareparser.inc.php
+++ b/modules-available/statistics/inc/hardwareparser.inc.php
@@ -338,6 +338,7 @@ class HardwareParser
return null;
}
// determine misc stuff first
+ $globalCpuExtra = [];
$globalMainboardExtra = [];
$localMainboardExtra = [];
// physical memory array
@@ -425,6 +426,9 @@ class HardwareParser
continue;
$localMainboardExtra['cpu-' . $key] = $data['cpu'][$key];
}
+ if ($data['cpu']['vmx-legacy'] ?? false) {
+ $globalCpuExtra['vmx-legacy'] = 1;
+ }
// Do the same hack with the primary NIC's speed and duplex. Even if it's not an onboard NIC, we only have one
// primary boot interface
$bootNic = $data['net']['boot0'] ?? $data['net']['eth0'] ?? null;
@@ -457,7 +461,8 @@ class HardwareParser
self::updateHwTypeFromDmi($uuid, $data, 4, HardwareInfo::CPU, ['Version'],
['Socket Designation'],
['Type', 'Family', 'Manufacturer', 'Signature', 'Version', 'Core Count', 'Thread Count'], // Global props, don't change
- ['Voltage', 'Current Speed', 'Upgrade', 'Core Enabled']);
+ ['Voltage', 'Current Speed', 'Upgrade', 'Core Enabled'],
+ $globalCpuExtra);
// Information about system slots
self::updateHwTypeFromDmi($uuid, $data, 9, HardwareInfo::SYSTEM_SLOT,
function (array &$entry): bool {