Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Logging from kernel




On Oct 26, 2006, at 24:42 , Thulli wrote:

Can somebody advise on the best method for logging from a kext.
Considered the following.
1. printf and IOLog. I couldn't catch the logs just before my kext caused panic :)

These are two choices; the other is syslog(). They all are pretty much the same (i.e., they are wrappers around the same code), although IOLog is designed for IOKit components.


2. Custom event logging: This method is very heavy. I don't want to write a user land tool, just for logging purpose.

Not really a solution, for the same reasons the above aren't perfect.

3. asl looks very good. Is this available for a kext ?

Well, the header file is in /usr/include, which is a great indicator for kernel use: can't (or shouldn't) be used in the kernel.


Your basic problem is that, if a panic occurs, the system grinds to a halt and therefore, any scheme that makes use of system mechanisms will halt along with it.

There is not a very good way to deal with this in the field, due to the above.

Andrew's suggestion is about the best that I'm aware of. The ability to send a kernel dump to a (local) dump server might be of some help, depending on how your customers are set up.

Justin

--
Justin C. Walker, Curmudgeon at Large
Institute for the Absorption of Federal Funds
-----------
I'm beginning to like the cut of his jibberish.
-----------



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden
References: 
 >help: g++ error on G5 (From: wob <email@hidden>)
 >Re: help: g++ error on G5 (From: Martin Costabel <email@hidden>)
 >Logging from kernel (From: Thulli <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.