<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">While I'm not absolutely certain, looking at one of the OS headers<div class=""><span class="Apple-tab-span" style="white-space:pre">      </span>/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Versions/A/Headers/storage/ata/ATASMARTLib.h</div><div class="">I don't think macOS supports any immediate offline tests other than short and long (in particular, not selective ranges), so I think smartmontools on macOS is simply recognizing that - it runs on a lot of platforms, and not all of them necessarily support every feature.  macOS AFAIK doesn't support SMART at all on USB or Firewire; and at least one other OS doesn't seem to fully support SMART for ATA, for example.</div><div class=""><br class=""></div><div class=""><div><blockquote type="cite" class=""><div class="">On Jun 25, 2018, at 21:40, Ubence Quevedo <<a href="mailto:thatrat@gmail.com" class="">thatrat@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><div dir="auto" class="">Thanks for pointing this out.  I’m disappointed this feature seems to be disabled in macOS.  Looks like I’ll have to ask the smartmontools developers why this was left out of macOS.</div></div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">-Ubence</div><div class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Mon, Jun 25, 2018 at 7:16 AM Richard L. Hamilton <<a href="mailto:rlhamil@smart.net" class="">rlhamil@smart.net</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space" class="">Looks to me like the code purposely and intentionally disallows that on a Mac.  No idea why - maybe the OS won't do it or doesn't like it.<div class=""><br class=""></div><div class="">In os_darwin.cpp:</div><div class=""><div class="">483       case ATA_SMART_IMMEDIATE_OFFLINE:</div><div class="">484         select = in.in_regs.lba_low;</div><div class="">485         if (select != SHORT_SELF_TEST && select != EXTEND_SELF_TEST)</div><div class="">486         {</div><div class="">487           errno = EINVAL;</div><div class="">488           return set_err(ENOSYS, "Unsupported SMART self-test mode");</div><div class="">489         }</div><div class="">490         err = smartIf->SMARTExecuteOffLineImmediate (ifp,</div><div class="">491           select == EXTEND_SELF_TEST);</div><div class="">492         break;</div><div class=""><br class=""></div><div class="">In other words, on a Mac, I think only -t long and -t short would work, not any other -t options.</div></div></div><div style="word-wrap:break-word;line-break:after-white-space" class=""><div class=""><div class=""><br class=""></div><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Jun 25, 2018, at 09:13, Ubence Quevedo (thatrat) <<a href="mailto:thatrat@gmail.com" target="_blank" class="">thatrat@gmail.com</a>> wrote:</div><br class="m_-3210421903062250601Apple-interchange-newline"><div class=""><div style="word-wrap:break-word;line-break:after-white-space" class="">Hi All,<div class=""><br class=""></div><div class="">I tried compiling the latest snapshot of smartmontools, and the problem is still occurring:</div><div class=""><div class=""><font face="Menlo" class="">Ubences-MacBook-Pro:smartmontools-6.7 uquevedo$ ./smartctl -t select,0-10 /dev/disk0</font></div><div class=""><font face="Menlo" class="">smartctl 6.7 2018-06-21 r4735 [Darwin 17.6.0 x86_64] (local build)</font></div><div class=""><font face="Menlo" class="">Copyright (C) 2002-18, Bruce Allen, Christian Franke, <a href="http://www.smartmontools.org/" target="_blank" class="">www.smartmontools.org</a></font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class=""><font face="Menlo" class="">=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===</font></div><div class=""><font face="Menlo" class="">Sending command: "Execute SMART Selective self-test routine immediately in off-line mode".</font></div><div class=""><font face="Menlo" class="">SPAN         STARTING_LBA           ENDING_LBA</font></div><div class=""><font face="Menlo" class="">   0                    0                   10</font></div><div class=""><font face="Menlo" class="">Command "Execute SMART Selective self-test routine immediately in off-line mode" failed: Unsupported SMART self-test mode</font></div></div><div class=""><br class=""></div><div class=""><div class="">This seems more a problem for smartmontools…?  Might this be a problem similar to not being able to scan external drives for smart information in macOS?</div><div class=""><br class=""></div><div class="">I’m still curious if anyone has gotten the selective span scan to work in macOS...?</div><div class=""><br class=""></div><div class="">-Ubence</div><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Jun 24, 2018, at 3:35 PM, Ubence Quevedo <<a href="mailto:thatrat@gmail.com" target="_blank" class="">thatrat@gmail.com</a>> wrote:</div><br class="m_-3210421903062250601Apple-interchange-newline"><div class=""><div class=""><span style="font-family:UICTFontTextStyleBody;font-size:17px" class="">Thanks for pointing this out, but the selective scan range for smartctl has never worked in previous versions available through macports from the last few years, I’m just now finally posting something about this.  I had worked around this by setting the sleep timeout on my Mac to a much longer timeout [three hours] so the whole drive [1TB] could be scanned on a long test.  From what I understand of the selective scan range, the range will be scanned, and when the next scan occurs, it’s scan the next range. </span><br class=""></div><div dir="auto" class=""><span style="font-family:UICTFontTextStyleBody;font-size:17px" class=""><br class=""></span></div><div dir="auto" class=""><span style="font-family:UICTFontTextStyleBody;font-size:17px" class="">I’d really love for this feature to work so I don’t have to keep my system online all the time for scanning.</span></div><div dir="auto" class=""><span style="font-family:UICTFontTextStyleBody;font-size:17px" class=""><br class=""></span></div><div dir="auto" class=""><span style="font-family:UICTFontTextStyleBody;font-size:17px" class="">Any suggestions on how to look into this further?Perhaps build smartmontools from source and test?  Has anyone gotten the selective range to work for scanning from installing smartmontools from macports?</span></div><div dir="auto" class=""><span style="font-family:UICTFontTextStyleBody;font-size:17px" class=""><br class=""></span></div><div dir="auto" class=""><span style="font-family:UICTFontTextStyleBody;font-size:17px" class="">-Ubence</span></div><div class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Sun, Jun 24, 2018 at 3:15 PM Joshua Root <<a href="mailto:jmr@macports.org" target="_blank" class="">jmr@macports.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ubence Quevedo wrote:<br class="">
> However, when I boot the same system off of Ubuntu 18.04 Live USB with the<br class="">
> same version of smartmontools [6.6], this command works properly:<br class="">
<br class="">
Just a note that Ubuntu does not actually have the same version as<br class="">
MacPorts. As your output shows:<br class="">
<br class="">
MacPorts:<br class="">
> smartctl 6.6 2017-11-05 r4594 [Darwin 17.6.0 x86_64] (local build)<br class="">
<br class="">
Ubuntu:<br class="">
> smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.15.0-20-generic] (local build)<br class="">
<br class="">
MacPorts has the 6.6 release, corresponding to svn r4594. Ubuntu has an<br class="">
svn snapshot from sometime after 6.5 but before 6.6, r4324. This is<br class="">
confirmed by the listed Ubuntu package version:<br class="">
<br class="">
<<a href="https://packages.ubuntu.com/bionic/smartmontools" rel="noreferrer" target="_blank" class="">https://packages.ubuntu.com/bionic/smartmontools</a>><br class="">
<br class="">
- Josh<br class="">
</blockquote></div></div>
</div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></div></blockquote></div></div>
</div></blockquote></div><br class=""></div></body></html>