CrudVision - Lisa Seelye

May 11, 2008

Graphing Hard Disk Temperatures with rrdtool (part 2)

Filed under: gentoo, graphs, monitoring, rrdtool, ruby — Lisa Seelye @ 5:03 pm

Last month I made a post about using rrdtool and ruby to graph hard disk temperatures. I recently had some hardware trouble and something with permissions went crazy. Today I took the time to look into the problem and fix it.

The /dev/hd[egik] device nodes were owned by root:disk and 660. However, the hddtemp binary was trying to do some restricted ioctl operations. Even though the binary was setuid and my non-root user was in the disk group I couldn’t access the disk to get the temperatures.

I found out that there is a hddtemp daemon which can query the disks for my unpriveleged user.

The daemon listens on a TCP port and provides output like this:

|/dev/hde|ST3160811AS|39|C||/dev/hdg|ST3160811AS|40|C||/dev/hdi|ST3160811AS|38|C||/dev/hdk|ST3160815AS|39|C|

Should be easy to modify my disk_temperature.rb to connect to that port and parse the data.

Now my temperature graphs will have new data (as soon as the change is made).

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress