mirror of https://github.com/nicolargo/glances
Merge branch 'hotfix/issue373'
commit
07611c0730
|
@ -77,14 +77,30 @@ class Plugin(GlancesPlugin):
|
|||
self.reset()
|
||||
|
||||
if self.get_input() == 'local':
|
||||
# Update stats using the standard system lib
|
||||
self.stats = self.__set_type(self.glancesgrabsensors.get(), 'temperature_core')
|
||||
# Append HDD temperature
|
||||
hddtemp = self.__set_type(self.hddtemp_plugin.update(), 'temperature_hdd')
|
||||
self.stats.extend(hddtemp)
|
||||
# Append Batteries %
|
||||
batpercent = self.__set_type(self.batpercent_plugin.update(), 'battery')
|
||||
self.stats.extend(batpercent)
|
||||
# Update stats using the dedicated lib
|
||||
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
|
||||
self.stats.extend(hddtemp)
|
||||
# Update batteries stats
|
||||
try:
|
||||
batpercent = self.__set_type(self.batpercent_plugin.update(),
|
||||
'battery')
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
# Append Batteries %
|
||||
self.stats.extend(batpercent)
|
||||
elif self.get_input() == 'snmp':
|
||||
# Update stats using SNMP
|
||||
# No standard: http://www.net-snmp.org/wiki/index.php/Net-SNMP_and_lm-sensors_on_Ubuntu_10.04
|
||||
|
|
Loading…
Reference in New Issue