Those working in a data centre may, on occasion, have been asked to debug an unresponsive server: pressing a firm finger on a hardware interrupt button (NMI) and triggering the system to dump the state of the frozen kernel to a file for further analysis.
But how do you do that when your server is in the cloud?
Trigger a Kernel Panic by API
By API, is the short answer, and on Amazon Web Services, you now can.
AWS this week introduced a new EC2:SendDiagnosticInterrupt API that lets cloud and system engineers, or specialists in kernel diagnosis and debugging, trigger a kernel panic in EC2 instances, letting them analyse the resulting crash dump data.
The diagnostic interrupt causes an EC2 instance’s hypervisor to send a non-maskable interrupt (NMI) to the operating system, which will typically enter into kernel panic.
“Users”, AWS’s Sébastien Stormacq noted in a blog this week, will “find in the crash dump invaluable information to analyse the causes of a kernel freeze. Tools like WinDbg (on Windows) and crash (on Linux) can be used to inspect the dump…”
By default, Windows Server AMIs have memory dump already turned on, AWS notes, with automatic restart after the memory dump has been saved also selected.