Is there a Terminal command which will show me how many GB has been written to my SSD through the whole lifetime of the disk? I'm asking because I want to find out how many cycles have been done. SSD are able to do about 1000–2000 cycles depending on type.
MacOS – How much data has been written to the SSD over its lifetime
disk-utilitymacosssdterminal
Related Question
- Mac – My SSD Drive has been converted to a Core Storage drive and cannot be erased/reformatted
- MacOS – DiskUtility throwing “com.apple.disutility error 3” on “Operation failed with status 5” on Sierra while making image backup of main SSD
- MacOS – How to find out what is reading and writing so much data on the MacBook
Best Answer
Read out the following S.M.A.R.T attributes of your SSD with an appropriate tool*:
241 - Total LBAs Written: The total number of 512-byte sectors written during the entire lifetime of the device.
242 - Total LBAs Read: The total number of 512-byte sectors read during the entire lifetime of the device.
A second set of attributes is:
174 - Host_Reads_MiB
175 - Host_Writes_MiB
But i don't know if the values found in the second set really make sense (at least for me with a 120 GB SSD as one part of a Fusion drive) because considerably more data is written to the SSD than the HDD though the SSD has only 1/25th of the size:
compared to the 3 TB HDD (the second part of the Fusion drive):
After installing smartmontools the following commands give the written data in GB if the attribute "242 Total_LBAs_Written" exists:
or in TB:
Replace "DiskIdentifier" with the identifier of your internal SSD found with
diskutil list
. Probably it's disk0.The following command gives the written data in GB if the attribute "175 - Host_Writes_MiB" exists (treat the result with caution):
For some SSDs, like the Sandisk Plus 120Gb, the $8 value is already in GB so you'll need to use division to calculate the value.
Like already mentioned earlier replace "DiskIdentifier" with the identifier of your internal SSD found with
diskutil list
. Probably it's disk0.The smartctl commands above doesn't work very reliable (at least for me).
If you get an error like "Read SMART Data failed: Undefined error: 0", try
smartctl -A /dev/disk0
first.If you get an error like "SMART Disabled. Use option -s with argument 'on' to enable it.", try
smartctl -s on -A /dev/disk0
Then retry the above commands to readout and calculate data written to disk.
*smartmontools