• 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. How to Verify if a Disk/Partition is in Use by Oracle ASM, was used by Oracle ASM or is never used by Oracle ASM
  2. “-bash: firewall: command not found” – How to resolve in CentOS/RHEL 7
  3. CentOS / RHEL 4 : How to configure interface bonding (NIC teaming)
  4. User Environment Variables With “su” and “sudo” in Linux
  5. locate Command Examples in Linux
  6. How to Install Gnome Desktop Environment onto Oracle Linux 6.x
  7. How to kill Processes in Linux using kill, killall and pkill
  8. Understanding iscsiadm Utility in CentOS / RHEL
  9. How to monitor the Mounting/Umounting of Mount Points Using Auditd on CentOS/RHEL 6,7
  10. How to Compress and Decompress .bz2 files in Linux Using bzip2 Command

You May Also Like

Primary Sidebar

Recent Posts

  • JavaFX ComboBox: Set a value to the combo box
  • Nginx load balancing
  • nginx 504 gateway time-out
  • Images preview with ngx_http_image_filter_module

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright