Is there an alternative way to find out the hdd temperature without using tools like hddtemp ? For example, to find out the CPU load, you can call top , or you can read the /proc/cpuinfo file. By analogy, I want to “read” the hdd temperature from somewhere, if possible.
3 answers
Use lm_sensor There you can both call utilities and use the library in your programs.
- @Sergry do not tell me how the library is called? Something I can not find. - Shadr
- do not tell me how the library is called? In the Ubuntu distribution, the package is called: "lm-sensors" is a hardware health monitoring package for Linux. It allows you to access information from temperature, voltage, and fan speed sensors. It works with most newer systems. This is a package that contains data from lm-sensors. - Sergey
|
Emm, directly ask the SMART disk?
194 Temperature_Celsius 0x0022 124 100 000 Old_age Always - 38 With help, smartctl, for example smartctl -a /dev/sda ...
|
It is impossible. To read a SMART disk, you need one of the additional utilities ( smartctl or hddtemp ). The SMART kernel does not read.
|