Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

I have installed netconsole using the instructions given here.

dmesg | grep netconsole says everything is OK, but I won't believe it so easily :)

How can I make Ubuntu generate some kernel message in order to see if netconsole really works and sends everything to the other computer?

I tried:

logger -p kern.alert "test message" # this apparently talks to syslog only
echo "test message" >/dev/kmsg

and wrote a small program that just did a segfault. All this generated entries in /var/log/kern.log, but not in dmesg and it was not copied via netconsole to the other computer.

So what can I do to see if netconsole actually works?

System info:

Ubuntu 12.04
share|improve this question

You can generate console messages using alt+sysrq strings.

Something safe like:

echo m | sudo tee /proc/sysrq-trigger

You should see a few lines of text like the following on the netconsole server:

[ 7027.114084] Node 0 DMA: 2*4kB 2*8kB 0*16kB 2*32kB 1*64kB 1*128kB 1*256kB 0*512kB 1*1024kB 1*2048kB 3*4096kB = 15896kB
[ 7027.114092] Node 0 DMA32: 284*4kB 123*8kB 108*16kB 207*32kB 202*64kB 89*128kB 34*256kB 15*512kB 4*1024kB 3*2048kB 5*4096kB = 81896kB
[ 7027.114099] Node 0 Normal: 311*4kB 142*8kB 121*16kB 79*32kB 67*64kB 24*128kB 9*256kB 8*512kB 9*1024kB 2*2048kB 1*4096kB = 38012kB
[ 7027.114107] 446611 total pagecache pages
[ 7027.114108] 0 pages in swap cache
[ 7027.114110] Swap cache stats: add 0, delete 0, find 0/0
[ 7027.114111] Free swap  = 4104672kB
[ 7027.114112] Total swap = 4104672kB
[ 7027.124913] 1048048 pages RAM
[ 7027.124916] 58057 pages reserved
[ 7027.124918] 360968 pages shared
[ 7027.124919] 807997 pages non-shared
share|improve this answer

Its on step 5 of mentioned howto:

One way to test whether logging is working correctly or not is to insert some removable media like a CD, DVD or usb stick.

share|improve this answer

The netconsole howto says that you can just

dmesg | grep netcon
share|improve this answer
This only verifies that the server claims to be sending the packets. It doesn't affirmatively test whether the receiver is receiving/logging/etc. those packets. – fdmillion Sep 19 '15 at 18:44

You can test it also with

modprobe floppy

on the sender's side, the log server would then say something like:

Jan  5 10:45:20 node01 floppy0: no floppy controllers found
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.