Catalina HDD - Data summary

beemanaged
New Contributor II

Jamf Pro has a wonderful built in extension for determining the percent usage of the boot drive, however with Catalina that extension is now reporting differently. macOS Catalina now separates user user data into a different volume and as as a result the old extension only shows that a small percentage is taken up because it is seeing the first volume.

Does anyone have a script or way to return the percentage used (or amount) of the data volume in an extension attribute? I haven't been able to find a good script for this.

Thanks

2 REPLIES 2

beemanaged
New Contributor II

Finally figured out an extension attribute for this.

This will spit out how much of the volume is used in a percentage as a string.

#!/bin/sh
used=$( /bin/df -H | awk '//dev/disk1s1/ {print $5}' )
echo "<result>"$used"</result>"

This will spit it out so you can use it as an integer.

#!/bin/sh
used=$( /bin/df -H | awk '//dev/disk1s1/ {print $5}' )
echo "<result>"${used%?}"</result>"

Hi @beemanaged 

I ran both scrips using an EA on os12 systems. No data is displayed.

Any idea?