netconsole.txt 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. started by Ingo Molnar <mingo@redhat.com>, 2001.09.17
  2. 2.6 port and netpoll api by Matt Mackall <mpm@selenic.com>, Sep 9 2003
  3. Please send bug reports to Matt Mackall <mpm@selenic.com>
  4. This module logs kernel printk messages over UDP allowing debugging of
  5. problem where disk logging fails and serial consoles are impractical.
  6. It can be used either built-in or as a module. As a built-in,
  7. netconsole initializes immediately after NIC cards and will bring up
  8. the specified interface as soon as possible. While this doesn't allow
  9. capture of early kernel panics, it does capture most of the boot
  10. process.
  11. It takes a string configuration parameter "netconsole" in the
  12. following format:
  13. netconsole=[src-port]@[src-ip]/[<dev>],[tgt-port]@<tgt-ip>/[tgt-macaddr]
  14. where
  15. src-port source for UDP packets (defaults to 6665)
  16. src-ip source IP to use (interface address)
  17. dev network interface (eth0)
  18. tgt-port port for logging agent (6666)
  19. tgt-ip IP address for logging agent
  20. tgt-macaddr ethernet MAC address for logging agent (broadcast)
  21. Examples:
  22. linux netconsole=4444@10.0.0.1/eth1,9353@10.0.0.2/12:34:56:78:9a:bc
  23. or
  24. insmod netconsole netconsole=@/,@10.0.0.2/
  25. Built-in netconsole starts immediately after the TCP stack is
  26. initialized and attempts to bring up the supplied dev at the supplied
  27. address.
  28. The remote host can run either 'netcat -u -l -p <port>' or syslogd.
  29. WARNING: the default target ethernet setting uses the broadcast
  30. ethernet address to send packets, which can cause increased load on
  31. other systems on the same ethernet segment.
  32. TIP: some LAN switches may be configured to suppress ethernet broadcasts
  33. so it is advised to explicitly specify the remote agents' MAC addresses
  34. from the config parameters passed to netconsole.
  35. TIP: to find out the MAC address of, say, 10.0.0.2, you may try using:
  36. ping -c 1 10.0.0.2 ; /sbin/arp -n | grep 10.0.0.2
  37. TIP: in case the remote logging agent is on a separate LAN subnet than
  38. the sender, it is suggested to try specifying the MAC address of the
  39. default gateway (you may use /sbin/route -n to find it out) as the
  40. remote MAC address instead.
  41. NOTE: the network device (eth1 in the above case) can run any kind
  42. of other network traffic, netconsole is not intrusive. Netconsole
  43. might cause slight delays in other traffic if the volume of kernel
  44. messages is high, but should have no other impact.
  45. NOTE: if you find that the remote logging agent is not receiving or
  46. printing all messages from the sender, it is likely that you have set
  47. the "console_loglevel" parameter (on the sender) to only send high
  48. priority messages to the console. You can change this at runtime using:
  49. dmesg -n 8
  50. or by specifying "debug" on the kernel command line at boot, to send
  51. all kernel messages to the console. A specific value for this parameter
  52. can also be set using the "loglevel" kernel boot option. See the
  53. dmesg(8) man page and Documentation/kernel-parameters.txt for details.
  54. Netconsole was designed to be as instantaneous as possible, to
  55. enable the logging of even the most critical kernel bugs. It works
  56. from IRQ contexts as well, and does not enable interrupts while
  57. sending packets. Due to these unique needs, configuration cannot
  58. be more automatic, and some fundamental limitations will remain:
  59. only IP networks, UDP packets and ethernet devices are supported.