Ubuntu Server Guide Changes, errors and bugs
Download 1.27 Mb. Pdf ko'rish
|
ubuntu-server-guide
- Bu sahifa navigatsiya:
- Kernel Crash Dump Mechanism
- Installation The kernel crash dump utility is installed with the following command: sudo apt i n s t a l l l i n u x −crashdump Note
Kernel Crash Dump
Introduction A Kernel Crash Dump refers to a portion of the contents of volatile memory (RAM) that is copied to disk whenever the execution of the kernel is disrupted. The following events can cause a kernel disruption : • Kernel Panic • Non Maskable Interrupts (NMI) 16 • Machine Check Exceptions (MCE) • Hardware failure • Manual intervention For some of those events (panic, NMI) the kernel will react automatically and trigger the crash dump mechanism through kexec. In other situations a manual intervention is required in order to capture the memory. Whenever one of the above events occurs, it is important to find out the root cause in order to prevent it from happening again. The cause can be determined by inspecting the copied memory contents. Kernel Crash Dump Mechanism When a kernel panic occurs, the kernel relies on the kexec mechanism to quickly reboot a new instance of the kernel in a pre-reserved section of memory that had been allocated when the system booted (see below). This permits the existing memory area to remain untouched in order to safely copy its contents to storage. Installation The kernel crash dump utility is installed with the following command: sudo apt i n s t a l l l i n u x −crashdump Note Starting with 16.04, the kernel crash dump mechanism is enabled by default. During the instal- lation, you will be prompted with the following dialogs. |−−−−−−−−−−−−−−−−−−−−−−−−| C o n f i g u r i n g kexec−t o o l s |−−−−−−−−−−−−−−−−−−−−−−−−| | | | | | I f you c h o o s e t h i s o p t i o n , a system r e b o o t w i l l t r i g g e r a r e s t a r t i n t o a | | k e r n e l l o a d e d by k e x e c i n s t e a d o f g o i n g through t h e f u l l system boot | | l o a d e r p r o c e s s . | | | | Should kexec−t o o l s h a n d l e r e b o o t s ( s y s v i n i t o n l y ) ? | | | | | | | |−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−| Select Yes to hook up kexec−tools for all reboots. |−−−−−−−−−−−−−−−−−−−−−−−−| C o n f i g u r i n g kdump−t o o l s |−−−−−−−−−−−−−−−−−−−−−−−−| | | | | | I f you c h o o s e t h i s o p t i o n , t h e kdump−t o o l s mechanism w i l l be e n a b l e d . A | | r e b o o t i s s t i l l r e q u i r e d i n o r d e r t o e n a b l e t h e c r a s h k e r n e l k e r n e l | | parameter . | | | | Should kdump−t o o l s be e n a b l e d be d e f a u l t ? | | | | | | | |−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−| 17 Yes should be selected here as well, to enable kdump−tools. If you ever need to manually enable the functionality, you can use the dpkg−reconfigure kexec−tools and dpkg−reconfigure kdump−tools commands and answer Yes to the questions. You can also edit /etc/default /kexec and set parameters directly: # Load a k e x e c k e r n e l ( t r u e / f a l s e ) LOAD_KEXEC=t r u e As well, edit /etc/default/kdump−tools to enable kdump by including the following line: USE_KDUMP=1 If a reboot has not been done since installation of the linux−crashdump package, a reboot will be required in order to activate the crashkernel= boot parameter. Upon reboot, kdump−tools will be enabled and active. If you enable kdump−tools after a reboot, you will only need to issue the kdump−config load command to activate the kdump mechanism. You can view the current status of kdump via the command kdump−config show. This will display something like this: DUMP_MODE: kdump USE_KDUMP: 1 KDUMP_SYSCTL: k e r n e l . panic_on_oops=1 KDUMP_COREDIR: / var / c r a s h c r a s h k e r n e l addr : / var / l i b /kdump/ vmlinuz kdump i n i t r d : / var / l i b /kdump/ i n i t r d . img c u r r e n t s t a t e : ready t o kdump k e x e c command : / s b i n / k e x e c −p −−command−l i n e = ” . . . ” −−i n i t r d = . . . This tells us that we will find core dumps in /var/crash. Download 1.27 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling