Apple NVMe SMART Monitor Under Control…

Apple isn’t sharing any information about their SMART API’s so I had to dig a little and this is the first result (spoiler alert) from my hack:


-----------------------------------------
Smart Log for NVME device...............: disk0
NamespaceID.............................: 1
Critical Warning........................: 0
Temperature.............................: 37 °Celsius
Available Spare.........................: 100%
Available Spare Threshold...............: 10%
Percentage Used.........................: 1%
Data Units Read.........................: 4,292,043,776,000 [4.29 TB]
Data Units Written......................: 2,145,884,672,000 [2.14 TB]
Host Read Commands......................: 151780827
Host Write Commands.....................: 50512740
Controller Busy Time....................: 248 minutes
Power Cycles............................: 1541
Power On Hours..........................: 1156 hours
Unsafe Shutdowns........................: 784
Media and Data Integrity Errors.........: 0
Number of Error Information Log Entries.: 34

Here is an older one from my MacBook Pro:

-----------------------------------------
Smart Log for NVME device...............: disk0
NamespaceID.............................: 1
Critical Warning........................: 0
Temperature.............................: 22 °Celsius
Available Spare.........................: 100%
Available Spare Threshold...............: 10%
Percentage Used.........................: 0%
Data Units Read.........................: 7086678
Data Units Written......................: 4943651
Host Read Commands......................: 11389069
Host Write Commands.....................: 7246825
Controller Busy Time....................: 44 minutes
Power Cycles............................: 431
Power On Hours..........................: 9 hours
Unsafe Shutdowns........................: 15
Media and Data Integrity Errors.........: 0
Number of Error Information Log Entries.: 0

The temperature on my MacBook Pro is lower. Only 22 °Celsius. I was also unpleasantly surprised by the fifteen ‘Unsafe Shutdowns’ on it. This has to be a driver issue. Never had a single freeze, lockdown or sudden reboot.

The high number of ‘Unsafe Shutdowns’ on the hack is easily explainable. As you know, I do a lot of testing and then things can go wrong. And they do go wrong with a couple of beta kernel drivers.

More to come…

