I would like to get the temperature of a hard disk using Python (under Linux). I'm currently calling hddtemp
with subprocess.popen
, but I call it often enough that it is a performance bottleneck in my script. I think it should be possible to do something similar to question 4193514?
You can run hddtemp as a daemon (the -d option), then use sockets to query it - defaults to port 7634.
Edit: see some code that does this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With