Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Logging commands

EAP logs

  • log stream --predicate 'subsystem == "com.apple.eapol"'

Logs logged via logger

logger -is -t $title "Hello Logs"
log show --predicate 'eventMessage contains "Hello Logs"' --last 3m

DEP

  • sudo log stream --info --debug --predicate 'subsystem contains "com.apple.ManagedClient.cloudconfigurationd"'

MDM / VPP

  • log stream --info --debug --predicate 'processImagePath contains "mdmclient"'
  • log stream --info --debug --predicate 'processImagePath contains "storedownloadd"'
  • log stream --info --debug --predicate 'processImagePath contains "appstored"'

Software Update

  • log stream --info --debug --predicate 'processImagePath contains "softwareupdated"'

Grab logs for checking later

  • sudo log collect --output ~/Desktop
  • sudo log collect --start "2022-05-06 09:00:00" --output ~/Desktop
  • log show ~/Desktop/system_logs.logarchive --predicate '((process == "cloudconfigurationd") || (process = "mdmclient"))'
  • log show --info --debug --predicate 'processImagePath contains "softwareupdated"' -last 30m

Enable MDM debug

sudo touch /var/db/MDM_EnableDebug
sudo log config --subsystem com.apple.ManagedClient --mode="level:debug,persist:debug"

Disable MDM debug

sudo log config --subsystem com.apple.ManagedClient --reset
sudo rm /var/db/MDM_EnableDebug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment