Mac OS X does not seem to dump the exact output of dmesg to a file. I need to log the dump of dmesg to the disk.

kernel.log and system.log do not contain the required information. Only output of dmesg tells me which file failed to read from a faulty drive.

Compare output in kernel.log:

Oct 25 19:28:31 The-Evil-Lion kernel[0]: disk0s2: I/O error.

with the output of dmesg:

         0 [Level 3] [ReadUID 0] [Facility com.apple.system.fs] [ErrType IO] 
[ErrNo 5] [IOType Read] [PBlkNum 338383504] [LBlkNum 0] [FSLogMsgID 626287415] 
[FSLogMsgOrder First] 
         0 [Level 3] [ReadUID 0] [Facility com.apple.system.fs] 
[DevNode /dev/disk0s2] [MountPt /Volumes/Macintosh HD] 
[Path /Volumes/Macintosh HD/Users/user/Library/Preferences/ByHost/com.apple.scheduler.5D78E5A0-512D-52FF-8FC8-CBCEC048CC69.plist] 
[FSLogMsgID 626287415] [FSLogMsgOrder Last] 

(newlines added for readability)

Actual issue is that I cannot type dmesg during the boot, for obvious reasons. Dumping the dmesg to a file during boot would be extremely helpful.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.