LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   hddtemp alternative suggestions? (http://www.linuxquestions.org/questions/slackware-14/hddtemp-alternative-suggestions-884385/)

drewhead 06-03-2011 02:10 PM

hddtemp alternative suggestions?
 
hddtemp is s simple little utility that reads hard drive temp information. I've used it to shove data in to rrds via rrdtool for years. Recently I've build a new 13.37 box and it doesn't seem to want to compile anymore. hddtemp appears as if it is no longer maintained. The HD database is quite a bit out of date as well. It seems like it may be time to switch to something else rather than try and get this working.

Anyone have any suggestions to replacements?

andrewthomas 06-03-2011 02:17 PM

udisks

H_TeXMeX_H 06-04-2011 02:59 AM

It is in the SMART attributes, so you can use:

Code:

smartctl -A /dev/sda | grep '194' | awk '{print $10}'

drewhead 06-04-2011 07:30 AM

Quote:

Originally Posted by H_TeXMeX_H (Post 4375911)
It is in the SMART attributes, so you can use:

Code:

smartctl -A /dev/sda | grep '194' | awk '{print $10}'

Thanks to both of your for the reply. Plopping this in my script in place of the hddtemp call does exactly what I was looking for.

H_TeXMeX_H 06-04-2011 07:51 AM

Maybe you should use this instead, to avoid problems in case grep matches something else:

Code:

smartctl -A /dev/sda | grep 'Temperature_Celsius' | awk '{print $10}'
or

Code:

smartctl -A /dev/sda | awk '{if ($1 == 194) print $10}'

Old_Fogie 06-05-2011 12:56 AM

thanks for this :)

dimm0k 06-05-2011 09:59 AM

I know you're looking for alternatives, but hddtemp compiles and runs fine for me under 13.37 64-bit. It is outdated, but it's still pretty accurate as the reading on mine is the same as what's provided by smartctl. While I would prefer to use something that's already included with Slackware, I went with hddtemp as that allows non-root usage to some extent.

Woodsman 04-24-2012 12:38 PM

The following patch is needed by some people to build hddtemp:

Code:

diff -urN hddtemp-0.3-beta15/src/backtrace.c hddtemp-0.3-beta15.new/src/backtrace.c
--- hddtemp-0.3-beta15/src/backtrace.c        2006-04-18 21:38:14.000000000 -0500
+++ hddtemp-0.3-beta15.new/src/backtrace.c        2012-04-24 10:53:38.000000000 -0500
@@ -27,6 +27,8 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <linux/ptrace.h>
+#define __USE_GNU
+#include <ucontext.h>
 #include <signal.h>
 #include <bits/sigcontext.h>
 #include <sys/param.h>


stereo 10-15-2012 08:49 AM

This patch is working on Slackware 14 32bit. Thanks @Woodsman

Woodsman 10-15-2012 12:53 PM

Works for 14.0 64-bit too. :)

dimm0k 12-02-2012 10:13 AM

Is it me or did something change in Slackware 14.0 that made hddtemp no longer useful when used by a user? I have 'hddtemp -d /dev/sda' executing fine, but running hddtemp as user afterward no longer works as it did prior to 14.0.

EDIT: blah, nevermind... somehow conky is able to access this info after restarting conky and hddtemp.

Woodsman 12-02-2012 12:41 PM

To be run by non-root users, the hddtemp executable must be installed Set UID (chmod 4755). To be in non-root's search patch, create a sym link in /usr/bin or /usr/local/bin. :)

Woodsman 06-10-2014 03:25 PM

Looks like the patch mentioned in comment #8 is still required. I cannot build hddtemp in 14.1 unless I use the patch. The patch is not included in SBo. Why can some people build hddtemp without the patch and others cannot?


All times are GMT -5. The time now is 06:33 PM.