Results 1 to 5 of 5

Thread: Smartctl email -t results

  1. #1
    Join Date
    Sep 2008
    Beans
    39

    Smile Smartctl email -t results

    I am currently trying to setup a box to automate testing and wiping hard drives.

    I use the same commands and am tired of monitoring it.

    What I would like is the results of (well actually many drives but lets start out simple;

    smartctl --test=long /dev/sda

    To be emailed or broadcast upon completion.

    BTW I know smartd can be configured to email when errors are found, but only if errors are found I want a clean bill of health email and some kind of output so it can autostart the wiping process.

    Please let me know if this is possible.

    Thanks!

  2. #2
    Join Date
    Feb 2005
    Location
    Melbourne, Australia
    Beans
    13,505
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Smartctl email -t results

    Quote Originally Posted by thelamer View Post
    I am currently trying to setup a box to automate testing and wiping hard drives.

    I use the same commands and am tired of monitoring it.

    What I would like is the results of (well actually many drives but lets start out simple;

    smartctl --test=long /dev/sda

    To be emailed or broadcast upon completion.

    BTW I know smartd can be configured to email when errors are found, but only if errors are found I want a clean bill of health email and some kind of output so it can autostart the wiping process.

    Please let me know if this is possible.

    Thanks!
    Code:
    smartctl --test=long /dev/sda | mail whatever-else-mail-needs
    Regards, David.
    Please use the Forum search and Wiki search for immediate help
    Please mark your thread as Solved when appropriate
    New to technical forums?: How To Ask Questions The Smart Way

  3. #3
    Join Date
    Sep 2008
    Beans
    39

    Re: Smartctl email -t results

    That won't work as the commands output is a time to completion. IE:

    Code:
    smartctl --test=short /dev/sda
    smartctl 5.40 2010-03-16 r3077 [x86_64-unknown-linux-gnu] (local build)
    Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net
    
    === START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
    Sending command: "Execute SMART Short self-test routine immediately in off-line mode".
    Drive command "Execute SMART Short self-test routine immediately in off-line mode" successful.
    Testing has begun.
    Please wait 1 minutes for test to complete.
    Test will complete after Wed Oct 27 01:11:12 2010

    Selftest command outputs the status but it is just supposed to be run after you know it is done;

    Code:
    smartctl -l selftest /dev/sda
    smartctl 5.40 2010-03-16 r3077 [x86_64-unknown-linux-gnu] (local build)
    Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net
    
    === START OF READ SMART DATA SECTION ===
    SMART Self-test log structure revision number 1
    Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
    # 1  Short offline       Completed without error       00%      3508
    -

  4. #4
    Join Date
    Mar 2013
    Beans
    25

    Re: Smartctl email -t results

    Ever figure this out "thelamer"?

  5. #5
    Join Date
    Oct 2006
    Location
    Ayrshire
    Beans
    40,016
    Distro
    Ubuntu Development Release

    Re: Smartctl email -t results

    Old thread closed.

    Feel free to start afresh.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •