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...) |
|||
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 32: | ||
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 45: | ||
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 58: | ||
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 65: | ||
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 = | ||
Revision as of 19:58, 27 February 2008
Download Source: | http://downloads.sourceforge.net/smartmontools/smartmontools-5.41.tar.gz |
---|
Contents
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 |