Koozali.org: home of the SME Server

sme7admin, hddtemp, sme 7.1.3 - how to pass hddtemp params?

Offline bhamail

  • ***
  • 46
  • +0/-0
I've run into a problem with hddtemp that is fixed when I pass a specific "type" argument to hddtemp. See http://forums.contribs.org/index.php?topic=37138.0 for more info. For example:
Code: [Select]
# hddtemp PATA:/dev/sda works, but I don't know how to make sme7admin use this command line when it runs hddtemp.

How can I configure hddtemp (and sme7admin) to pass the extra "type" argument to hddtemp?

Another alternative is: Can I configure smartctl to log hdd temp data for use by sme7admin?

Thanks,
Dan[/code]

Landry

sme7admin, hddtemp, sme 7.1.3 - how to pass hddtemp params?
« Reply #1 on: June 04, 2007, 10:15:18 AM »
Quote
How can I configure hddtemp (and sme7admin) to pass the extra "type" argument to hddtemp?


Hack the source in /usr/bin/sme7admind, in get_sensors_hddtemp() function, you can modify the lines where /usr/sbin/hddtemp is called. Yeah, i know, this is ugly. I'll think about changing this in next version, someday..

And i don't think smartctl can simply report drive temperature, this would be too hacky.

Offline bhamail

  • ***
  • 46
  • +0/-0
sme7admin, hddtemp, sme 7.1.3 - how to pass hddtemp params?
« Reply #2 on: June 05, 2007, 04:34:44 PM »
That worked like a charm. I changed the file /usr/bin/sme7admind (near line number 884) as per below (commented out original line):
Code: [Select]

    #my @hddtemp=`/usr/sbin/hddtemp /dev/$tag4 2> /dev/null`;
    my @hddtemp=`/usr/sbin/hddtemp PATA:/dev/$tag4 2> /dev/null`;

and:
Code: [Select]

    #my @hddtemp=`/usr/sbin/hddtemp /dev/$tag5 2> /dev/null`;
    my @hddtemp=`/usr/sbin/hddtemp PATA:/dev/$tag5 2> /dev/null`;


After a reboot, hdd temp readings are showing up nicely in the graphs.
Thanks!
Dan