The system does not know which action will be the next. If instead of opening a new application after an hour you decide to work on some stuff that was cached (and is part of the inactive memory) it will be already there.
Instead of swapping out to free memory or emptying disk caches the system waits to see if you actually need the memory to avoid unnecessary work.
You can always force the disk caches to be flushed (freeing some memory) with the purge
command.
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:
0xae Host_Reads_MiB ----CK 100 100 000 - 12268569 (~12 TiB)
0xaf Host_Writes_MiB ----CK 100 100 000 - 16481745 (~16 TiB)
compared to the 3 TB HDD (the second part of the Fusion drive):
0xf1 Total_LBAs_Written ------ 100 253 000 - 21361815408 (~10 TiB)
0xf2 Total_LBAs_Read ------ 100 253 000 - 23925221693 (~11 TiB)
After installing smartmontools the following commands give the written data in GB if the attribute "242 Total_LBAs_Written" exists:
smartctl -s on -i -A -f brief -f hex,id -l devstat /dev/DiskIdentifier | grep 0xf1 | awk '{ print $8/1953125 }'
or in TB:
smartctl -s on -i -A -f brief -f hex,id -l devstat /dev/DiskIdentifier | grep 0xf1 | awk '{ print $8/1953125000 }'
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):
smartctl -s on -i -A -f brief -f hex,id -l devstat /dev/DiskIdentifier | grep 0xaf | awk '{ print $8/953.67 }'
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
Best Answer
macOS logs the computer's MAC addresses in these files:
/var/log/daily.out
and/var/log/wifi.log
.Since a MAC address (MAC stands in this context for media access control) is unique to every network interface and thus different on every Mac, you can list the current computer's MAC addresses and check if they differ from what has been logged:
/Applications/Utilities
.Run:
to list all physical MAC addresses on your Mac.
Output will be similar to this:
Now run:
to list all logged physical MAC adresses.
Output will be similar to this:
Compare the output of
ifconfig
with the logged MAC addresses.If a MAC address listed in step 3 is not included in the list from step 2, it is very probable that the internal storage has been used with another Mac.