smartctl (Linux版 smartツール)

HDDの自己診断機能のプログラムである。
RedHat 7.1 の場合 root で smartctl 叩いても動かなかった(プログラムが無い)ので以下からダウンロードしてインストールする必要がある。

ここから PRM もしくは ソースをダウンロード。
http://smartmontools.sourceforge.net/

ソース版の方が最新の場合が多いと書いてある。
インストール方法を転載。

Second Method (Linux/Solaris/FreeBSD/NetBSD/Cygwin) - Install from the source tarball
Download the latest source tarball from here. Note: you probably want the most recent release.
Uncompress the tarball:

tar zxvf smartmontools-5.20.tar.gz
The previous step created a directory called smartmontools-5.20 containing the code. Go to that directory, build, and install:

cd smartmontools-5.20
./configure
make
make install
Note that the ./configure step above is not possible for releases <=5.1-18, you have to edit the Makefile by hand to change installation paths. For releases >=5.19, ./configure can take optional arguments. These optional arguments are fully explained in the INSTALL file. The most important one is --prefix to change the default installation directories.

Please note that the default installation location changed in versions >=5.31. If you don't pass any arguments to ./configure all files will reside under /usr/local to not interfere with files from your distribution. For more detailed information please also refer to the INSTALL document.
To compile from another directory (avoids overwriting virgin files from the smartmontools package) replace ./configure [options] by:

mkdir objdir
cd objdir
../configure [options]
To install to another destination (useful for testing and to avoid overwriting an existing smartmontools installation) replace make install by:

make DESTDIR=/home/myself/smartmontools-test install
Use a full path: ~/smartmontools-test won't work.
Unless the destination directory is your home directory (or a location that you have write permission) only root can do make install

★ 参考サイト
【ハードディスクのS.M.A.R.T.情報を表示するには】
http://www.atmarkit.co.jp/flinux/rensai/linuxtips/521smartinfo.html

【Linux向けハードディスク監視/設定アプリケーションの紹介】
https://www.stackasterisk.jp/tech/systemManagement/hd01_02.jsp

★ ソースからコンパイルして素直にそのままインストールした場合

こういうメッセージが出力される。
デーモンにするならこうしろということだ。

####################################################################
#
# PLEASE READ THIS BOX!
#
# To manually start the smartd daemon, run:
# /usr/local/etc/rc.d/init.d/smartd start
#
# To automatically start smartd on bootup, run:
# /sbin/chkconfig --add smartd
#
# smartd can now use a configuration file /usr/local/etc/smartd.conf. Do:
# man smartd
# to learn about it. A sample configuration file can be found in:
# /usr/local/share/doc/smartmontools-5.32
#
####################################################################

一旦は
./configure
make
make install だけでインストールしたが

smartd と起動スクリプトが /etc/init.d/ に作成されてないので

make clean でクリーンナップした後

RedHat向けの
./configure --sbindir=/usr/sbin \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--with-initscriptdir=/etc/rc.d/init.d \
--with-docdir=/usr/share/doc/smartmontools-VERSION

を実行、 make, make install した。

ウェブページ

  • about
Powered by Movable Type 5.2.10

このブログ記事について

このページは、よしが2004年8月11日 02:44に書いたブログ記事です。

ひとつ前のブログ記事は「サーバシステムのバックアップ手法(続)」です。

次のブログ記事は「アテネオリンピック」です。

最近のコンテンツはインデックスページで見られます。過去に書かれたものはアーカイブのページで見られます。