mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-01 14:08:34 +03:00
Merge branch 'issue1170' into develop
This commit is contained in:
commit
dbfeb97715
1
NEWS
1
NEWS
@ -19,6 +19,7 @@ Bugs corrected:
|
||||
* glances_plugin.py has a problem with specific docker output #1160
|
||||
* Key error 'address' in the IP plugin #1176
|
||||
* NameError: name 'mode' is not defined in case of interrupt shortly after starting the server mode #1175
|
||||
* Crash on startup: KeyError: 'hz_actual_raw' on Raspbian 9.1 #1170
|
||||
|
||||
Backward-incompatible changes:
|
||||
|
||||
|
@ -81,9 +81,11 @@ class Plugin(GlancesPlugin):
|
||||
cpu_info = cpuinfo.get_cpu_info()
|
||||
# Check cpu_info (issue #881)
|
||||
if cpu_info is not None:
|
||||
self.stats['cpu_name'] = cpu_info['brand']
|
||||
self.stats['cpu_hz_current'] = cpu_info['hz_actual_raw'][0]
|
||||
self.stats['cpu_hz'] = cpu_info['hz_advertised_raw'][0]
|
||||
self.stats['cpu_name'] = cpu_info.get('brand', 'CPU')
|
||||
if 'hz_actual_raw' in cpu_info:
|
||||
self.stats['cpu_hz_current'] = cpu_info['hz_actual_raw'][0]
|
||||
if 'hz_advertised_raw' in cpu_info:
|
||||
self.stats['cpu_hz'] = cpu_info['hz_advertised_raw'][0]
|
||||
|
||||
return self.stats
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user