1

I am using the logwatch application and I note that the smartd deamon return wrong information: the temperature is not displayed in Celsius degree !
Is it a smartd problem or a logwatch problem ?
Is is possible to change the display ?

--------------------- Smartd Begin ------------------------ 


 /dev/sda [SAT] :
    Usage: Temperature_Celsius (194) changed to 
      116, 116, 115, 116, 117, 117, 116, 116, 115, 115, 114, 114, 
      115, 115, 114, 114, 

 /dev/sdb [SAT] :
    Usage: Temperature_Celsius (194) changed to 
      102, 103, 104, 104, 105, 105, 104, 105, 104, 104, 105, 105, 
      106, 105, 104, 105, 104, 105, 104, 104, 103, 103, 102, 102, 
      103, 103, 

 /dev/sdc [SAT] :
    Usage: Temperature_Celsius (194) changed to 
      101, 102, 102, 101, 101, 102, 101, 102, 102, 103, 103, 102, 
      103, 102, 102, 101, 101, 100, 100, 101, 101, 

 /dev/sdd [SAT] :
    Usage: Temperature_Celsius (194) changed to 
      106, 106, 107, 108, 108, 107, 107, 106, 106, 107, 107, 108, 
      108, 107, 107, 108, 108, 107, 108, 107, 107, 106, 106, 105, 
      105, 106, 106, 105, 

 ---------------------- Smartd End ------------------------- 
chaos
  • 47,463
  • 11
  • 118
  • 144
Bertaud
  • 245
  • 1
  • 3
  • 12

2 Answers2

1

If you want to see the real temperature, you can adjust /etc/smartd.conf accordingly. One of the lines commented out says:

# Alternative setting to report more useful raw temperature in syslog.
# DEVICESCAN -R 194 -R 231 -I 9

The man page on smartd.conf even states what those IDs mean, and thus what that line stands for: include the raw (-R) values for the mentioned ID when reporting – and:

A common use of this Directive is to track the device Temperature (often ID=194 or 231).

Which explains those two numbers. The -I 9 is advising smartmon to ignore the device with that ID. And sorry, it doesn't say what device ID 9 might represent; all it says on this is

This is useful, for example, if one of the device Attributes is the disk temperature (usually Attribute 194 or 231). It's annoying to get reports each time the temperature changes.

You will need to restart the smartmon service for the changes to take effect (sudo service smartmontools restart), a reload seems not to be sufficient.

Note changes in that file affecting the smartmon service logging into your syslog. For the command line tool smartctl, please take a look at it's man page on how to achieve the same.

Izzy
  • 233
  • 1
  • 9
0

smartd shows the raw value which is an 8-bit number, i.e. something between 0 and 255. These "Temperature_Celsius (194) changed" messages can usually be ignored.

With smartctl -H /dev/sdc (replace sdc with whatever disk you want to check) you can see all attributes, the last column is the "real" value (don't ask me why it's labelled "RAW_VALUE"). As the smartctl manpage says, Each vendor uses their own algorithm to convert this "Raw" value to a "Normalized" value in the range from 1 to 254.

wurtel
  • 15,835
  • 1
  • 29
  • 35
  • Finally the question was how to display in the smartd log the temparature in Celcius degrees ! – Bertaud Feb 05 '15 at 13:57
  • The smartd log is not useful for this. If you want to monitor the "real" temperature, get the `hddtemp` utility. – wurtel Feb 06 '15 at 07:32