summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicolargo <nicolashennion@gmail.com>2024-06-26 18:10:00 +0200
committernicolargo <nicolashennion@gmail.com>2024-06-26 18:10:00 +0200
commitbe89ee002576904ecf7fdcc475d3fcd87d59b684 (patch)
tree63ae9cae293ecc77e9bee37db3266b30b686db40
parentf4cd3502210e5427f0829da613019ad41fb779bb (diff)
parent1e2e36af2399b20ab1957d454141597804a2f8db (diff)
Merge remote-tracking branch 'origin/2616-raspberry-pi-cpu-info-is-not-correct' into develop
-rw-r--r--glances/cpu_percent.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/glances/cpu_percent.py b/glances/cpu_percent.py
index f8b24e61..65bfa154 100644
--- a/glances/cpu_percent.py
+++ b/glances/cpu_percent.py
@@ -65,7 +65,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()
@@ -73,7 +73,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'