fp-wiki>ImportUser (Imported from MoinMoin) |
|||
(10 intermediate revisions by 3 users not shown) | |||
Line 3: | Line 3: | ||
Assume we have two computers on the same network. | Assume we have two computers on the same network. | ||
The machine with a problem: | The machine with a problem (the debugee): | ||
<pre>IP address: 192.168.1.1 | <pre>IP address: 192.168.1.1 | ||
</pre> | </pre> | ||
And a second machine | And a second machine (the debugger): | ||
<pre>IP address: 192.168.1.2 | <pre>IP address: 192.168.1.2 | ||
MAC address of eth0: 00:11:22:33:44:55</pre> | MAC address of eth0: 00:11:22:33:44:55</pre> | ||
Line 21: | Line 21: | ||
For more information on netconsole, see http://www.mjmwired.net/kernel/Documentation/networking/netconsole.txt | For more information on netconsole, see http://www.mjmwired.net/kernel/Documentation/networking/netconsole.txt | ||
== logging levels == | |||
You may want to raise the level of printk's that go to the console. | |||
To do this when logged in: | |||
dmesg -n 8 | |||
== netconsole at boot - client side == | |||
Raise the level of console by default logging by adding this line to /etc/sysctl.conf: | |||
# echo 'kernel.printk = 8 4 1 7' >> /etc/sysctl.conf | |||
Add your network info to modprobes of netconsole: | |||
# echo 'options netconsole netconsole=4444@192.168.1.1/eth0,6666@192.168.1.2/00:11:22:33:44:55' >> /etc/modprobe.d/netconsole.conf | |||
Load netconsole at boot time | |||
# echo modprobe netconsole >> /etc/rc.modules | |||
# chmod +x /etc/rc.modules | |||
== Firewall config == | |||
Your netconsole server needs to accept udp on port 6666. This may require a change to your iptables rules. | |||
Comment: does default Fedora rules allow local network connections? |
Latest revision as of 01:06, 4 April 2010
Setting up netconsole
Assume we have two computers on the same network.
The machine with a problem (the debugee):
IP address: 192.168.1.1
And a second machine (the debugger):
IP address: 192.168.1.2 MAC address of eth0: 00:11:22:33:44:55
The debugger
On a different machine than the one you are seeing the problem, you need to run nc -l -u 6666
This will listen on udp port 6666 for any messages.
The debugee
On the machine that you're trying to debug a problem, run (as root) modprobe netconsole netconsole=4444@192.168.1.1/eth0,6666@192.168.1.2/00:11:22:33:44:55
If you replace the IP/MAC addresses with those relevant to your machines/network in the command above, you should see messages appearing on the debugging machine.
For more information on netconsole, see http://www.mjmwired.net/kernel/Documentation/networking/netconsole.txt
logging levels
You may want to raise the level of printk's that go to the console.
To do this when logged in:
dmesg -n 8
netconsole at boot - client side
Raise the level of console by default logging by adding this line to /etc/sysctl.conf:
# echo 'kernel.printk = 8 4 1 7' >> /etc/sysctl.conf
Add your network info to modprobes of netconsole:
# echo 'options netconsole netconsole=4444@192.168.1.1/eth0,6666@192.168.1.2/00:11:22:33:44:55' >> /etc/modprobe.d/netconsole.conf
Load netconsole at boot time
# echo modprobe netconsole >> /etc/rc.modules # chmod +x /etc/rc.modules
Firewall config
Your netconsole server needs to accept udp on port 6666. This may require a change to your iptables rules.
Comment: does default Fedora rules allow local network connections?