Inspect crash settings in /proc/sys/kernel
In this step, we will explore some kernel parameters related to crashing and kdump
within the /proc/sys/kernel
directory. The /proc
filesystem is a virtual filesystem that provides information about processes and other system information. The /proc/sys
directory contains files that allow you to view and modify kernel parameters at runtime.
Specifically, we will look at files related to crash behavior. We can use the cat
command again to view the contents of these files.
Open your terminal if it's not already open.
First, let's look at the panic
file. This file controls the behavior of the kernel when a panic occurs (a severe, unrecoverable error). The value in this file represents the number of seconds the kernel will wait before rebooting after a panic.
Type the following command and press Enter:
cat /proc/sys/kernel/panic
You will see a single number as output, for example:
0
A value of 0
means the kernel will not automatically reboot after a panic. A positive value indicates the number of seconds to wait before rebooting.
Next, let's look at the panic_on_oops
file. An "oops" is a less severe error than a panic, but it can still indicate a problem. This file determines whether an "oops" should trigger a full kernel panic.
Type the following command and press Enter:
cat /proc/sys/kernel/panic_on_oops
You will see either 0
or 1
as output:
1
A value of 0
means an "oops" will not cause a panic. A value of 1
means an "oops" will trigger a panic.
These kernel parameters are important for understanding how your system will react to errors and how kdump
might be involved in capturing crash information.
Click Continue to complete this lab.