Wednesday 18 February 2009

Netdump configuration

Netdump configuration HOWTO
To log VPS host machine crashes you can configure 'netdump' services.

Netdump configuration requires two computers:
- One acts as the netdump server - the box where all crash logs will be stored;
- The other one acts as the netdump client - the VPS host machine.


I. Prepare boxes

1). Install the "netdump-server" package on the server and the "netdump" package on the client (VPS host).
You can use any update agent (up2date, yum, swup) or download and install packages manually via RPM.
For example:
Quote:
# rpm -ivh netdump-0.7.14-4.i386.rpm
# rpm -ivh netdump-server-0.7.14-4.i386.rpm
2). Make sure that netdump servers partition where /var/crash directory located (by default the directory where all crashes will be stored) have enough free disk space, at least as your netdump client (VPS host) box RAM size.


II. Configuration

1). On the netdump server, as root, type:
Quote:
# passwd netdump
and supply a password for netdump user just like what you do to an ordinary user. Then do the following:
Quote:
# chkconfig netdump-server on
# service netdump-server start
2). On the netdump client (VPS host), edit /etc/sysconfig/netdump then uncomment and set the NETDUMPADDR variable to the IP address of the netdump server.
For example:
Quote:
NETDUMPADDR=10.199.243.39
Then execute:
Quote:
# service netdump propagate
and supply the netdump password that was configured on the netdump server. Finally, execute:
Quote:
# chkconfig netdump on
# service netdump start

III. Testing (optional)

To test if the netdump configuration is correct, perform the following
on the netdump client:
Quote:
# cp /usr/share/doc/netdump-xxxxxx/crash.c .
# gcc -DKERNEL -DMODULE -I/lib/modules/$(uname -r)/build/include -c crash.c
# insmod ./crash.o
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.

No comments:

Post a Comment