接收计算机上的 nc -l -u 6666 没有从 netconsole 收到任何消息。
通过执行“echo test > /dev/kmsg”进行测试
我可以通过在netconsole机器上执行“nc -u 10.0.0.192 6666”来连接netcat
“sudo tcpdump -i wlp170s0 -n -e port 6666”在监听机器上没有输出任何内容
网络控制台选项:
modprobe netconsole [email protected]/enp8s0,[email protected]/54:14:f3:52:82:94 oops_only=0
ifconfig 在 netconsole 机器上:
enp8s0 Link encap:Ethernet HWaddr 70:85:C2:D7:65:F3
inet addr:10.0.0.42 Bcast:10.0.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1032 errors:0 dropped:0 overruns:0 frame:0
TX packets:791 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:95338 TX bytes:230456
lo Link encap:Local Loopback
inet addr:127.0.0.1 Bcast:0.0.0.0 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 TX bytes:0
ifconfig 在监听机器上:
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MULTICAST MTU:65536 Metric:1
RX packets:400 errors:0 dropped:0 overruns:0 frame:0
TX packets:400 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:46289 TX bytes:46289
nfs Link encap:(hwtype unknown)
inet addr:10.8.0.3 P-t-P:10.8.0.3 Mask:255.255.255.0
UP POINTOPOINT RUNNING NOARP MTU:1420 Metric:1
RX packets:7418 errors:0 dropped:0 overruns:0 frame:0
TX packets:22098 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1806372 TX bytes:26188072
wlp170s0 Link encap:Ethernet HWaddr 54:14:F3:52:82:94
inet addr:10.0.0.192 Bcast:10.0.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2771549 errors:0 dropped:54 overruns:0 frame:0
TX packets:1029444 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3024953926 TX bytes:153598327
答案1
事实证明,您必须使用 dmesg -n 8 增加详细程度