2

Is there a way to detect bad shutdowns in OS X?

The best I can come up with is parsing /var/log/system.log for lines like this:

12118 Jan 28 21:51:38 localhost bootlog[0]: BOOT_TIME 1422492698 0

without a previous line like this:

12112 Jan 28 20:39:58 Pauls-iMac.local shutdown[346]: SHUTDOWN_TIME: 1422488398 77104

What I have looked into

I share my computer with other users and I suspect some are not shutting down the computer correctly (i.e. turning it off at the wall instead of shutting it down correctly). So I want to detect the bad shutdown on the next boot.

I heard that OS X Server logs "Improper shutdown detected" in /var/logs/system.log, I think however, OS X does not. Surely there is some flag that is not set by the system following a bad shutdown (e.g. so that disk repairs can be performed by the system later).

I checked out dmesg which didn't have much (no timestamps either) and the logs in Console.app, but found no message that definitively indicated an improper shutdown.

1

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.