Drive Capacity not listed !?

maurits
Contributor

We use Jamf Pro 9.101.4 and I noticed that for many machines the 'Drive Capacity MB' empty like this example here: 121df56e4357488e8aec660817465791
Is this a known issue? This behaviour I found for 70% of our Fleet (mostly 10.12.6, most MacBooks, some iMac) and I cannot see the logic which do not report it correctly, and which do. This happends in Jamf Pro 10.1 of a different site in a similar way.

Luckily the 'Boot Drive Percentage Full' is reported correctly.

2 REPLIES 2

maurits
Contributor

As a workaround I have created this extension attribute: (edited 31 jan)

#!/bin/sh
# Extension attribute to find type of internal storage
# you can use this to search for third party disks, SSD or HDD and type/size
# expected output like "APPLE HDD HTS541010A9E662" or "APPLE SSD SM0512L" or "Samsung SSD 850"
# expected output for 2 internal disks without Fusion is like "APPLE SSD SM128E APPLE HDD HTS541010A9E662"
# expected output for Fusion Drive is like "Fusion APPLE SSD SM128E APPLE HDD HTS541010A9E662"
# by Maurits Sanders maurits@prowarehouse.nl for TMG.nl
# tested on 10.12.6 and 10.13.2
# our fleet has MacBooks, some iMacs, most with Fusion Drive (but not all configured as fusion)

# for Macs withj Fusion the $FusionDrive will be 0, for non fusion 1 (I know, not usual)
FusionDrive=$( diskutil cs list | grep Fusion 2>&1 > /dev/null ; echo $? )

DRIVE0=`diskutil info /dev/disk0 | grep "Device / Media Name"| awk '{print $5 " " $6 " "$7}'`
DRIVE1=`diskutil info /dev/disk1 | grep "Device / Media Name"| awk '{print $5 " " $6 " "$7}'`
# for Mac's with one drive and a mounted disk image, ignore these
if [ "$DRIVE1" == "Disk Image" ]; then
    InternalDrives=$DRIVE0
fi
# on 10.13 with one SSD the info for the containter will report the underlying disk.
if [ "$DRIVE0" == "$DRIVE1" ]; then
    InternalDrives=$DRIVE0
else
    InternalDrives="$DRIVE0 $DRIVE1"
fi
# add 'Fusion' to the extension attribute for easy searching
if [ "$FusionDrive" == "0" ]; then
   InternalDrives="Fusion $DRIVE0 $DRIVE1"
fi
echo "<result>$InternalDrives</result>"

exit 0

prodic
New Contributor III

We have implemented a WA similar to @maurits as we also noticed this behaviour.