Re: [PATCH] sensord: do not fail if some sensor does not return data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday 17 May 2014 22:02:12 Pali Rohár wrote:
> Hello,
> 
> I see very annoying bug in sensord. When some hwmon driver
> returns -EINVAL (for any reason), sensord daemon will stop
> reading next sensors values. This means if first hwmon device
> fail to return value, sensord daemon will not log anything.
> 
> Returning -EINVAL from kernel driver is normal (e.g. when
> graphic card with has internal temperature sensor is turned
> off) and sensord should not fail on this.
> 
> Program sensors already handling this problem and will print
> N/A if there is reading error.
> 
> I'm sending simple patch which just report NaN value when
> kernel report error. And also sensord will continue to
> reading next hwmon interfaces.
> 
> Without this patch I see only these lines logged:
> 
> sensord: Chip: radeon-pci-0100
> sensord: Adapter: PCI adapter
> sensord: Error getting sensor data: radeon/#0: Can't read
> sensord: sensor read error (-1)
> 
> And all other sensors are ignored and nothing more is logged.
> 
> After my patch all hwmon sensors data are logged:
> 
> sensord: Chip: radeon-pci-0100
> sensord: Adapter: PCI adapter
> sensord:   temp1: nan C
> sensord: Chip: i8k-virtual-0
> sensord: Adapter: Virtual device
> sensord:   Left Fan: 2685 RPM
> sensord:   CPU: 49.0 C
> sensord:   temp2: 55.0 C
> sensord:   temp3: 39.0 C
> sensord: Chip: coretemp-isa-0000
> sensord: Adapter: ISA adapter
> sensord:   Physical id 0: 50.0 C
> sensord:   Core 0: 47.0 C
> sensord:   Core 1: 50.0 C

BUMP!

Can somebody review my patch?

-- 
Pali Rohár
pali.rohar@xxxxxxxxx

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
lm-sensors mailing list
lm-sensors@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux