Skip to main content
Question

Catalina HDD - Data summary

  • November 11, 2019
  • 2 replies
  • 20 views

Forum|alt.badge.img+4

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

Forum|alt.badge.img+4
  • Author
  • New Contributor
  • January 30, 2020

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>"

Forum|alt.badge.img+6
  • Contributor
  • April 26, 2022

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?