jump to navigation

Monitoring Hard Disks with smartctl , hddtemp and gsmartcontrol on CentOS December 14, 2010

Posted by Tournas Dimitrios in Linux.

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. This package is a default utility for CentOs 5 , but if it’s not installed on your box , use yum to make an automatic installation . Use the smartctl command line utility to display many features of your installed data discs .

A GUI alternative to smartctl is GSmartControl . Unfortunately it is not provided by my favorite repositories  ,  so I have to make the installation by hand , which I ‘ll demonstrate at the end of this article . Let’s first outline what options the smartctl provides to us .

First run the command : fdisk -l to get a clear ” picture ” what store devices are installed on your box . Now enable the smart function on the device of interest :  smartctl -s  /dev/hda

SHOW INFORMATION OPTIONS Usage: smartctl [options] device
-h, –help, –usage Display this help and exit
-V, –version, –copyright, –license Print license, copyright, and version information and exit
-i, –info Show identity information for device
-a, –all Show all SMART information for device
-q TYPE, –quietmode=TYPE Set smartctl quiet mode to one of: errorsonly, silent
-d TYPE, –device=TYPE Specify device type to one of: ata, scsi, marvell, 3ware,N
-T TYPE, –tolerance=TYPE Tolerance: normal, conservative, permissive, verypermissive
-b TYPE, –badsum=TYPE Set action on bad checksum to one of: warn, exit, ignore
-r TYPE, –report=TYPE Report transactions (see man page)
-H, –health Show device SMART health status
-c, –capabilities Show device SMART capabilities
-A, –attributes Show device SMART vendor-specific Attributes and values
-l TYPE, –log=TYPE Show device log. TYPE: error, selftest, selective, directory
-v N,OPTION , –vendorattribute=N,OPTION Set display OPTION for vendor Attribute N (see man page)
-F TYPE, –firmwarebug=TYPE Use firmware bug workaround: none, samsung, samsung2
-P TYPE, –presets=TYPE Drive-specific presets: use, ignore, show, showall
-t TEST, –test=TEST Run test.  TEST is: offline short long conveyance select,M-N pending,N afterselect,on afterselect,off
-C, –captive
Do test in captive mode (along with -t)
-X, –abort Abort any non-captive test on device

How to install the GUI alternative (GSmartControl )

This gui interface is provided as an rpm package , but it depends on 5 other package-libraries .

First download and install the libraries in the exacts order as they are displayed :

  1. http://download.opensuse.org/repositories/home:/alex_sh/RHEL_5/i386/libsigc++20-2.0.17-4.2.i386.rpm
  2. http://download.opensuse.org/repositories/home:/alex_sh/RHEL_5/i386/glibmm24-2.12.8-3.3.i386.rpm
  3. http://download.opensuse.org/repositories/home:/alex_sh/RHEL_5/i386/cairomm-1.2.4-3.2.i386.rpm
  4. http://download.opensuse.org/repositories/home:/alex_sh/RHEL_5/i386/gtkmm24-2.10.9-3.2.i386.rpm
  5. http://download.opensuse.org/repositories/home:/alex_sh/RHEL_5/i386/libglademm24-2.6.3-4.2.i386.rpm
  6. http://download.opensuse.org/repositories/home:/alex_sh/RHEL_5/i386/gsmartcontrol-0.8.5-17.1.i386.rpm

Download the packages via your browser or use the command line utility  wget , and place them on a directory  ( like /tmp )  . Use the usual way of installing rpm packages  ( rpm -i  xxxxx.rpm) . And now invoke the GUI via our command line : gsmartcontrol

Official site :

A nice terminal utility to monitor  the temperature of your hard drive is  hddtemp . It can be downloaded with yum  :  yum install   hddtemp ( EPEL repo)  .  To display the temp of your disc , just run  :  hddtemp   /dev/hda


1. van nilla - September 27, 2011

The easier way to get gsmartcontrol is to add alex_sh repo … I’ll update with exact steps to do so in a followup comment.

2. van nilla - September 27, 2011

A simple “sudo yum install gsmartcontrol” will work after you
download and create an alex_sh.repo file in /etc/yum.repos.d with contents given here (example for centos5):


name=alex_sh’s Home Project (CentOS_5)

3. van nilla - September 27, 2011

To run: in xterm (in X11) type: sudo /usr/bin/gsmartcontrol
On first run, you may get an error about not being able to find smartctl (if /usr/sbin is not in your path). One fix is in the GsmartControl window, Options:Preferences specify “/usr/sbin/smartctl” (without quotes) as the location of smartctl binary (assuming you already did a yum install smartmontools

4. tournasdimitrios1 - September 28, 2011

@van nilla
Thanks for your feedback ,
your suggestion is simple and “clean” 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s