Debugging There is an online kernel debugger, for examing state while running and playing hangman with the kernel symbol list. You can "crash dump" here if you have enough disk space, and debug later. Or you can run a multiple computer setup with kgdb, over serial line. Userland tools monitor interrupt usage with 'systat vm' monitor mbuf usage with 'netstat -m' monitor packet counts/errors with 'netstat -i' Use macros for debug messages, verbosity can be changed via ddb. #ifdef THT_DEBUG #define THT_D_FIFO (1<<0) #define THT_D_TX (1<<1) #define THT_D_RX (1<<2) #define THT_D_INTR (1<<3) int thtdebug = THT_D_TX | THT_D_RX | THT_D_INTR; #define DPRINTF(l, f...) do { if (thtdebug & (l)) printf(f); } while (0) #else #define DPRINTF(l, f...) #endif