Opened 10 years ago

Closed 9 years ago

#42 closed defect (wontfix)

Subzero temperature

Reported by: rhn_mk1 Owned by: somebody
Priority: trivial Milestone:
Component: smartctl Version: 5.39
Keywords: Cc:

Description

Smartctl seems to treat temperature as an unsigned integer. That leads to weird values (~65K) when the temperature is below 0.
I don't know if it's SMART's official interpretation of temperature, but I think it would be wise to assume no drives run at 65000 and some do run at <0. Usually it's not inended, but accidents happen...

Change History (3)

comment:1 Changed 10 years ago by Christian Franke

Could you please provide an example output.

comment:2 Changed 10 years ago by rhn_mk1

The only output I have is a munin graph and a munin datafile. I don't think the graph is relevant since it shows approximately 65000 C on a scale including 0. Munin input is provided by a perl script that does no postprocessing. As far as I know, Munin does not require data to have explicit types and accepts negative values easily.

I'm not willing to risk my hard drive again though ;) I can send any of the files if you're interested.

comment:3 in reply to:  2 Changed 9 years ago by Gabriele Pohl

Resolution: wontfix
Status: newclosed

Hi,

I found your ticket just now and as I am an experienced Munin user
I am interested in this case :)

Replying to rhn_mk1:

The only output I have is a munin graph and a munin datafile.

Which plugin did you use?

I don't think the graph is relevant since it
shows approximately 65000 C on a scale including 0.

Plugin smart_ fetches the NORMALIZED value from
the attribute table and sets 0 as mimimal value of the ordinate (1).

munin-run smart_sda config
graph_title S.M.A.R.T values for drive sda
graph_vlabel Attribute S.M.A.R.T value
'''graph_args --base 1000 --lower-limit 0'''
..

Plugin hddtemp_smartctl fetches the RAW value from
the attribute table and also cuts off the ordinate at 0:

munin-run hddtemp_smartctl config
graph_title HDD temperature
'''graph_args --base 1000 -l 0'''
..

So if you want to handle the negative values in your Munin graphs,
you should post bug reports to the plugin authors also :)

As far as I know, Munin does not require data
to have explicit types and accepts negative values easily.

The default data type (which both plugins use)
is "GAUGE" would be ok for negative values.

But smartctl will not print negative values in the attribute table.
The number in column "VALUE" is normalized. Each vendor uses his
own algorithm to calculate a number in the range from 1 to 254.
And as the number printed in column "RAW_VALUE" is vendors secret(2)
and we therefore don't know how to interpret it, we use a decimal
representation of unsigned int for the output.

So to tell a long history in short:
The problem you tell about, can (if at all) at best be solved within the munin plugin,
by adding a plausibility check, that sets the result to "U" (unknown) if it's not
within the allowed range.

(1) On option "-l" and "-lower-limit" see rrdgraph:
http://oss.oetiker.ch/rrdtool/doc/rrdgraph.en.html

(2) Explanation on RAW values: https://sourceforge.net/wiki/Howto_ReadSmartctlReports_ATA#Raw_Value

Note: See TracTickets for help on using tickets.