Este contenido no está disponible en el idioma seleccionado.

1.5. Configuring netconsole


If disk logging fails or using the serial console is not possible, you might need to use kernel debugging. The netconsole kernel module enables to log kernel messages to another computer over the network.
To be able to use netconsole, you need to have an rsyslog server that is properly configured on your network.

Procedure 1.1. Configuring an rsyslog server for netconsole

  1. Configure the rsyslogd daemon to listen on the 514/udp port and receive messages from the network by uncommenting the following lines in the MODULES section of the /etc/rsyslog.conf file:
    $ModLoad imudp
    $UDPServerRun 514
  2. Restart the rsyslogd service for the changes to take effect:
    ]# systemctl restart rsyslog
  3. Verify that rsyslogd is listening on the 514/udp port:
    ]# netstat -l | grep syslog
    udp        0      0 0.0.0.0:syslog          0.0.0.0:*
    udp6       0      0 [::]:syslog             [::]:*
    The 0.0.0.0:syslog and [::]:syslog values in the netstat -l output mean that rsyslogd is listening on default netconsole port 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
    syslog-tls      6514/udp                # Syslog over TLS
    syslog-tls      6514/dccp               # Syslog over TLS
Netconsole is configured using the /etc/sysconfig/netconsole file, which is a part of the initscripts package. This package is installed by default and it also provides the netconsole service.
If you want to configure a sending machine, follow this procedure:

Procedure 1.2. Configuring a Sending Machine

  1. 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
  2. Restart the netconsole service for the changes to take effect:
    ]# systemctl restart netconsole.service
  3. Enable netconsole.service to run after rebooting the system:
    ]# systemctl enable netconsole.service
  4. View the netconsole messages from the client in the /var/log/messages file (default) or in the file specified in rsyslog.conf.
    ]# cat /var/log/messages

Note

By default, rsyslogd and netconsole.service use port 514. To use a different port, change the following line in /etc/rsyslog.conf to the required 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

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

© 2024 Red Hat, Inc.