From: Prasanna S P. <pra...@in...> - 2004-02-20 12:55:03
|
Hi all, Here is a document README explaining setting of LKCD Network dump based on Netpoll APIs. LKCD netdump has been recently modified to make use of Matt Mackall's Netpoll APIs. Both Netconsole and Lkcd network dumping can be achieved using Matt Mackall's Netpoll patch. To achieve Lkcd netdumping, both the dumping machine and target machine must be configured. Five Steps to Configure LKCD Netdump. Instructions to Configure Dumping Machine. Choose either step 1 or step 1A. 1. Downloads and Applying Patches =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= You need to download the netpoll-core.patch and netconsole.patch avaliable at http://www.selenic.com/netpoll/ Download the LKCD code from cvs using cvs -d:pserver:ano...@cv...:/cvsroot/lkcd login (press enter key for passwd) cvs -z3 -d:pserver:ano...@cv...:/cvsroot/lkcd co 2.6 cvs -z3 -d:pserver:ano...@cv...:/cvsroot/lkcd co lkcdutils Apply the netpoll and netconsole patches in the order shown below. netpoll-core.patch netconsole.patch Copy the lkcd files to the kernel source directory. #cp -r ../2.6/* ./linux-2.6/ Now apply the following patches in the order given below from the 2.6/patches directory. kernel-changes.patch netpoll-core-addon.patch pollcontroller.patch lkcd-netdump-netpoll.patch If you have choosen the above step 1 ignore step 1A. 1A.Downloads and Applying patches from bk tree =-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=- The netpoll patch has recently been included in Jeff Garzik's tree and the latest patches can be downloaded from this URL. http://www.kernel.org/pub/linux/kernel/people/jgarzik/patchkits/2.6/broken-out/ You need to download 2.6-bk-netdev.tar.gz patchset and extract netpoll.patch from 2.6-bk-netdev.tar.gz patchset. Download the LKCD code from the cvs using cvs -d:pserver:ano...@cv...:/cvsroot/lkcd login (press enter key for passwd) cvs -z3 -d:pserver:ano...@cv...:/cvsroot/lkcd co 2.6 cvs -z3 -d:pserver:ano...@cv...:/cvsroot/lkcd co lkcdutils Instruction to apply the netpoll.patch downloaded from Jeff Garzik's tree. Copy the lkcd files to the kernel source directory. #cp -r ../2.6/* ./linux-2.6/ First apply the netpoll.patch patch. netpoll.patch #downloaded from Jeff Garzik's tree. Now apply the following patches in the order given below from the 2.6/patches directory. kernel-changes.patch lkcd-netdump-netpoll.patch 2. Build the kernel =-=-=-=-=-=-=-=-=-=- Set the following options during kernel building using oldconfig/xconfig/menuconfig. CONFIG_NETCONSOLE to "y" CONFIG_NETPOLL_RX to "y" CONFIG_NETPOLL_TRAP to "y" CONFIG_CRASH_DUMP to "y" CONFIG_CRASH_DUMP_BLOCKDEV to "y" or "m" CONFIG_CRASH_DUMP_NETDEV to "y" or "m" Now build the kernel; reboot with *new* kernel and insert the dump_netdev.o module. 3.Installing Lkcdutils =-=-=-=-=-=-=-=-=-=-=- You also need to install and setup the lkcdutils dowloaded form LKCD CVS. #./configure; make; make install. #cd netdump #make; make install. 4.Setting Dumping machine. =-=-=-=-=-=-=-=-=-=-=-=-=- Configure the netdump *fields* in the /etc/sysconfig/dump file. #you need to specify the local port, remote port, local ip, target ip and device name for netdump. eg : DUMP_ACTIVE=1 DUMPDEV=eth0 DUMPDIR=/var/log/dump DUMP_SAVE=1 DUMP_LEVEL=2 DUMP_FLAGS=0x40000000 DUMP_COMPRESS=0 PANIC_TIMEOUT=5 TARGET_HOST=9.182.14.241 #specify IP of the target machine TARGET_PORT=6688 SOURCE_PORT=6688 ETH_ADDRESS=00:07:95:E6:08:FB #specify the mac address of the target machine Run lkcd config. 5.Setting Target Machine -=-=-=-=-=-=-=-=-=-=-=-=- You also need to set the netdump-server on the target machine to store network dumps. Copy the lkcdutils on the target machine and install lkcdutils. #cd lkcdutils #./configure #make ; make install Netdump server is not installed by default, it is required to be installed separately. #cd netdump #make; make install Start the netdump-server using following command #/usr/sbin/netdump-server --daemon Now you are all set to go. Any suggestions to improve Netpoll based LKCD Netdumping are welcome. -- Have a Nice Weekend! Thanks & Regards Prasanna S Panchamukhi Linux Technology Center India Software Labs, IBM Bangalore Ph: 91-80-5044636 |