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…
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)?
No idea what this may be. Never seen it myself. Anyway. It should work in Windows. The problem is OS X. Are all your drives NVMe?
What model of MacBook Pro 2016 do you have? And what Apple SSD model?
We have two, but the one that I use is the 2.7GHz MacBookPro13,3 with 512GB Samsung (APPLE SSD SM0512L) with CXS6AA0Q firmware and AMD with 4GB.
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
arewere missing. Thanks for pointing that out.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
Pingback: NVMe boot args and Dummy kext… – Pike's Universum
Wow, how you’ve got all this data? Can you share the hack, please?
I will. In due time. Busy with other stuff.
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.
Hi, I’d love to help test this for you. Not fussed about the format of the output.
Hi Mark,
Ok, but still. You probably have to wait a little longer (update to follow a.s.a.p).
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.
Ping again 🙂 any chance to see this took in the wild?
Not before I am home.
thank you for reply, will have to wait 🙂 still cant get why apple decided not to expose this api…
Just found this site, any new progress on your tool?
It is now already supported in the smartmontools/osx
You mean in part. Right?
@pikeralpha yes, see https://www.smartmontools.org/browser/trunk/smartmontools/os_darwin.cpp#L563 and https://smallhacks.wordpress.com/2017/09/20/how-to-monitor-nvme-drives-in-the-osx/. I been not able to get GetLogPage working, if you can help here – thats would be great!