Re: Logging from kernel
Re: Logging from kernel
- Subject: Re: Logging from kernel
- From: "Justin C. Walker" <email@hidden>
- Date: Thu, 26 Oct 2006 07:27:33 -0700
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:
This email sent to email@hidden