If you have experienced a kernel panic, you can set up a remote kernel console to capture all the data that might be lost on the local console (especially if the crash is from a non-maskable interrupt, which tends to reboot the system).
On the system that you expect might crash:
/sbin/modprobe netconsole netconsole=6666@10.1.1.16/eth0,6666@10.1.1.17/00:19:BB:31:B8:0E
- 6666 is an arbitrary port number
- 10.1.1.16 is the IP address of the local interface to send via
- eth0 is the name of the local interface to send via
- 10.1.1.17 is the IP address of the remote interface to send to
- 00:19:BB:31:B8:0E is the MAC address of the remote interface to send to
On the remote system, run (this requires that you have netcat installed):
nc -l -p 6666 -u | tee capture.file
This will capture all kernel output on the remote system. This runs at a much lower level (the same point in the kernel that writes to /dev/klog), so you may see the very last bit of information that the kernel outputs when it panics even if syslog et. al have stopped operating.
I never ever encountered this issue. However, you should probably increase your hash table width in order to reduce its depth. Using "dmesg", you'll see how many entries you currently have:
$ dmesg | grep '^IP route'
IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
You can change this value with the kernel boot command line parameter rhash_entries
. First try it by hand then add it to your lilo.conf
or grub.conf
.
For example: kernel vmlinux rhash_entries=131072
It is possible that you have a very limited hash table because you have assigned little memory to your HAProxy VM (the route hash size is adjusted depending on total RAM).
Concerning tcp_mem
, be careful. Your initial settings make me think you were running with 1 GB of RAM, 1/3 of which could be allocated to TCP sockets. Now you've allocated 367872 * 4096 bytes = 1.5 GB of RAM to TCP sockets. You should be very careful not to run out of memory. A rule of thumb is to allocate 1/3 of the memory to HAProxy and another 1/3 to the TCP stack and the last 1/3 to the rest of the system.
I suspect that your "out of socket memory" message comes from default settings in tcp_rmem
and tcp_wmem
. By default you have 64 kB allocated on output for each socket and 87 kB on input. This means a total of 300 kB for a proxied connection, just for socket buffers. Add to that 16 or 32 kB for HAProxy, and you see that with 1 GB of RAM you'll only support 3000 connections.
By changing the default settings of tcp_rmem
and tcp_wmem
(middle param), you can get a lot lower on memory. I get good results with values as low as 4096 for the write buffer, and 7300 or 16060 in tcp_rmem
(5 or 11 TCP segments). You can change those settings without restarting, however they will only apply to new connections.
If you prefer not to touch your sysctls too much, the latest HAProxy, 1.4-dev8, allows you to tweak those parameters from the global configuration, and per side (client or server).
I am hoping this helps!
Best Answer
Use the command :
The 'yes' command repeatedly output a line with all specified string, or 'y' by default.
So, you can use it to simply "press enter", which will result in using the defaults value for the 'make oldconfig' command.