Thursday, September 16, 2010

How do I configure a Netdump Server and a Netdump Client in Red Hat Enterprise Linux?

Issue

How do I configure a Netdump Server and a Netdump Client in Red Hat Enterprise Linux?

Environment

  • Red Hat Enterprise Linux 3, Red Hat Enterprise Linux 4
  • Netdump

Resolution

  • Netdump is used for capturing vmcores and diagnose kernel panics.
  • Netdump requires there to be a Netdump server and then any number of clients.

Setup on netdump server and client

Server Configuration:

  1. Verify that the netdump server is installed: rpm -q netdump-server. If it is not installed, install it by running the command: up2date netdump-server.

  2. After the netdump server package is installed change the password for the "netdump" user to something that you know: passwd netdump

  3. Enable the netdump server: chkconfig netdump-server on

  4. Start the netdump server: service netdump-server start

Client Configuration:

  1. Verify that the netdump client is installed: rpm -q netdump. If it is not installed, install it by running the command: up2date netdump.

  2. Edit /etc/sysconfig/netdump and add the following line:

    NETDUMPADDR=192.168.0.5 

    **192.168.0.5 should be changed to the ip address of the netdump server.

  3. Enter the following command and give the netdump password when prompted: service netdump propagate

  4. Enable the netdump client: chkconfig netdump on

  5. Start the netdump client: service netdump start

At this point all sysrq command entered should be sent accross the network to the netdump server where they should be stored in the /var/crash directory. Dump files generated by netdump should be named vmcore by default.

Test Method

To test if the netdump configuration is correct, perform the following on the netdump client (Warning: it will crash the machine!):

sysctl -w kernel.sysrq=1
echo c > /proc/sysrq-trigger

This will crash the system and you will see a kernel dump on the netdump server in the directory /var/crash//. You will see the file "vmcore-incomplete" while the client is dumping data to the server. The file is renamed to "vmcore" once it is completed.

The size of "vmcore" will vary and may reach several gigs. On a system with 512Mb of RAM, the above test created a vmcore of approximately 510Mb.

Troubleshooting

Netdump client service startup failures are usually due to NIC or module incompatibility problems. You will notice "insmod" errors when this happens.

Netdump does not work for all NICs so make sure that yours is compatible. Below is a list of supported NICs at the time of writing:

  1. Broadcom bcm57xx using the tg3 driver. Does not work with bcm5700 driver.

  2. 3Com 3c59x

  3. Intel eepro100, e100 and e1000

  4. tlan

  5. tulip

And netdump can not work with virtio-net driver either, so if you need to setup netdump on a KVM guest, you should choose a network model which can support netdump, rather than virtio-net driver.

0 comments:

Post a Comment

 
;