volumeAvailableCapacityForImportantUsage, which is new in 10.13.volumeAvailableCapacity, which is common to previous versions of macOS.The system calls in High Sierra now provide three separate and quite different estimates of free capacity: The second discrepancy occurs in the Storage tab, which consistently adds the ‘purgeable’ capacity to make the free capacity larger by a few GB.Īs far as I can see, in normal conditions, Sierra’s remaining discrepancies are due to inconsistencies in the definition of free space between different parts of macOS, and the underlying figures appear to be consistent and reliable. The difference here appears to match the capacity designated by Disk Utility as being ‘purgeable’, typically a few GB. The first is that the Finder’s Get Info dialog reports used capacities which are consistently slightly greater than those of VolSizes. A copy, without any documentation, is available from here: VolSizesĬomparing the results obtained from VolSizes with those in standard GUI tools bundled with macOS Sierra, there are only two discrepancies which I have been able to identify. I have wrapped that code into a simple app named VolSizes, which runs on El Capitan (I hope), Sierra, and High Sierra. This is made more complex in High Sierra, because there are two additional resource values offered, volumeAvailableCapacityForImportantUsage and volumeAvailableCapacityForOpportunisticUsage, whose names are the best available guide as to what they might mean. Calculate the capacity used as the difference between the total and available capacities.Which returns the available capacity of the volume in bytes. Let theCap = theRes.volumeAvailableCapacity Let theRes = try theURL.resourceValues(forKeys: ) Obtain the resource values for each URL using calls of the form.Obtain a URL for the path to each volume currently mounted in /Volumes.I will provide full source code in another article, but the algorithm involves: To look at this more carefully, I have adopted the recommended macOS system calls to obtain information about mounted volumes, through URL resource values. The ways in which used and free space are reported have also become more complex, and in APFS there are now containers as well as volumes. In High Sierra, some users have reported discrepancies of hundreds of GB, which go beyond minor computational error. These were essentially fixed by 10.12.6, although even there completion can take a long time. In versions prior to 10.12.6, there were several bugs in that tab, which on many Macs never completed its calculations either. In Sierra, these have mainly been discrepancies between figures claimed in the Storage tab of About This Mac, and everything else. Several Mac users have contacted me to report apparent contradictions between different estimates of free space remaining on their disks, particularly the startup volume.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |