Netconsole
1. |
Configure and Install Netconsole |
modprobe netconsole [email protected]/eth0,[email protected]/00:14:4F:8D:5E:52
tail /var/log/kern.log:
Mar 3 11:40:25 caterpillar3 kernel: netconsole: local port 7777 Mar 3 11:40:25 caterpillar3 kernel: netconsole: local IP 10.6.6.3 Mar 3 11:40:25 caterpillar3 kernel: netconsole: interface eth0 Mar 3 11:40:25 caterpillar3 kernel: netconsole: remote port 7777 Mar 3 11:40:25 caterpillar3 kernel: netconsole: remote IP 10.6.6.250 Mar 3 11:40:25 caterpillar3 kernel: netconsole: remote ethernet address 00:14:4f:8d:5e:52 Mar 3 11:40:25 caterpillar3 kernel: netconsole: network logging started
2. |
Configure the Kernel Ring Buffer |
dmesg -n 8
3. |
RedHat |
/etc/sysconfig/netconsole:
LOCALPORT=7777 DEV=eth0 SYSLOGADDR=10.6.6.250 SYSLOGPORT=514
/etc/init.d/netconsole start
4. |
Remote Monitor Using Netcat |
nc -u -l 7777
Gotcha!
Netcat will monitor packets from only one remote host at a time! So syslog is best.
5. |
Remote Monitor Using Syslog |
/etc/sysconfig/syslog:
SYSLOGD_OPTIONS="-m 0 -r -x"and
/etc/init.d/syslog restart