Sometimes a temperature sensor file in `/sys/class/hwmon/hwmon*/temp*_*` will return 'ENETDOWN: Network is down' when being read for some reason, which gopsutil propogates up to gotop. gopsutil still returns a slice of valid temperatures when it errors, so we can render those instead of ignoring the return value.
This commit is contained in:
parent
95b6665026
commit
dbf25cdd85
|
@ -13,8 +13,7 @@ import (
|
|||
func (self *Temp) update() {
|
||||
sensors, err := psHost.SensorsTemperatures()
|
||||
if err != nil {
|
||||
log.Printf("failed to get sensors from gopsutil: %v", err)
|
||||
return
|
||||
log.Printf("error recieved from gopsutil: %v", err)
|
||||
}
|
||||
for _, sensor := range sensors {
|
||||
// only sensors with input in their name are giving us live temp info
|
||||
|
|
Loading…
Reference in New Issue
Block a user