MacOS lock / unlock times

You can find lock / unlock times in log using terminal. The script below searches for records in last 8 hours, but you may change it using --last parameter. See lockunlock for details.

log show --last 8h --style syslog \
  --predicate 'process == "loginwindow"' | grep -iE "user is active, releasing the activity semaphore|going inactive, create activity semaphore"

Leave a Reply

Your email address will not be published. Required fields are marked *