clean
[linux-2.4.21-pre4.git] / Documentation / nmi_watchdog.txt
1
2 Is your ix86 system locking up unpredictably? No keyboard activity, just
3 a frustrating complete hard lockup? Do you want to help us debugging
4 such lockups? If all yes then this document is definitely for you.
5
6 On Intel and similar ix86 type hardware there is a feature that enables
7 us to generate 'watchdog NMI interrupts'.  (NMI: Non Maskable Interrupt
8 which get executed even if the system is otherwise locked up hard).
9 This can be used to debug hard kernel lockups.  By executing periodic
10 NMI interrupts, the kernel can monitor whether any CPU has locked up,
11 and print out debugging messages if so.  You must enable the NMI
12 watchdog at boot time with the 'nmi_watchdog=n' boot parameter.  Eg.
13 the relevant lilo.conf entry:
14
15         append="nmi_watchdog=1"
16
17 For SMP machines and UP machines with an IO-APIC use nmi_watchdog=1.
18 For UP machines without an IO-APIC use nmi_watchdog=2, this only works
19 for some processor types.  If in doubt, boot with nmi_watchdog=1 and
20 check the NMI count in /proc/interrupts; if the count is zero then
21 reboot with nmi_watchdog=2 and check the NMI count.  If it is still
22 zero then log a problem, you probably have a processor that needs to be
23 added to the nmi code.
24
25 A 'lockup' is the following scenario: if any CPU in the system does not
26 execute the period local timer interrupt for more than 5 seconds, then
27 the NMI handler generates an oops and kills the process. This
28 'controlled crash' (and the resulting kernel messages) can be used to
29 debug the lockup. Thus whenever the lockup happens, wait 5 seconds and
30 the oops will show up automatically. If the kernel produces no messages
31 then the system has crashed so hard (eg. hardware-wise) that either it
32 cannot even accept NMI interrupts, or the crash has made the kernel
33 unable to print messages.
34
35 NOTE: starting with 2.4.2-ac18 the NMI-oopser is disabled by default,
36 you have to enable it with a boot time parameter.  Prior to 2.4.2-ac18
37 the NMI-oopser is enabled unconditionally on x86 SMP boxes.
38
39 [ feel free to send bug reports, suggestions and patches to
40   Ingo Molnar <mingo@redhat.com> or the Linux SMP mailing
41   list at <linux-smp@vger.kernel.org> ]
42