As Graham Pugh and others have reported, running softwareupdate –list can cause the softwareupdated daemon to hang, also when softwareupdate is run as part of updating inventory in Jamf Pro.
Pugh discovered that you can read the number of available updates using the following command:
defaults read /Library/Preferences/com.apple.SoftwareUpdate.plist
RecommendedUpdates
To be able to send notifications that encourage users to run Software Update, I used to rely on a smart group that was dependent upon Jamf’s inventory update. Unfortunately, I have had to disable collection of available software updates under Computer Management – Management Framework – Inventory Collection – Collect available software updates, since it does not currently work properly.
Using Graham Pugh’s method of checking for available updates, I created an Extension Attribute and a Smart Group, so I can still notify users of updates, without causing softwareupdated to hang.
- In Computer Management – Management Framework – Extension Attributes, create a new Extension Attribute called Software Updates Available. Data Type: String, Inventory Display: General, Input Type: Script. Using the following script RecommendedUpdates.sh.
- Create a Smart Computer Group called Has Apple Software Updates Available with the Criteria Software Updates Available is True.
The above should be used in combination with a script or profile which enables checking for updates. You may now target clients which have software updates available and remind users to update.