• No interaction between hddtemp and smart?

    From Markus Robert Kessler@2:250/1 to All on Mon Sep 5 11:27:40 2022
    Hi everyone,

    hope this is a known issue:

    I am doing some testing with a Samsung EVO 870 drive. Since this one was
    not in the smart database, so I made an update:

    update-smart-drivedb

    After that, I can see the temperature of the drive:

    $ smartctl --all /dev/sdb | grep ^190
    190 Airflow_Temperature_Cel 0x0032 072 045 000 Old_age
    Always - 28

    From what I have undestood, hddtemp is relying on the values received by smart. So, I'd expect, that hddtemp now also works. If the drive is not
    yet known to hddtemp, at least the field names should be displayable in
    debug mode. But this seems not the case here:

    $ hddtemp /dev/sdb
    /dev/sdb: Samsung SSD 870 EVO 250G: S.M.A.R.T. not available

    $ hddtemp --debug /dev/sdb

    ================= hddtemp 0.3-beta15 ==================
    Model: Samsung SSD 870 EVO 250G


    If one of the field value seems to match the temperature, be sure to read
    the hddtemp man page before sending a report (section REPORT). Thanks.


    Strange.

    Any idea?

    Thanks,
    best regards,

    Markus


    --
    Please reply to group only.
    For private email please use http://www.dipl-ing-kessler.de/email.htm

    --- MBSE BBS v1.0.8 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Markus Robert Kessler@2:250/1 to All on Mon Sep 5 15:50:53 2022
    On Mon, 05 Sep 2022 10:27:40 +0000 Markus Robert Kessler wrote:

    Hi everyone,

    hope this is a known issue:

    I am doing some testing with a Samsung EVO 870 drive. Since this one was
    not in the smart database, so I made an update:

    update-smart-drivedb

    After that, I can see the temperature of the drive:

    $ smartctl --all /dev/sdb | grep ^190 190 Airflow_Temperature_Cel 0x0032
    072 045 000 Old_age Always - 28

    From what I have undestood, hddtemp is relying on the values received by smart. So, I'd expect, that hddtemp now also works. If the drive is not
    yet known to hddtemp, at least the field names should be displayable in
    debug mode. But this seems not the case here:

    $ hddtemp /dev/sdb /dev/sdb: Samsung SSD 870 EVO 250G: S.M.A.R.T. not available

    $ hddtemp --debug /dev/sdb

    ================= hddtemp 0.3-beta15 ==================
    Model: Samsung SSD 870 EVO 250G


    If one of the field value seems to match the temperature, be sure to
    read the hddtemp man page before sending a report (section REPORT).
    Thanks.


    Strange.

    Any idea?

    Thanks,
    best regards,

    Markus

    Forgot to mention:
    The drive is connected via USB-to-SATA (2 different ones tested).

    Well, the Smart-values are accessible, so hddtemp should be able to
    extract and display the right one. No clue what's wrong here.

    Best regards,

    Markus


    --
    Please reply to group only.
    For private email please use http://www.dipl-ing-kessler.de/email.htm

    --- MBSE BBS v1.0.8 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Markus Robert Kessler@2:250/1 to All on Mon Sep 5 17:59:14 2022
    On Mon, 05 Sep 2022 14:50:53 +0000 Markus Robert Kessler wrote:

    On Mon, 05 Sep 2022 10:27:40 +0000 Markus Robert Kessler wrote:

    Hi everyone,

    hope this is a known issue:

    I am doing some testing with a Samsung EVO 870 drive. Since this one
    was not in the smart database, so I made an update:

    update-smart-drivedb

    After that, I can see the temperature of the drive:

    $ smartctl --all /dev/sdb | grep ^190 190 Airflow_Temperature_Cel
    0x0032
    072 045 000 Old_age Always - 28

    From what I have undestood, hddtemp is relying on the values received
    by smart. So, I'd expect, that hddtemp now also works. If the drive is
    not yet known to hddtemp, at least the field names should be
    displayable in debug mode. But this seems not the case here:

    $ hddtemp /dev/sdb /dev/sdb: Samsung SSD 870 EVO 250G: S.M.A.R.T. not
    available

    $ hddtemp --debug /dev/sdb

    ================= hddtemp 0.3-beta15 ==================
    Model: Samsung SSD 870 EVO 250G


    If one of the field value seems to match the temperature, be sure to
    read the hddtemp man page before sending a report (section REPORT).
    Thanks.


    Strange.

    Any idea?

    Thanks,
    best regards,

    Markus

    Forgot to mention:
    The drive is connected via USB-to-SATA (2 different ones tested).

    Well, the Smart-values are accessible, so hddtemp should be able to
    extract and display the right one. No clue what's wrong here.

    Best regards,

    Markus

    Looks as if hddtemp does NOT use the values given by smartctl, but
    instead it seems that hddtem is using own -- buggy -- routines.

    So, as a workaround, for external drives I recommend using this sudo-
    based script:

    /bin/hddetemp (root:root, 0755):

    ######################################################################

    #!/bin/bash

    for DRIVE in /dev/sd[a-z] ; do

    SMARTVALUES=`sudo /sbin/smartctl --all $DRIVE`

    if [ "$?" != "0" ] ; then

    echo "$DRIVE: ERROR"

    else

    MODEL_NAME=`echo "$SMARTVALUES" | grep '^Device Model:' |
    sed -e 's/^Device Model: *//'`

    AIRFLOW_TEMP=`echo "$SMARTVALUES" | grep 'Airflow_Temperature_Cel' | grep -o '[0-9]*$'`

    echo "$DRIVE: $MODEL_NAME: $AIRFLOW_TEMP°C"

    fi

    done

    ######################################################################


    --
    Please reply to group only.
    For private email please use http://www.dipl-ing-kessler.de/email.htm

    --- MBSE BBS v1.0.8 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From David W. Hodgins@2:250/1 to All on Mon Sep 5 18:15:21 2022
    On Mon, 05 Sep 2022 10:50:53 -0400, Markus Robert Kessler <no_reply@dipl-ing-kessler.de> wrote:
    Well, the Smart-values are accessible, so hddtemp should be able to
    extract and display the right one. No clue what's wrong here.

    Did you restart hddtemp.service after updating the smart db?

    Regards, Dave Hodgins

    --- MBSE BBS v1.0.8 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Paul@2:250/1 to All on Mon Sep 5 18:31:58 2022
    On 9/5/2022 12:59 PM, Markus Robert Kessler wrote:
    On Mon, 05 Sep 2022 14:50:53 +0000 Markus Robert Kessler wrote:

    On Mon, 05 Sep 2022 10:27:40 +0000 Markus Robert Kessler wrote:

    Hi everyone,

    hope this is a known issue:

    I am doing some testing with a Samsung EVO 870 drive. Since this one
    was not in the smart database, so I made an update:

    update-smart-drivedb

    After that, I can see the temperature of the drive:

    $ smartctl --all /dev/sdb | grep ^190 190 Airflow_Temperature_Cel
    0x0032
    072 045 000 Old_age Always - 28

    From what I have undestood, hddtemp is relying on the values received
    by smart. So, I'd expect, that hddtemp now also works. If the drive is
    not yet known to hddtemp, at least the field names should be
    displayable in debug mode. But this seems not the case here:

    $ hddtemp /dev/sdb /dev/sdb: Samsung SSD 870 EVO 250G: S.M.A.R.T. not
    available

    $ hddtemp --debug /dev/sdb

    ================= hddtemp 0.3-beta15 ==================
    Model: Samsung SSD 870 EVO 250G


    If one of the field value seems to match the temperature, be sure to
    read the hddtemp man page before sending a report (section REPORT).
    Thanks.


    Strange.

    Any idea?

    Thanks,
    best regards,

    Markus

    Forgot to mention:
    The drive is connected via USB-to-SATA (2 different ones tested).

    Well, the Smart-values are accessible, so hddtemp should be able to
    extract and display the right one. No clue what's wrong here.

    Best regards,

    Markus

    Looks as if hddtemp does NOT use the values given by smartctl, but
    instead it seems that hddtem is using own -- buggy -- routines.

    So, as a workaround, for external drives I recommend using this sudo-
    based script:

    /bin/hddetemp (root:root, 0755):

    ######################################################################

    #!/bin/bash

    for DRIVE in /dev/sd[a-z] ; do

    SMARTVALUES=`sudo /sbin/smartctl --all $DRIVE`

    if [ "$?" != "0" ] ; then

    echo "$DRIVE: ERROR"

    else

    MODEL_NAME=`echo "$SMARTVALUES" | grep '^Device Model:' | sed -e 's/^Device Model: *//'`

    AIRFLOW_TEMP=`echo "$SMARTVALUES" | grep 'Airflow_Temperature_Cel' | grep -o '[0-9]*$'`

    echo "$DRIVE: $MODEL_NAME: $AIRFLOW_TEMP°C"

    fi

    done

    ######################################################################

    Does "hddtemp" need sudo ?

    https://wiki.archlinux.org/title/Hddtemp

    Usage

    Hddtemp requires root privileges [formatted as persistent device path]

    sudo hddtemp /dev/disk/by-id/wwn-0x60015ee0000b237f

    Daemon

    Running the daemon allows access to the temperature information via
    TCP/IP as a regular user. This is useful for scripts and system monitors.

    The daemon is controlled by hddtemp.service

    "hddtemp S.M.A.R.T. not available" likely means /dev/sdb was not
    accessible without root privilege.

    Paul

    --- MBSE BBS v1.0.8 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Markus Robert Kessler@2:250/1 to All on Mon Sep 5 18:36:07 2022
    On Mon, 05 Sep 2022 13:15:21 -0400 David W. Hodgins wrote:

    On Mon, 05 Sep 2022 10:50:53 -0400, Markus Robert Kessler <no_reply@dipl-ing-kessler.de> wrote:
    Well, the Smart-values are accessible, so hddtemp should be able to
    extract and display the right one. No clue what's wrong here.

    Did you restart hddtemp.service after updating the smart db?

    Regards, Dave Hodgins

    Hi Dave,

    firstly, I invoked /sbin/smartctl directly without starting it as a
    deamon. So, the values were up to date.

    And, when running as "hddtemp -d" after machine restart the same occurs:

    ncat localhost 7634 results in
    |/dev/sdb|Samsung SSD 870 EVO 250G|NOS|*|

    Best regards,

    Markus


    --
    Please reply to group only.
    For private email please use http://www.dipl-ing-kessler.de/email.htm

    --- MBSE BBS v1.0.8 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Markus Robert Kessler@2:250/1 to All on Mon Sep 5 18:41:51 2022
    On Mon, 05 Sep 2022 13:31:58 -0400 Paul wrote:

    On 9/5/2022 12:59 PM, Markus Robert Kessler wrote:
    On Mon, 05 Sep 2022 14:50:53 +0000 Markus Robert Kessler wrote:

    On Mon, 05 Sep 2022 10:27:40 +0000 Markus Robert Kessler wrote:

    Hi everyone,

    hope this is a known issue:

    I am doing some testing with a Samsung EVO 870 drive. Since this one
    was not in the smart database, so I made an update:

    update-smart-drivedb

    After that, I can see the temperature of the drive:

    $ smartctl --all /dev/sdb | grep ^190 190 Airflow_Temperature_Cel
    0x0032
    072 045 000 Old_age Always - 28

    From what I have undestood, hddtemp is relying on the values
    received
    by smart. So, I'd expect, that hddtemp now also works. If the drive
    is not yet known to hddtemp, at least the field names should be
    displayable in debug mode. But this seems not the case here:

    $ hddtemp /dev/sdb /dev/sdb: Samsung SSD 870 EVO 250G: S.M.A.R.T. not
    available

    $ hddtemp --debug /dev/sdb

    ================= hddtemp 0.3-beta15 ==================
    Model: Samsung SSD 870 EVO 250G


    If one of the field value seems to match the temperature, be sure to
    read the hddtemp man page before sending a report (section REPORT).
    Thanks.


    Strange.

    Any idea?

    Thanks,
    best regards,

    Markus

    Forgot to mention:
    The drive is connected via USB-to-SATA (2 different ones tested).

    Well, the Smart-values are accessible, so hddtemp should be able to
    extract and display the right one. No clue what's wrong here.

    Best regards,

    Markus

    Looks as if hddtemp does NOT use the values given by smartctl, but
    instead it seems that hddtem is using own -- buggy -- routines.

    So, as a workaround, for external drives I recommend using this sudo-
    based script:

    /bin/hddetemp (root:root, 0755):

    ######################################################################

    #!/bin/bash

    for DRIVE in /dev/sd[a-z] ; do

    SMARTVALUES=`sudo /sbin/smartctl --all $DRIVE`

    if [ "$?" != "0" ] ; then

    echo "$DRIVE: ERROR"

    else

    MODEL_NAME=`echo "$SMARTVALUES" | grep '^Device
    Model:' |
    sed -e 's/^Device Model: *//'`

    AIRFLOW_TEMP=`echo "$SMARTVALUES" | grep
    'Airflow_Temperature_Cel' | grep -o '[0-9]*$'`

    echo "$DRIVE: $MODEL_NAME: $AIRFLOW_TEMP°C"

    fi

    done

    ######################################################################

    Does "hddtemp" need sudo ?

    Yes, and even worse: In most distros root is granted to hddtemp via
    "policy kit", which is very infamous due to the evil bug recently.

    But anyway, hddtemp works for internal drives and fails for external ones.

    Thanks for asking!

    Best regards,

    Markus


    --
    Please reply to group only.
    For private email please use http://www.dipl-ing-kessler.de/email.htm

    --- MBSE BBS v1.0.8 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)