15

I set my kernel to boot up verbose using

sudo nvram boot-args="-v"

These logs are what I wanted to see, but how can I view the log after booting? I searched all log files without success.

3 Answers 3

10

dmesg did not show me the entire boot log but only the last few 100 lines of it, which was not enough.

What works for me (on macOS 10.12.6) to see all boot messages is this command:

sudo log show --predicate "processID == 0" --start $(date "+%Y-%m-%d") --debug

It shows all of today's kernel msgs, including the boot process.

If you only want the msgs since reboot, enter the date and time manually, like this, in 24h format:

sudo log show --predicate "processID == 0" --start "2018-10-28 13:19:00" --debug

(The "sudo" part is currently not necessary, but it doesn't harm, either.)

3
  • 12
    On Mojave, log show --debug --last boot --predicate 'process == "kernel"' works well
    – joki
    Commented Mar 15, 2019 at 10:32
  • 3
    @joki, you should have posted this comment as answer. It's great. Commented Jan 21, 2020 at 18:59
  • 3
    Searching the log over a long period of time can be very slow. Here's a predicate to find when the OS booted: --predicate 'process == "kernel" && eventMessage LIKE "*arwin*"'
    – MarcH
    Commented Apr 26, 2020 at 23:17
2

The log should be printed out to the standard system log in Yosemite and later, at

/var/log/system.log

Prior to Yosemite, the kernel log is at

/var/log/kernel.log
2
  • 1
    kernel.log is no longer present there in High Sierra.
    – user71659
    Commented Oct 18, 2017 at 18:43
  • @user Thanks for the comment, I've updated the answer
    – grg
    Commented Oct 18, 2017 at 18:48
1

Right after booting use dmesg.

 dmesg -- display the system message buffer

You must be root to display the system message buffer.

sudo dmesg
3
  • 1
    Thank you for your answers, but none of your answers solves my problem. The kernel configures for example some ACPI settings. I wrote down the exact string and cannot find this in dmesg output or any of the log files you mentioned. Commented Nov 7, 2017 at 1:32
  • 1
    This is not showing any of the verbose log msgs from the boot process for me on 10.12.6, but only msgs about IOAudioEngine and SandboxViolation. Could it be overflown with new msgs, purging the older ones? Commented Oct 28, 2018 at 13:06
  • @Thomas Tempelmann- That would be the expected behavior., as new messages are stored in the buffer, old messages are purged but I am not going to speculate what Apple is doing.
    – fd0
    Commented Oct 29, 2018 at 16:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .