This article describes how to configure netconsole on Redhat Enterprise Linux Platform.
The procedure described here is applicable for Redhat Enterprise Linux 3, 4 and 5.
netconsole allows dmesg output to be transmitted via the network through the use of syslog. It implements kernel-level network logging via UDP port 514.
It is necessary to have a syslog server on the network with syslogd listening on port 514/udp. To configure syslogd to listen to port 514/udp and receive messages from the network, configure the /etc/sysconfig/syslog file with the following options:
SYSLOGD_OPTIONS="-m 0 -r -x"
And restart the syslogd daemon for the changes to take effect.
service syslog restart
To verify that syslogd is listening on 514/udp, enter:
# lsof -nn -p `pidof syslogd` | grep UDP
syslogd 2885 root 13u IPv4 6417 UDP *:syslog
In this case it is listening on UDP *:syslog, where syslog is the port 514/udp as defined in /etc/services.
For Red Hat Enterprise Linux 3 and 4
The configuration file of netconsole is /etc/sysconfig/netdump, which is provided by netdump. You need to change the SYSLOGADDR variable in the file /etc/sysconfig/netdump and this variable contains the IP address of the syslogd server.
SYSLOGADDR=192.168.0.1
Then it is necessary to restart the netdump service to make the changes take effect because netconsole is started on the same script as netdump:
# service netdump restart
Make it run on the next reboot:
# chkconfig netdump on
For Red Hat Enterprise Linux 5
RHEL5 does not have a netdump service. netconsole is configured via the file /etc/sysconfig/netconsole, which is part of the initscripts package. In the file /etc/sysconfig/netconsole, set the variable SYSLOGADDR to the IP address of the syslogd server
SYSLOGADDR=192.168.0.1
Restart the netconsole service so the changes take effect, and run it on next reboot with the following command:
# service netconsole restart ; chkconfig netconsole on
By default, the syslogd server writes the netconsole messages from the client on /var/log/messages or on the file specified in syslog.conf.
0 comments:
Post a Comment