Posted: . At: 10:53 AM. This was 5 years ago. Post ID: 13030
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.


How to view comprehensive information about your hard drive using Linux.


The smartctl utility for Linux is the best way to get comprehensive information about all of your hard drives in your Linux system. This can be used to get the health of your drives and see if they need replacing.

This is how you do it.

4.4 Mon Mar 25 jason@Yog-Sothoth 0: $ sudo smartctl --all /dev/sda

This shows a detailed report on the health of your hard drive.

Look for devices like this.

4.4 Mon Mar 25 jason@Yog-Sothoth 0: $ sudo smartctl --scan
/dev/sda -d scsi # /dev/sda, SCSI device
/dev/sdb -d scsi # /dev/sdb, SCSI device
/dev/sdc -d scsi # /dev/sdc, SCSI device
/dev/sdd -d scsi # /dev/sdd, SCSI device

Show identity information for your hard drive using this example.

4.4 Mon Mar 25 jason@Yog-Sothoth 0: $ sudo smartctl -i /dev/sdd
smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.18.0-17-lowlatency] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
 
=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Blue
Device Model:     WDC WD10EZEX-00WN4A0
Serial Number:    WD-WMC6Y0H2UER3
LU WWN Device Id: 5 0014ee 0597bc4b4
Firmware Version: 01.01A01
User Capacity:    1,000,204,886,016 bytes [1.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-3 T13/2161-D revision 3b
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Mon Mar 25 10:27:22 2019 AEDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

Another example, scan for devices and try to open each one.

4.4 Mon Mar 25 jason@Yog-Sothoth 0: $ sudo smartctl --scan-open

This is how to return the temperature of your hard drive for reference.

4.4 Mon Mar 25 jason@Yog-Sothoth 0: $ sudo smartctl -x /dev/sdd | grep "Current Temperature:" | awk '{print "Drive temperature is", $3 ,"degrees" ,$4}'

This is the output I get when running this one liner.

4.4 Mon Mar 25 jason@Yog-Sothoth 0: $ sudo smartctl -x /dev/sdd | grep "Current Temperature:" | awk '{print "Drive temperature is", $3 ,"degrees" ,$4}'
Drive temperature is 35 degrees Celsius

This would be very useful to get the temperature of your hard drive if you are worried about it.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.