• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Monitor HDD and SSD with smartd and smartctl

by admin

Basic information

smartd is a daemon that monitоrs the Self-Monitoring, Analysis and Reporting Technology (S.M.A.R.T) system that is built into most ATA/SATA and SCSI/SAS drives and solid-state drives.

smartctl is a command-line utility designed to perform SMART tasks such as printing the SMART self-test and error logs, enabling and disabling SMART automatic testing, and initiating device self-tests.

Installation

Both can be installed with smartmontools in Debian-like system:

# apt-get install smartmontools

or Centos system:

# yum install smartmontools

Basic smartd configuration

Here is a basic smartd configuration to monitor 2 HDD drives. The following lines need to be added to /etc/smartd.conf.

/dev/sda -d sat -o on -S on -m test@example.com -M test -a -s (S/../.././01|L/../../6/03)
/dev/sdb -d sat -o on -S on -m test@example.com -M test -a -s (S/../.././01|L/../../6/03)

Basic smartctl usage

To check if S.M.A.R.T exist on disc:

# smartctl -i /dev/sda

To get report about all disk health:

# smartctl -i -a /dev/sda

Filed Under: CentOS/RHEL, Linux

Some more articles you might also be interested in …

  1. df Command Examples in Linux
  2. How to remove bonding Network configuration in CentOS/RHEL
  3. conntrack: command not found
  4. getent Command Examples in Linux
  5. blkdiscard: command not found
  6. partprobe: command not found
  7. How to Automatically Run ntpdate When Starting NTPD in CentOS/RHEL 5
  8. What causes iptables to load every time after a reboot even when it’s completely turned off
  9. rsyslogd Command Examples in Linux
  10. aptitude Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • netselect-apt Command Examples in Linux
  • netselect-apt: command not found
  • nethogs Command Examples in Linux
  • nethogs: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright