Skip to Content
Linux Shell Scripting Cookbook - Third Edition
book

Linux Shell Scripting Cookbook - Third Edition

by Clif Flynt, Sarath Lakshman, Shantanu Tushar
May 2017
Beginner
552 pages
28h 47m
English
Packt Publishing
Content preview from Linux Shell Scripting Cookbook - Third Edition

How to do it...

The user interface to smartmontools is the smartctl application. This application initiates tests on the disk drive and reports the status of the SMART device.

Since the smartctl application accesses the raw disk device, you must have root access to run it.

The -a option reports the full status of a device:

    $ smartctl -a /dev/sda

The output will be a header of basic information, a set of raw data values and the test results. The header includes details about the drive being tested and a datestamp for this report:

    smartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-  
    642.11.1.el6.x86_64] (local build)
    Copyright (C) 2002-12 by Bruce Allen,    
    http://smartmontools.sourceforge.net

    === START OF INFORMATION SECTION ===
 Device ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Linux Shell Scripting - Second Edition

Mastering Linux Shell Scripting - Second Edition

Mokhtar Ebrahim, Andrew Mallett

Publisher Resources

ISBN: 9781785881985