Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

First, I don't know if this is the correct place to put this question. Would Serverfault or Stackoverflow be better?

I was running through a tutorial on making Mac Kernel Extensions. I loaded it, and when I did tail -1 /var/log/system.log, it didn't tell me "Hello World!", it said...

parentalcontrolsd[374]: -[ActivityTracker appDidLaunchOrBecomeFront:launched:] [1844:wolfram] -- Got an error when saving MOC: Error Domain=NSCocoaErrorDomain Code=134030 UserInfo=0x36ba10 "An error occurred while saving."

A few things... What does this mean? And am I looking at the right log file? I can pick out that it's the parentalcontrolsd telling me that the ActivityTracker found that some app launched for the user wolfram. Any help?

Here is my code...

#include <libkern/libkern.h>
#include <mach/mach_types.h>

kern_return_t MyKextStart(kmod_info_t *ki, void *d)
printf("Hello, World!\n");

kern_return_t MyKextStop(kmod_info_t *ki, void *d)
printf("Goodbye, World!\n");

extern kern_return_t _start(kmod_info_t *ki, void *data);
extern kern_return_t _stop(kmod_info_t *ki, void *data);

KMOD_EXPLICIT_DECL(edu.nerd.kext.MyKext, "1.0.0d1", _start, _stop)
__private_extern__ kmod_start_func_t *_realmain = MyKextStart;
__private_extern__ kmod_stop_func_t *_antimain = MyKextStop;
__private_extern__ int _kext_apple_cc = __APPLE_CC__;
share|improve this question
up vote 2 down vote accepted

Your debug output will be in kernel.log, not system.log. Further, the terminal command kextstat | grep 'MyKext' will tell you whether your kext is loaded.

share|improve this answer
Thanks! I take it this is your first answer, so +1 and an accept – CoffeeRain Mar 5 '12 at 23:05
sudo nvram boot-args="kext-dev-mode=1 debug=0x22"
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.