mirror of
https://github.com/nicolargo/glances.git
synced 2024-09-20 09:08:37 +03:00
commit
04863c7dd4
@ -77,13 +77,29 @@ class Plugin(GlancesPlugin):
|
|||||||
self.reset()
|
self.reset()
|
||||||
|
|
||||||
if self.get_input() == 'local':
|
if self.get_input() == 'local':
|
||||||
# Update stats using the standard system lib
|
# Update stats using the dedicated lib
|
||||||
self.stats = self.__set_type(self.glancesgrabsensors.get(), 'temperature_core')
|
try:
|
||||||
|
self.stats = self.__set_type(self.glancesgrabsensors.get(),
|
||||||
|
'temperature_core')
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
# Update HDDtemp stats
|
||||||
|
try:
|
||||||
|
hddtemp = self.__set_type(self.hddtemp_plugin.update(),
|
||||||
|
'temperature_hdd')
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
# Append HDD temperature
|
# Append HDD temperature
|
||||||
hddtemp = self.__set_type(self.hddtemp_plugin.update(), 'temperature_hdd')
|
|
||||||
self.stats.extend(hddtemp)
|
self.stats.extend(hddtemp)
|
||||||
|
# Update batteries stats
|
||||||
|
try:
|
||||||
|
batpercent = self.__set_type(self.batpercent_plugin.update(),
|
||||||
|
'battery')
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
# Append Batteries %
|
# Append Batteries %
|
||||||
batpercent = self.__set_type(self.batpercent_plugin.update(), 'battery')
|
|
||||||
self.stats.extend(batpercent)
|
self.stats.extend(batpercent)
|
||||||
elif self.get_input() == 'snmp':
|
elif self.get_input() == 'snmp':
|
||||||
# Update stats using SNMP
|
# Update stats using SNMP
|
||||||
|
Loading…
Reference in New Issue
Block a user