FreeBSDに係わる構築や維持など

Archive for 5月, 2008

smartmontools

bsd# portinstall sysutils/smartmontools
[Updating the portsdb
 in /usr/ports ... - 18402 port entries found .........1000.........2000.........3000.........4000.........5000.........6000.........7000.........8000.........9000.........10000.........11000.........12000.........13000.........14000.........15000.........16000.........17000.........18000.... ..... done]
--->  Installing 'smartmontools-5.38' from a port (sysutils/smartmontools)
--->  Building '/usr/ports/sysutils/smartmontools'
===>  Cleaning for smartmontools-5.38
===>  Vulnerability check disabled, database not found
=> smartmontools-5.38.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch from http://heanet.dl.sourceforge.net/sourceforge/smartmontools/.
smartmontools-5.38.tar.gz                     100% of  602 kB  160 kBps
===>  Extracting for smartmontools-5.38
=> MD5 Checksum OK for smartmontools-5.38.tar.gz.
=> SHA256 Checksum OK for smartmontools-5.38.tar.gz.
===>  Patching for smartmontools-5.38
===>  Applying FreeBSD patches for smartmontools-5.38
===>   smartmontools-5.38 depends on executable: gmake - found
===>  Configuring for smartmontools-5.38

To check the status of drives, use the following:

        /usr/local/sbin/smartctl -a /dev/ad0            for first ATA drive
        /usr/local/sbin/smartctl -a /dev/da0            for first SCSI drive

To enable monitor of drives, you can use /usr/local/sbin/smartd
A sample configuration file has been installed as
/usr/local/etc/smartd.conf.sample
Copy this file to /usr/local/etc/smartd.conf and edit appropriately

To have smartd start at boot
        echo 'smartd_enable="YES"' >> /etc/rc.conf
===> Installing rc.d startup script(s)
===>   Compressing manual pages for smartmontools-5.38
===>   Registering installation for smartmontools-5.38
===>  Cleaning for smartmontools-5.38

Read more »