summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics/pages/hints.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/statistics/pages/hints.inc.php')
-rw-r--r--modules-available/statistics/pages/hints.inc.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/modules-available/statistics/pages/hints.inc.php b/modules-available/statistics/pages/hints.inc.php
index 55dbca52..fbde5b45 100644
--- a/modules-available/statistics/pages/hints.inc.php
+++ b/modules-available/statistics/pages/hints.inc.php
@@ -14,6 +14,7 @@ class SubPage
if (in_array(0, $locs)) {
$locs = [];
}
+ self::showLegacyCpu($locs);
self::showMemoryUpgrade($locs);
self::showSlowNics($locs);
self::showUnusedSpace($locs);
@@ -190,4 +191,28 @@ class SubPage
Render::addTemplate('hints-nic-speed', ['list' => $list]);
}
+ /**
+ * Show machines that have a CPU that is only supported by VMware 12.5.x,
+ * but not newer versions.
+ */
+ private static function showLegacyCpu(array $locs)
+ {
+ $list = [];
+ $q = new HardwareQuery(HardwareInfo::CPU);
+ if (!empty($locs)) {
+ $q->addMachineWhere('locationid', 'IN', $locs);
+ }
+ $q->addMachineWhere('lastseen', '>', strtotime('-60 days'));
+ $q->addMachineColumn('clientip');
+ $q->addMachineColumn('hostname');
+ $q->addMachineColumn('state');
+ $q->addMachineColumn('cpumodel');
+ $q->addGlobalColumn('vmx-legacy')->addCondition('<>', 0);
+ $list = $q->query()->fetchAll();
+ if (empty($list))
+ return;
+ ArrayUtil::sortByColumn($list, 'hostname');
+ Render::addTemplate('hints-cpu-legacy', ['list' => $list]);
+ }
+
} \ No newline at end of file