26 thoughts on “Apple NVMe SMART Monitor Under Control…

  1. I have SMART status unavailable for my disks in system information, although I’ve set it in BIOS and can access is via third party software (HWMonitor).

    What could be the reason? Is there a patch for it (DSDT or kext)?

      • It looks like Samsung-based NVMe SSDs in MacBook’s have better NVMe SMART support, because my APPLE AP0256J SSD doesn’t support Error Log for example, also it has different “available spare threshold”.
        BTW IMHO some values from your first listing look strange – Data Units Written = 214 TB? Hm…

      • The durability goes up with the capacity and I believe that all Apple SSD’s support error logs, but nobody knows how to read it.

        Ah right. I see. The thousands separators are were missing. Thanks for pointing that out.

  2. Model Number: APPLE SSD AP0256J
    Firmware Version: 12.93.01
    Total NVM Capacity: 0
    Unallocated NVM Capacity: 0
    Controller ID: 0
    Number of Namespaces: 2
    Namespace 1 Size: 251,000,193,024 [251 GB]
    Namespace 1 Capacity: 251,000,193,024 [251 GB]
    Namespace 1 Utilization: 251,000,193,024 [251 GB]
    Namespace 1 Formatted LBA Size: 4096
    Firmware Updates: 1 Slot
    Maximum Data Transfer Size: 256 Pages
    Warning Comp. Temp. Threshold: 0
    Critical Comp. Temp. Threshold: 0
    Namespace 1 Features (0x00): 0
    Log Page Attributes: 0
    Error Log Page Entries (max): 0

    —-

    Critical Warning: 0x00
    Temperature: 39 Celsius
    Available Spare: 86%
    Available Spare Threshold: 2%
    Percentage Used: 0%
    Data Units Read: 3,229,653 [1.65 TB]
    Data Units Written: 2,959,248 [1.51 TB]
    Host Read Commands: 19,595,617
    Host Write Commands: 13,087,280
    Controller Busy Time: 0
    Power Cycles: 279
    Power On Hours: 10
    Unsafe Shutdowns: 1
    Media and Data Integrity Errors: 0
    Error Information Log Entries: 0
    Warning Comp. Temperature Time: 0
    Critical Comp. Temperature Time: 0

    —-
    1 unsafe shutdown was real unsafe shutdown

    • @supersonic, I am curious about your readings above. You have (had) only 10 hours of power-on, yet 1.5TB of data written and only 86% remaining lifespan of the SSD.
      I have a MacBook Pro (2017) 13 that is one week old, with the following readings:

      Available Spare: 82%
      Available Spare Threshold: 2%
      Percentage Used: 0%
      Data Units Read: 16,036,595 [8.21 TB]
      Data Units Written: 8,295,510 [4.24 TB]
      Host Read Commands: 15,443,859
      Host Write Commands: 12.508,631
      Controller Busy Time: 0
      Power Cycles: 319
      Power On Hours: 5

      My drive is 4x bigger than yours (I have 1TB) and so I think my readings are in the same ballpark.

      Here’s my question: Are these for real? I am certain I have not done stuff in one week of ownership that amounts to this much SSD use! How old was your MacBook when you made these readings? Which model do you have?

      Thanks a lot in advance.

      • @pejx72
        Sorry for the delay with response.

        > Are these for real?
        Yes, this was the real report from DriveDx app (1.6.0 alpha) – https://binaryfruit.com/drivedx.

        > How old was your MacBook when you made these readings?
        About 2 weeks.

        > Which model do you have?
        MacBook Pro 13″ 2016 (w/o TouchBar), purchased Jan 20, 2017

        Current data (2017-08-29):

        Critical Warning: …………………………. 0x00
        Temperature: ……………………………… 36 Celsius
        Available Spare: …………………………..86%
        Available Spare Threshold: ……………2%
        Percentage Used:……………………….. 3%
        Data Units Read: ………………………….56,423,021 [26.3 TB]
        Data Units Written: ……………………….56,180,466 [26.2 TB]
        Host Read Commands: …………………256,763,077
        Host Write Commands: …………………216,424,066
        Controller Busy Time:…………………… 0
        Power Cycles: ……………………………..897
        Power On Hours: …………………………180
        Unsafe Shutdowns: ………………………11
        Media and Data Integrity Errors: ……..0
        Error Information Log Entries:………… 0
        Warning Comp. Temperature Time:… 0
        Critical Comp. Temperature Time:….. 0

  3. Pingback: NVMe boot args and Dummy kext… – Pike's Universum

  4. Apple has their SMART data locked rather tightly, but we managed to create a tool that easily reveals them, no kernel extension or anything needed, runs with standard Apple drivers. This tool is called SSD Health Check for NVMe and runs on macOS 10.12 or newer, available on our homepage: http://www.b-eng.ch/app/ssd-health-check-4-nvme/

    Sorry for this shameless self-advertising, but it seems a lot of people are asking for this.

    • Thanks, but apparently you don’t know how it works around here. Well. Let me tell you this. We here – I and my readers – actually like, support and promote open source software (OSS). So guess what? That is exactly what I plan on sharing. The source code of a funny little working open source command line tool. Showing you more information. All for free. Oops. Sorry.

      • I wasn’t aware that this site is dedicated to open source only, sorry for my post.
        But since we are really pround about this app I couldn’t resist to spread news about it.

        Our developer told me that the reason for the unsafe shutdowns you are seeing in your stats could be that macOS requests the SSD being in standby when reading smart data, otherwise unexpected results can be expected. I was told that he had similar results when using kernel extensions (he mentioned BSD and kext).

        I hope this helps in completing your command line tool.

      • Good luck with it.

        By the way. Can you explain us here why it only shows a very limited piece of all available information? At least in the screen shot on the app store.

        About the unsafe shutdowns. No. The unsafe shutdowns has nothing to do with reading SMART data.

        p.s. My command line tool aka ANSmon (Apple Nvme Smart monitor) works, but I am unhappy with the layout of the output.

  5. Hi, i am one of the author of the smartmontools utility and was implementing nvme support for the FreeBSD and also was working on improvements of smartmontools/osx. Could you try to add patches for smartmontools to support nvme in it or at least to share the interface description? Our project page is smartmontools.org.

Leave a reply to JustAsking Cancel reply