Francois Marier: Logging kernel messages over the network using netconsole
I recently had to setup netconsole in order to diagnose some grsecurity-related suspend/resume problems. The idea is to have the broken machine send its kernel messages to a remote machine via the network.
As a prerequisite, the local machine (the one sending the console messages) must have the following kernel options turned on:
Interested readers may want to look at other ways to configure and use netconsole.
As a prerequisite, the local machine (the one sending the console messages) must have the following kernel options turned on:
- CONFIGFS_FS
- NETCONSOLE
- NETCONSOLE_DYNAMIC
netcat -l -p 64001 -u -s 192.168.1.1 2>&1 tee /root/netconsole.logThen, running this script on the local machine will turn netconsole on (don't forget to customize the appropriate parameters for your environment):That's all you need to start seeing messages on the remote machine's screen.#!/bin/sh
modprobe configfs
umount /sys/kernel/config 2> /dev/null
mount -t configfs none /sys/kernel/config
modprobe netconsole
mkdir /sys/kernel/config/netconsole/hostname
echo "xx:xx:xx:xx:xx:xx" > /sys/kernel/config/netconsole/hostname/remote_mac
echo 192.168.1.1 > /sys/kernel/config/netconsole/hostname/remote_ip
echo 64001 > /sys/kernel/config/netconsole/hostname/remote_port
echo 192.168.1.2 > /sys/kernel/config/netconsole/hostname/local_ip
echo 64001 > /sys/kernel/config/netconsole/hostname/local_port
echo eth1 > /sys/kernel/config/netconsole/hostname/dev_name
echo 1 > /sys/kernel/config/netconsole/hostname/enabled
dmesg -n 8
Interested readers may want to look at other ways to configure and use netconsole.
( I love acronyms :-D )
I’ve finished the porting of
dsyslog 0.3 has been released, with support for postgresql logging targets, and much more. The development of postgresql support, and extensive documentation, has been made possible by Google’s summer of code program sponsorship of
As it usual when someone gets in, this is my hello Planet Debian post.
I’m
One of the reasons that I didn’t post much last week was that I was contacting some of 
Just over three weeks ago I started a new job, I left my position as a Network Manager to start a job as a Linux Consultant. On my last day I was given a rather generous collection from everyone there. The purpose of this post is to show everyone that the money was well spent, the picture shows the books and DVDs that I bought.
Thanks guys.
I've been rather disconnected lately, trying to finish my PhD, find a job, etc. I got permission from my committee to start writing my thesis a few weeks ago, so I've been trying to get that in gear, as well as finishing up data for publication. This should all be done by November, if all goes well, so I can get back to spending more time on the things that I love.
You can now try the
So apparently the Belgian 'government' has failed to meet its
deadline; and as a result, the prime minister has handed in the
'government's resignation to the King. I say 'government', because these
people have been doing quite a lot of things—all except
governing...
I must say I can't be surprised. I never liked 