2006-11-28 15:24:58

by Dan Aloni

[permalink] [raw]
Subject: [RFC&PATCH] KDB over the network using netconsole

Hello,

Today I had to debug a kernel of a remote machine that has no IPMI
or serial console attached to it. So I sat for two hours and cooked
a support for interacting with KDB purely over the network, by
extending netconsole.

The result is very adhoc-ish in nature, but it works nicely. Your
comments regarding how to go further with this will be appreciated.
Should I'm too busy working on other things, perhaps someone else will
find a way to work toward a cleaner, accpetable implementation.


The usage is quite simple:

at the client
-------------
./netkdb [remote_ip]

at the server
-------------
insmod netconsole netconsole=[params]
enter KDB through crash or otherwise.


This client above works as a netconsole client, and in addition to that,
every keystroke will translate to a UDP packet sent back to the machine.
The client assumes that the local UDP port is 9353 and the port at the
machine running KDB is 6656.

I've attached the patch and the client util. The patch works for kdb 4.4
and Linux 2.6.18 on x86_64.

- Dan


Attachments:
(No filename) (1.03 kB)
netkdb.c (3.39 kB)
netkdb.diff (4.46 kB)
Download all attachments