Difference between revisions of "Smartmontools"

From CBLFS
Jump to navigationJump to search
(New page: {| style="text-align: left; background-color: AliceBlue;" |- !Download Source: | http://downloads.sourceforge.net/smartmontools/smartmontools-{{Smartmontools-Version}}.tar.gz |} ---- {{P...)
 
(Undo revision 18895 by Weibullguy (Talk) What if I want a 32bit binary? Alot of work has gone into getting 32bit build. no need to remove)
 
(4 intermediate revisions by 3 users not shown)
Line 16: Line 16:
  
 
  sed -i '/$(initddir)\/smartd/d' Makefile.in
 
  sed -i '/$(initddir)\/smartd/d' Makefile.in
  ./configure --prefix=/usr --sysconfdir=/etc &&
+
  ./configure --prefix=/usr --sysconfdir=/etc \
 +
    --with-initscriptdir=/etc/rc.d/init.d &&
 
  make
 
  make
  
Line 32: Line 33:
 
  sed -i '/$(initddir)\/smartd/d' Makefile.in
 
  sed -i '/$(initddir)\/smartd/d' Makefile.in
 
  CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" \
 
  CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" \
  ./configure --prefix=/usr --sysconfdir=/etc &&
+
  ./configure --prefix=/usr --sysconfdir=/etc \
 +
    --with-initscriptdir=/etc/rc.d/init.d &&
 
  make
 
  make
  
Line 45: Line 47:
 
  sed -i '/$(initddir)\/smartd/d' Makefile.in
 
  sed -i '/$(initddir)\/smartd/d' Makefile.in
 
  CC="gcc ${BUILDN32}" CXX="g++ ${BUILDN32}" \
 
  CC="gcc ${BUILDN32}" CXX="g++ ${BUILDN32}" \
  ./configure --prefix=/usr --sysconfdir=/etc &&
+
  ./configure --prefix=/usr --sysconfdir=/etc \
 +
    --with-initscriptdir=/etc/rc.d/init.d &&
 
  make
 
  make
  
Line 58: Line 61:
 
  sed -i '/$(initddir)\/smartd/d' Makefile.in
 
  sed -i '/$(initddir)\/smartd/d' Makefile.in
 
  CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" \
 
  CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" \
  ./configure --prefix=/usr --sysconfdir=/etc &&
+
  ./configure --prefix=/usr --sysconfdir=/etc \
 +
    --with-initscriptdir=/etc/rc.d/init.d &&
 
  make
 
  make
  
Line 65: Line 69:
 
  make install
 
  make install
  
 +
== Configuring ==
 +
 +
Create the smartd-bootscript
 +
 +
cat > /etc/rc.d/init.d/smartd << "EOF"
 +
#!/bin/sh
 +
##########################################################################
 +
# Begin $rc_base/init.d/smartd
 +
#
 +
# Description :
 +
#
 +
# Authors    :  Jens Ornot (oj_webstar@yahoo[dot]de)
 +
#
 +
# Version    : 00.01
 +
#
 +
# Notes      :
 +
#
 +
###########################################################################
 +
 +
. /etc/sysconfig/rc
 +
. ${rc_functions}
 +
 +
case "${1}" in
 +
        start)
 +
                boot_mesg "Starting SmartMon Daemon..."
 +
                loadproc /usr/sbin/smartd
 +
                ;;
 +
 +
        stop)
 +
                boot_mesg "Stopping SmartMon Daemon..."
 +
                killproc /usr/sbin/smartd
 +
                ;;
 +
 +
        restart)
 +
                ${0} stop
 +
                sleep 1
 +
                ${0} start
 +
                ;;
 +
 +
        status)
 +
                statusproc /usr/sbin/smartd
 +
                ;;
 +
 +
        *)
 +
                echo "Usage: ${0} {start|stop|restart|status}"
 +
                exit 1
 +
                ;;
 +
esac
 +
 +
# End $rc_base/init.d/smartd
 +
EOF
 +
chmod -v 754 /etc/rc.d/init.d/smartd
 +
 +
Link it into the run-levels:
 +
 +
for link in /etc/rc.d/rc{{0,1,6}.d/K20,{2,3,4,5}.d/S55}smartd; do
 +
  ln -sfv ../init.d/smartd ${link};
 +
done
 
= Contents =
 
= Contents =
  
Line 78: Line 140:
 
| /usr/share/doc/smartmontools-{{Smartmontools-Version}}
 
| /usr/share/doc/smartmontools-{{Smartmontools-Version}}
 
|}
 
|}
 +
 +
[[Category:Hardware Monitoring]]

Latest revision as of 02:08, 6 September 2009

Download Source: http://downloads.sourceforge.net/smartmontools/smartmontools-5.41.tar.gz

Introduction to Smartmontools

The smartmontools package contains two utility programs (smartctl and smartd) to control and monitor storage systems using the Self-Monitoring, Analysis and Reporting Technology System (SMART) built into most modern ATA and SCSI hard disks. In many cases, these utilities will provide advanced warning of disk degradation and failure.

Project Homepage: http://smartmontools.sourceforge.net/

Dependencies

Non-Multilib

Compile the package:

sed -i '/$(initddir)\/smartd/d' Makefile.in
./configure --prefix=/usr --sysconfdir=/etc \
    --with-initscriptdir=/etc/rc.d/init.d &&
make

Install the package:

make install

Multilib

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

32Bit

Compile the package:

sed -i '/$(initddir)\/smartd/d' Makefile.in
CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" \
./configure --prefix=/usr --sysconfdir=/etc \
    --with-initscriptdir=/etc/rc.d/init.d &&
make

Install the package:

make install

N32

Compile the package:

sed -i '/$(initddir)\/smartd/d' Makefile.in
CC="gcc ${BUILDN32}" CXX="g++ ${BUILDN32}" \
./configure --prefix=/usr --sysconfdir=/etc \
    --with-initscriptdir=/etc/rc.d/init.d &&
make

Install the package:

make install

64Bit

Compile the package:

sed -i '/$(initddir)\/smartd/d' Makefile.in
CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" \
./configure --prefix=/usr --sysconfdir=/etc \
    --with-initscriptdir=/etc/rc.d/init.d &&
make

Install the package:

make install

Configuring

Create the smartd-bootscript

cat > /etc/rc.d/init.d/smartd << "EOF"
#!/bin/sh
##########################################################################
# Begin $rc_base/init.d/smartd
#
# Description : 
#
# Authors     :  Jens Ornot (oj_webstar@yahoo[dot]de)
#
# Version     : 00.01
#
# Notes       :
#
###########################################################################

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

case "${1}" in
        start)
                boot_mesg "Starting SmartMon Daemon..."
                loadproc /usr/sbin/smartd
                ;;

        stop)
                boot_mesg "Stopping SmartMon Daemon..."
                killproc /usr/sbin/smartd
                ;;

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

        status)
                statusproc /usr/sbin/smartd
                ;;

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

# End $rc_base/init.d/smartd
EOF
chmod -v 754 /etc/rc.d/init.d/smartd

Link it into the run-levels:

for link in /etc/rc.d/rc{{0,1,6}.d/K20,{2,3,4,5}.d/S55}smartd; do
  ln -sfv ../init.d/smartd ${link};
done

Contents

Installed Programs: smartd smartctl
Installed Libraries: None
Installed Directories: /usr/share/doc/smartmontools-5.41