Difference between revisions of "Hddtemp"

From CBLFS
Jump to navigationJump to search
(Added page)
 
Line 71: Line 71:
 
  cd /etc &&
 
  cd /etc &&
 
  wget http://www.guzu.net/linux/hddtemp.db
 
  wget http://www.guzu.net/linux/hddtemp.db
 +
 +
Create a config-file for the hddtempd-bootscript.
 +
 +
cat > /etc/sysconfig/hddtemp.confd << "EOF"
 +
# Beginn der /etc/sysconfig/hddtemp.confd
 +
 +
PARAMS="-q -l 127.0.0.1"
 +
DRIVES="/dev/hda /dev/hdb /dev/sda /dev/sdb"
 +
 +
# Ende der /etc/sysconfig/hddtemp.confd
 +
EOF
 +
 +
Create the hddtempd-bootscript.
 +
 +
cat > /etc/rc.d/init.d/hddtempd << "EOF"
 +
#!/bin/sh
 +
##########################################################################
 +
# Begin $rc_base/init.d/hddtempd
 +
#
 +
# Description : hddtemp provides information about hard drives temperature
 +
#
 +
# Authors    :
 +
#
 +
# Version    : 00.00
 +
#
 +
# Notes      :
 +
#
 +
###########################################################################
 +
 +
. /etc/sysconfig/rc
 +
. ${rc_functions}
 +
 +
HDD_TEMP=/usr/sbin/hddtemp
 +
HDD_TEMP_CONFIG=/etc/sysconfig/hddtemp.confd
 +
 +
PARAMS=
 +
DRIVES=
 +
 +
[ -f ${HDD_TEMP_CONFIG} ] && . ${HDD_TEMP_CONFIG}
 +
 
 +
case "${1}" in
 +
        start)
 +
                boot_mesg "Starting the HDDTemp Deamon ..."
 +
                loadproc ${HDD_TEMP} -d ${PARAMS} ${DRIVES}
 +
                ;;
 +
 +
        stop)
 +
                boot_mesg "Stopping the HDDTemp Deamon ..."
 +
                killproc ${HDD_TEMP}
 +
                ;;
 +
 +
        restart)
 +
                ${0} stop
 +
                sleep 1
 +
                ${0} start
 +
                ;;
 +
 +
        status)
 +
                statusproc ${HDD_TEMP}
 +
                ;;
 +
 +
        *)
 +
                echo "Usage: ${0} {start|stop|restart|status}"
 +
                exit 1
 +
                ;;
 +
esac
 +
 +
# End $rc_base/init.d/hddtempd
 +
EOF
 +
 +
chmod -v 0754 /etc/rc.d/init.d/hddtempd
 +
 +
for link in /etc/rc.d/rc{{0,1,6}.d/K00,{2,3,4,5}.d/S90}hddtempd; do
 +
  ln -sfv ../init.d/hddtempd ${link};
 +
done
 
   
 
   
 
== Contents ==
 
== Contents ==

Revision as of 04:07, 7 December 2007

Download Source: http://download.savannah.nongnu.org/releases/hddtemp/hddtemp-0.3-beta15.tar.bz2

Introduction to Hddtemp

hddtemp is a small utility that gives you the temperature of your hard drive by reading S.M.A.R.T. information.

Project Homepage: http://www.guzu.net/linux/hddtemp.php

Dependencies

Optional

Non-Multilib

Compile the package:

./configure --prefix=/usr --with-db-path=/etc/hddtemp.db &&
make

Install the package:

make install

Multilib

This package does not provide any libraries so only one installation is required.

32Bit

Compile the package:

CC="gcc ${BUILD32}" ./configure --prefix=/usr --with-db-path=/etc/hddtemp.db &&
make

Install the package:

make install

N32

Compile the package:

CC="gcc ${BUILDN32}" ./configure --prefix=/usr \
    --libdir=/usr/lib32 --with-db-path=/etc/hddtemp.db &&
make

Install the package:

make install

64Bit

Compile the package:

CC="gcc ${BUILD64}" ./configure --prefix=/usr \
    --libdir=/usr/lib64 --with-db-path=/etc/hddtemp.db &&
make

Install the package:

make install

Configuring

Install the hard drive database file.

cd /etc &&
wget http://www.guzu.net/linux/hddtemp.db

Create a config-file for the hddtempd-bootscript.

cat > /etc/sysconfig/hddtemp.confd << "EOF"
# Beginn der /etc/sysconfig/hddtemp.confd

PARAMS="-q -l 127.0.0.1"
DRIVES="/dev/hda /dev/hdb /dev/sda /dev/sdb"

# Ende der /etc/sysconfig/hddtemp.confd
EOF

Create the hddtempd-bootscript.

cat > /etc/rc.d/init.d/hddtempd << "EOF"
#!/bin/sh
##########################################################################
# Begin $rc_base/init.d/hddtempd
#
# Description : hddtemp provides information about hard drives temperature
#
# Authors     : 
#
# Version     : 00.00
#
# Notes       :
#
###########################################################################

. /etc/sysconfig/rc
. ${rc_functions}

HDD_TEMP=/usr/sbin/hddtemp
HDD_TEMP_CONFIG=/etc/sysconfig/hddtemp.confd

PARAMS=
DRIVES=

[ -f ${HDD_TEMP_CONFIG} ] && . ${HDD_TEMP_CONFIG}
 
case "${1}" in
        start)
                boot_mesg "Starting the HDDTemp Deamon ..."
                loadproc ${HDD_TEMP} -d ${PARAMS} ${DRIVES}
                ;;

        stop)
                boot_mesg "Stopping the HDDTemp Deamon ..."
                killproc ${HDD_TEMP}
                ;;

        restart)
                ${0} stop
                sleep 1
                ${0} start
                ;;

        status)
                statusproc ${HDD_TEMP}
                ;;

        *)
                echo "Usage: ${0} {start|stop|restart|status}"
                exit 1
                ;;
esac

# End $rc_base/init.d/hddtempd
EOF
chmod -v 0754 /etc/rc.d/init.d/hddtempd
for link in /etc/rc.d/rc{{0,1,6}.d/K00,{2,3,4,5}.d/S90}hddtempd; do
  ln -sfv ../init.d/hddtempd ${link};
done

Contents

Installed Directories: None
Installed Programs: hddtemp
Installed Libraries: None

Short Descriptions

hddtemp is a utility to read temperature information from your S.M.A.R.T. enabled hard drives.
Retrieved from "?title=Hddtemp&oldid=12217"