title: Kernel module: how to get console ouput?
body: <p>I am writing a kernel module, and I want to be able to print something on the console output when loading it using <code>insmod module.ko</code>.</p>
  
  <p>I tried using</p>
  
  <pre><code>printk(KERN_EMERG "test kernel emergency\n");
  </code></pre>
  
  <p>but nothing appears on my console. It does however appear in <code>dmesg</code>.</p>
  
  <p><strong>Extra info:</strong><br/>
  I am using an Intel x86 32 bit with linux-3.0.0</p>
  
  <p>and <code>cat /proc/sys/kernel/printk</code> gives<code>4 4 1 7</code></p>