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