이 콘텐츠는 선택한 언어로 제공되지 않습니다.

11.9. Configuring netconsole


The netconsole kernel module enables logging of kernel messages over the network to another computer. It allows kernel debugging when disk logging fails or when using the serial console is not possible.

Configuring a Listening Machine

To enable receiving netconsole logging messages, install the rsyslog package:
]# yum install rsyslog
To configure rsyslogd to listen on the 514/UDP port and receive messages from the network, uncomment the following lines in the MODULES section of /etc/rsyslog.conf:
$ModLoad imudp
$UDPServerRun 514
Restart the rsyslogd service for the changes to take effect:
]# service rsyslog restart
To verify that rsyslogd is listening on the 514/udp port, use the following command:
]# netstat -l | grep syslog
udp        0      0 *:syslog                    *:*                                     
udp        0      0 *:syslog                    *:*
The 0 *:syslog value in the netstat -l output mean that rsyslogd is listening on default netconsole port, which is defined in the /etc/services file:
]$ cat /etc/services | grep syslog
syslog          514/udp
syslog-conn     601/tcp                 # Reliable Syslog Service
syslog-conn     601/udp                 # Reliable Syslog Service
syslog-tls      6514/tcp                # Syslog over TLS

Configuring a Sending Machine

In Red Hat Enterprise Linux 6, netconsole is configured using the file /etc/sysconfig/netconsole, which is part of the initscripts package. This package is installed by default and it also provides the netconsole service.
To configure a sending machine, set the value of the SYSLOGADDR variable in the /etc/sysconfig/netconsole file to match the IP address of the syslogd server, for example:
SYSLOGADDR=192.168.0.1
Restart the netconsole service so the changes take effect. Then, use the chkconfig command to ensure netconsole service starts automatically after next reboot:
]# service netconsole restart
Initializing netconsole                                    [  OK  ]	
]# chkconfig netconsole on
By default, the rsyslogd server writes the netconsole messages from the client in /var/log/messages or in the file specified in rsyslog.conf.

Note

To set rsyslogd and netconsole to use a different port, change the following line in /etc/rsyslog.conf to the desired port number:
$UDPServerRun <PORT>
On the sending machine, uncomment and edit the following line in the /etc/sysconfig/netconsole file:
SYSLOGPORT=514
For more information about netconsole configuration and troubleshooting tips, see Netconsole Kernel Documentation.
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.