From 3e17fc2318746eb5ffa1962b9a5c366b4c5b6ccc Mon Sep 17 00:00:00 2001 From: laf Date: Mon, 21 Sep 2015 14:02:25 +0000 Subject: [PATCH] Some *nix systems do not provide a descr :( --- includes/discovery/processors/hrdevice.inc.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/includes/discovery/processors/hrdevice.inc.php b/includes/discovery/processors/hrdevice.inc.php index 97d021745d..070a49f06f 100644 --- a/includes/discovery/processors/hrdevice.inc.php +++ b/includes/discovery/processors/hrdevice.inc.php @@ -53,6 +53,12 @@ if (is_array($hrDevice_array)) { $descr = 'Processor'; } + // Workaround for Linux where some CPUs don't have a description + if ($device['os'] == 'linux' && empty($entry['hrDeviceDescr'])) { + $descr = 'Processor'; + } + + $descr = str_replace('CPU ', '', $descr); $descr = str_replace('(TM)', '', $descr); $descr = str_replace('(R)', '', $descr);