Netdump

Netdump provides FreeBSD kernel crash dumping over the network. Netdump is a FreeBSD kernel module client and user-level server.

A normal kernel crash writes a raw dump of memory to a dedicated partition (usually the swap partition) using a low-level disk routine, and then copies that raw dump into a file (via savecore) during the following boot process.

Netdump replaces the standard dump routine. During a crash, a netdump client broadcasts to locate a netdump server, then sends the dump as UDP/IP packets (with retransmission after loss). The netdump server creates a dump file suitable for gdb. If netdump fails (for example, no netdump server is located), a normal disk dump is performed.

Netdump supports partial dumps, where "uninteresting" pages (such as free pages, or buffer-cache data pages) are skipped. This greatly speeds dumps over slow networks, often down to a just a few seconds.

Building

clients:
set ARCH = `uname -m`
mkdir $FREEBSD_HOME/sys/modules/netdump-$ARCH
cd $FREEBSD_HOME/sys/modules/netdump-$ARCH
ln -s $NETDUMP_HOME/Makefile.client Makefile
make depend
make
server:
cd $NETDUMP_HOME
make -f Makefile.server

Running

clients:
set ARCH = `uname -m`
sudo kldload $FREEBSD_HOME/sys/modules/netdump-$ARCH/netdump_client.ko
server:
cd $NETDUMP_HOME
./netdump_server /path/where/vmcore/files/should/be/written
Netdump will trigger when a client crashes.

Author

Darrell Anderson, anderson@cs.duke.edu

Known bugs

For some types of crashes, the client will not receive interrupts for incoming packets (including the netdump acks). Netdump polls fxp and de interfaces, other interface types may not always work.