LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 06-03-2011, 02:10 PM   #1
drewhead
LQ Newbie
 
Registered: Jan 2006
Distribution: Slackware
Posts: 21

Rep: Reputation: 1
Question 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?
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 06-03-2011, 02:17 PM   #2
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 307Reputation: 307Reputation: 307Reputation: 307
udisks
 
Old 06-04-2011, 02:59 AM   #3
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

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

Code:
smartctl -A /dev/sda | grep '194' | awk '{print $10}'
 
Old 06-04-2011, 07:30 AM   #4
drewhead
LQ Newbie
 
Registered: Jan 2006
Distribution: Slackware
Posts: 21

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by H_TeXMeX_H View Post
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.
 
Old 06-04-2011, 07:51 AM   #5
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
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}'

Last edited by H_TeXMeX_H; 06-04-2011 at 07:52 AM.
 
Old 06-05-2011, 12:56 AM   #6
Old_Fogie
Senior Member
 
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,515

Rep: Reputation: 62
thanks for this
 
Old 06-05-2011, 09:59 AM   #7
dimm0k
Member
 
Registered: May 2008
Location: Brooklyn ZOO
Distribution: Slackware64 14.0
Posts: 386

Rep: Reputation: 23
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.
 
Old 04-24-2012, 12:38 PM   #8
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.0
Posts: 3,476

Rep: Reputation: 531Reputation: 531Reputation: 531Reputation: 531Reputation: 531Reputation: 531
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>
 
2 members found this post helpful.
Old 10-15-2012, 08:49 AM   #9
stereo
LQ Newbie
 
Registered: Aug 2012
Location: Serbia
Distribution: Slackware
Posts: 13

Rep: Reputation: Disabled
This patch is working on Slackware 14 32bit. Thanks @Woodsman
 
Old 10-15-2012, 12:53 PM   #10
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.0
Posts: 3,476

Rep: Reputation: 531Reputation: 531Reputation: 531Reputation: 531Reputation: 531Reputation: 531
Works for 14.0 64-bit too.
 
Old 12-02-2012, 10:13 AM   #11
dimm0k
Member
 
Registered: May 2008
Location: Brooklyn ZOO
Distribution: Slackware64 14.0
Posts: 386

Rep: Reputation: 23
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.

Last edited by dimm0k; 12-02-2012 at 10:17 AM.
 
Old 12-02-2012, 12:41 PM   #12
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.0
Posts: 3,476

Rep: Reputation: 531Reputation: 531Reputation: 531Reputation: 531Reputation: 531Reputation: 531
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.
 
1 members found this post helpful.
Old 06-10-2014, 03:25 PM   #13
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.0
Posts: 3,476

Rep: Reputation: 531Reputation: 531Reputation: 531Reputation: 531Reputation: 531Reputation: 531
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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HDDTemp : Script Assistance orbit Slackware 5 10-29-2009 02:17 PM
hddtemp database STARHARVEST Slackware 1 03-19-2008 07:49 PM
hddtemp question tgo Linux - Hardware 3 03-21-2006 03:20 PM
Suggestions:an Alias Sketchbook Pro alternative? adp Linux - Software 2 08-11-2005 12:15 AM
Baisc GUI type server suggestions (Alternative to ESmith) jimlg Linux - Newbie 1 11-08-2003 10:14 AM


All times are GMT -5. The time now is 09:00 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration