summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicolargo <nicolas@nicolargo.com>2024-04-13 18:18:50 +0200
committernicolargo <nicolas@nicolargo.com>2024-04-13 18:18:50 +0200
commitb6881215f9f3c0d32219597379a4355375b8fd29 (patch)
tree27f1a9a200d04d78769872f21f38a5774d50ea71
parent1de207e2fd40d152eb9bc906496db29b71234f61 (diff)
Update GPU message
-rw-r--r--glances/plugins/gpu/__init__.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/glances/plugins/gpu/__init__.py b/glances/plugins/gpu/__init__.py
index 17aea861..5a6fdc2f 100644
--- a/glances/plugins/gpu/__init__.py
+++ b/glances/plugins/gpu/__init__.py
@@ -134,7 +134,7 @@ class PluginModel(GlancesPluginModel):
# {
# "key": "gpu_id",
# "gpu_id": "nvidia1",
- # "name": "Fake GeForce GTX2",
+ # "name": "Fake GeForce GTX1",
# "mem": 15,
# "proc": 8,
# "temperature": 65,
@@ -190,10 +190,15 @@ class PluginModel(GlancesPluginModel):
# Header
header = ''
if len(self.stats) > 1:
- header += '{} {} '.format(len(self.stats),
- 'GPUs' if len(self.stats) > 1 else 'GPU')
- if same_name:
+ header += '{}'.format(len(self.stats))
+ if same_name:
+ header += ' {}'.format(gpu_stats['name'])
+ else:
+ header += ' GPUs'
+ elif same_name:
header += '{}'.format(gpu_stats['name'])
+ else:
+ header += 'GPU'
msg = header[:17]
ret.append(self.curse_add_line(msg, "TITLE"))