mirror of
https://github.com/nicolargo/glances.git
synced 2024-09-20 17:17:30 +03:00
commit
04863c7dd4
@ -77,14 +77,30 @@ 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:
|
||||||
# Append HDD temperature
|
self.stats = self.__set_type(self.glancesgrabsensors.get(),
|
||||||
hddtemp = self.__set_type(self.hddtemp_plugin.update(), 'temperature_hdd')
|
'temperature_core')
|
||||||
self.stats.extend(hddtemp)
|
except:
|
||||||
# Append Batteries %
|
pass
|
||||||
batpercent = self.__set_type(self.batpercent_plugin.update(), 'battery')
|
# Update HDDtemp stats
|
||||||
self.stats.extend(batpercent)
|
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':
|
elif self.get_input() == 'snmp':
|
||||||
# Update stats using SNMP
|
# Update stats using SNMP
|
||||||
# No standard: http://www.net-snmp.org/wiki/index.php/Net-SNMP_and_lm-sensors_on_Ubuntu_10.04
|
# No standard: http://www.net-snmp.org/wiki/index.php/Net-SNMP_and_lm-sensors_on_Ubuntu_10.04
|
||||||
|
Loading…
Reference in New Issue
Block a user