From d98f3547e8d21b86ba25f3c4521cd3ec7777df46 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 25 Sep 2023 15:47:05 +0200 Subject: [statistics_reporting] Report legacy VMware CPUs --- modules-available/statistics_reporting/inc/queries.inc.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules-available/statistics_reporting/inc/queries.inc.php b/modules-available/statistics_reporting/inc/queries.inc.php index e82e79a4..a7e6ce9c 100644 --- a/modules-available/statistics_reporting/inc/queries.inc.php +++ b/modules-available/statistics_reporting/inc/queries.inc.php @@ -421,6 +421,15 @@ class Queries WHERE lastseen >= $from GROUP BY $key"); } + // Legacy CPU + $f = Database::queryFirst("SELECT Count(*) AS `total` + FROM machine m + INNER JOIN machine_x_hw mxh USING (machineuuid) + INNER JOIN statistic_hw_prop hwp ON (hwp.hwid = mxh.hwid AND hwp.prop = 'vmx-legacy' AND hwp.value <> 0) + WHERE m.lastseen >= $from"); + if (is_array($f)) { + $return['vmx-legacy'] = $f['total']; + } return $return; } -- cgit v1.2.3-55-g7522