From 1e2e36af2399b20ab1957d454141597804a2f8db Mon Sep 17 00:00:00 2001 From: Bharath Vignesh J K <52282402+RazCrimson@users.noreply.github.com> Date: Sat, 22 Jun 2024 02:31:57 +0530 Subject: chg: cpu_percent - support CPU Name for Raspberry Pi fixes #2616 --- glances/cpu_percent.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glances/cpu_percent.py b/glances/cpu_percent.py index 690f9fd1..211b1ae0 100644 --- a/glances/cpu_percent.py +++ b/glances/cpu_percent.py @@ -71,7 +71,7 @@ class CpuPercent: def __get_cpu_name(self): # Get the CPU name once from the /proc/cpuinfo file - # Read the first line with the "model name" + # Read the first line with the "model name" ("Model" for Raspberry Pi) ret = None try: cpuinfo_file = open('/proc/cpuinfo').readlines() @@ -79,7 +79,7 @@ class CpuPercent: pass else: for line in cpuinfo_file: - if line.startswith('model name'): + if line.startswith('model name') or line.startswith('Model'): ret = line.split(':')[1].strip() break return ret if ret else 'CPU' -- cgit v1.2.3