Linux Tip: (hdd temp in conky)

Discount Hockey Jerseys China, Discount NFL Jerseys China jerseysuperb

I have had a problem for a while now. I wanted to display my hard drive temp's in conky.

To do this I used this command.

Discount Hockey Jerseys China, Discount NFL Jerseys China http://jerseysuperb.com
sudo hddtemp /dev/sda

This worked great except for the fact that the conky instance I was using has a .7 second update interval. This made my hard drive light blink constantly and because of where my case was it was quite annoying when watching a movie or something. So to solve this I created a script that I could run in cron that would write the info I needed out to a txt file in my temp directory.
This was the command I used.

sudo hddtemp /dev/sda >> /tmp/hddtemp

I also added hddtemp to my sudoer so it would not require a password.

The problem I had was the script would work fine if ran manually but when I let cron run it I got no output to the text file.

Well I finally tonight figured out why. You have to specify the location of the command in cron I guess. so this is what I did.

I ran this command

whereis hddtemp

The output I got was

/usr/sbin/hddtemp

So I modified my cron script like this

/usr/sbin/hddtemp /dev/sda >> /tmp/hddtemp

Now it works perfect. Every 10 minutes cron updates the text file and I can now see my hard drive temps on my desktop in conky. If you look in the picture my hard drive temps are displayed to the right at the bottom of "system health".



Hope this helps everyone.

Share

 

 

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.