Step 9 of 10 · lab · 20 min
A kernel setting disappears
The service that receives the warehouse sensor readings started working once a colleague raised a kernel parameter for it. After a reboot overnight it fails to start again, although the colleague insists the setting was saved. Make the value survive a reboot and keep the rest of the server settings as they were.
Situation
The lab-sensors service — the sensor-hub application — receives the warehouse sensor readings over UDP.
Last week it stopped starting. A colleague raised a kernel parameter for it with a command, and the service
worked. The server was rebooted overnight, and lab-sensors fails to start again. The colleague insists the
setting was saved to a file.
There is no need to reboot the machine: at boot the kernel parameters come from the same files, in the same
order, as with sudo sysctl --system.
Task
- The
lab-sensorsservice is running, enabled at boot and answerscurl http://127.0.0.1:8126/health. The application code stays the same. - The value survives a reboot:
sudo sysctl --systemsets the parameter the service needs, and takes it from a file in/etc. - The other parameters from the settings files stay as they were — both in the files and in the running kernel.
There is no internet on the machine; everything you need is already installed. Run administrative commands with
sudo.
Lab · on your own
No commands are given in this lab: type them in the terminal yourself. Goals are checked on the machine after every command.
Goals
0 of 3-
The lab-sensors service is running, enabled at boot and answering; the application code is unchanged — not done yet
-
sudo sysctl --system sets net.core.rmem_max to at least 8388608 (8 MiB) — from a file in /etc — not done yet
-
The other parameters from the settings files are unchanged — in the files and in the kernel — not done yet
The machine is starting
Hints
0 of 3Lab goals
0 of 3-
The lab-sensors service is running, enabled at boot and answering; the application code is unchanged — not done yet
-
sudo sysctl --system sets net.core.rmem_max to at least 8388608 (8 MiB) — from a file in /etc — not done yet
-
The other parameters from the settings files are unchanged — in the files and in the kernel — not done yet
Goals are checked on the machine after every command.