Chapter 3. Using netconsole to log kernel messages over a network

Using the netconsole kernel module and the same-named service, you can log kernel messages over a network to debug the kernel when logging to disk fails or when using a serial console is not possible.

3.1. Configuring the netconsole service to log kernel messages to a remote host

Using the netconsole kernel module, you can log kernel messages to a remote system log service.

Prerequisites

  • A system log service, such as rsyslog is installed on the remote host.
  • The remote system log service is configured to receive incoming log entries from this host.

Procedure

  1. Install the netconsole-service package:

    # yum install netconsole-service
  2. Edit the /etc/sysconfig/netconsole file and set the SYSLOGADDR parameter to the IP address of the remote host:

    # SYSLOGADDR=192.0.2.1
  3. Enable and start the netconsole service:

    # systemctl enable --now netconsole

Verification steps

  • Display the /var/log/messages file on the remote system log server.

Additional resources