| 1 | netconsole service |
| 2 | ================== |
| 3 | |
| 4 | netconsole is a Linux kernel module that sends all kernel log messages over |
| 5 | the network to another computer. It was designed to be as instantaneous as |
| 6 | possible, to enable the logging of even the most critical kernel bugs. It |
| 7 | works from IRQ contexts as well, and does not enable interrupts while sending |
| 8 | packets. Due to these unique needs, only IP networks, UDP packets and Ethernet |
| 9 | devices are supported. More information can be found in |
| 10 | [networking/netconsole.txt](https://www.kernel.org/doc/Documentation/networking/netconsole.txt) |
| 11 | of the Linux kernel documentation. |
| 12 | |
| 13 | This project provides a netconsole service that dynamically configures |
| 14 | netconsole by configuring one or more hosts by their names or IP addresses. |
| 15 | |
| 16 | `netconsole-setup` eases the configuration of the netconsole by just taking |
| 17 | the target hostname or IP address. It determines all the needed configuration |
| 18 | values from the running network device (like network interface, target IP and |
| 19 | MAC address). Multiple target hosts can be specified. Each host can be prefixed |
| 20 | with a target port and a plus sign to enable extended console support. |
| 21 | |
| 22 | Examples |
| 23 | ======== |
| 24 | |
| 25 | ``` |
| 26 | netconsole-setup loghost |
| 27 | ``` |
| 28 | |
| 29 | sends all kernel log messages to host `loghost`. |
| 30 | |
| 31 | ``` |
| 32 | netconsole-setup +4444@loghost |
| 33 | ``` |
| 34 | |
| 35 | sends all kernel log messages to host `loghost` on port `4444` using the |
| 36 | extended console support. |
| 37 | |
| 38 | ``` |
| 39 | netconsole-setup loghost1 4444@loghost2 |
| 40 | ``` |
| 41 | |
| 42 | sends all kernel log messages to host `loghost1` on the default port and to |
| 43 | host `loghost2` on port `4444`. |
| 44 | |
| 45 | Alternatives |
| 46 | ============ |
| 47 | |
| 48 | The `initscripts` package on CentOS 7 provides a `/etc/init.d/netconsole` |
| 49 | initscript that can configure netconsole by just configuring `SYSLOGADDR`. |
| 50 | The functionality is similar, but this project provides also a systemd service |
| 51 | and allows to specify multiple log hosts. |
| 52 | |
| 53 | Dependencies |
| 54 | ============ |
| 55 | |
| 56 | Following commands need to be available for `netconsole-setup`: |
| 57 | |
| 58 | * `arping` either from Thomas Habet or from the |
| 59 | [iputils](https://github.com/iputils/iputils) project (provided by the |
| 60 | `iputils-arping` package on Debian-based systems) |
| 61 | * `ip` from the [iproute2](https://wiki.linuxfoundation.org/networking/iproute2) |
| 62 | project |
| 63 | * `modprobe` (provided by the `kmod` package on Debian-based systems) |
| 64 | * `mount` |
| 65 | |
| 66 | `pandoc` is required for generating the man page for netconsole-setup. |
| 67 | |
| 68 | Contributing |
| 69 | ============ |
| 70 | |
| 71 | Contributions are welcome. Please follow |
| 72 | [How to Write a Git Commit Message](https://chris.beams.io/posts/git-commit/) |
| 73 | for writing good commit messages. |
| 74 | |
| 75 | Creating releases |
| 76 | ================= |
| 77 | |
| 78 | To create a release, increase the version in `Makefile`, document the |
| 79 | noteworthy changes in `NEWS`, and commit and tag the release: |
| 80 | |
| 81 | ``` |
| 82 | git commit -s -m "Release netconsole $(make version)" Makefile NEWS |
| 83 | git tag "$(make version)" |
| 84 | ``` |
| 85 | |
| 86 | The xz-compressed release tarball can be generated by running: |
| 87 | ``` |
| 88 | make dist |
| 89 | ``` |