How to debug *BSD kernel (2) remote debugger need two (or more) machines, but very powerful. you would be able to do almost everything you want: set breakpoints, run-time variable examination, step-by-step execution... procedure: 1. connect the target and working machines with a serial cable. 2. build kernel with KGDB support on the working machine. 3. boot the target machine with the KGDB-enabled kernel. 4. invoke gdb on the working machine and control the target machine by the gdb session. for more details: (FreeBSD) http://www.freebsd.org/handbook/x18366.html (NetBSD) http://www.netbsd.org/Documentation/kernel/kgdb.html (BSD/OS) http://www.v6.wide.ad.jp/Documents/debug.html statistics useful to find memory leakage or packet invalidity. examples "netstat -m": mbuf statistics "netstat -s": general network statistics "vmstat -m": kernel memory statistics