Skip to content

Commit e44032f

Browse files
authored
Update serial-console-nmi-sysrq.md
Reverting changes per CI 7097
1 parent 991fb1d commit e44032f

1 file changed

Lines changed: 57 additions & 56 deletions

File tree

Lines changed: 57 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Azure Serial Console for SysRq and NMI Calls
2+
title: Azure Serial Console for SysRq and NMI calls
33
description: Using Serial Console for SysRq and NMI calls in Azure virtual machines.
44
services: virtual-machines
55
documentationcenter: ''
@@ -11,82 +11,83 @@ ms.service: azure-virtual-machines
1111
ms.collection: linux
1212
ms.tgt_pltfrm: vm-linux
1313
ms.workload: infrastructure-services
14-
ms.date: 8/26/2025
14+
ms.date: 08/14/2018
1515
ms.author: jarrettr
1616
---
1717

18+
1819
# Use the Azure Serial Console for SysRq and NMI calls
1920

2021
**Applies to:** :heavy_check_mark: Linux Virtual Machines(VMs)
2122

2223
## System Request (SysRq)
2324

24-
A SysRq is a sequence of keys that's understood by the Linux operating system kernel and that can trigger a set of predefined actions. These commands are often used if virtual machine (VM) troubleshooting or recovery can't be performed through traditional administration. For example, if the VM isn't responding, you can use the SysRq feature of Azure Serial Console to mimic pressing the SysRq key and characters that are entered on a physical keyboard.
25+
A SysRq is a sequence of keys understood by the Linux operation system kernel, which can trigger a set of pre-defined actions. These commands are often used when virtual machine troubleshooting or recovery can't be performed through traditional administration. For example, if the VM isn't responding. Using the SysRq feature of Azure Serial Console mimics pressing of the SysRq key and characters entered on a physical keyboard.
2526

26-
After the SysRq command is delivered, the kernel configuration controls how the system responds. For information about how to enable and disable SysRq, see [Linux Magic System Request Key Hacks](https://aka.ms/linuxsysrq) (SysRq Admin Guide).
27+
Once the SysRq sequence is delivered, the kernel configuration controls how the system responds. For information on enabling and disabling SysRq, see the *SysRq Admin Guide* [text](https://aka.ms/kernelorgsysreqdoc) | [markdown](https://aka.ms/linuxsysrq).
2728

28-
The Azure Serial Console can be used to send a SysRq to an Azure VM by selecting the keyboard icon on the Command bar.
29+
The Azure Serial Console can be used to send a SysRq to an Azure virtual machine using the keyboard icon in the following command bar.
2930

30-
:::image type="content" source="media/serial-console-nmi-sysrq/command-menu.png" alt-text="Screenshot of the Azure Serial Console showing the keyboard icon highlighted and its menu visible. That menu contains a Send SysRq Command item.":::
31+
:::image type="content" source="media/serial-console-nmi-sysrq/command-menu.png" alt-text="Screenshot of the Azure Serial Console. The keyboard icon is highlighted, and its menu is visible. That menu contains a Send SysRq Command item.":::
3132

32-
Select "Send SysRq Command" to open a dialog box that provides common SysRq options or accepts a sequence of SysRq commands. The **Send SysRq** command enables a series of SysRq sequences to perform a high-level operation, such as a safe restart that uses the `REISUB` command.
33+
Choosing "Send SysRq Command" opens a dialog, which provides common SysRq options or accept a sequence of SysRq commands entered into the dialog. This "Send SysRq Command allows for series of SysRq's to perform a high-level operation such as a safe reboot using: `REISUB`.
3334

34-
:::image type="content" source="media/serial-console-nmi-sysrq/sysreq-ui.png" alt-text="Screenshot of the Send SysRq command sent to a Guest dialog box when the entering key option is selected and REISUB is input." border="false":::
35+
:::image type="content" source="media/serial-console-nmi-sysrq/sysreq-ui.png" alt-text="Screenshot of the Send SysRq Command to Guest dialog box when the entering key option is selected and REISUB is input into the following field." border="false":::
3536

36-
The SysRq command can't be used on VMs that are stopped or whose kernel is in a nonresponsive state (for example, a kernel panic).
37+
The SysRq command can't be used on virtual machines that are stopped or whose kernel is in a non-responsive state. For example, a kernel panic.
3738

3839
### Enable SysRq
3940

40-
SysRq can be configured so that all, none, or only certain commands are available. You can enable all SysRq commands by using the following step, although this change doesn't survive a restart:
41+
As described in the *SysRq Admin Guide*, SysRq can be configured such that all, none, or only certain commands are available. You can enable all SysRq commands using the following step, but it doesn't survive a reboot:
4142

4243
```console
4344
echo "1" >/proc/sys/kernel/sysrq
4445
```
4546

46-
To make the SysReq configuration persistent, follow these steps to enable all SysRq commands:
47+
To make the SysReq configuration persistent, you can do the following to enable all SysRq commands
4748

48-
1. Add the following line to */etc/sysctl.conf*: <br />
49+
1. Adding this line to */etc/sysctl.conf* <br>
4950
`kernel.sysrq = 1`
50-
1. Restart or update sysctl by running the following command: <br />
51+
1. Rebooting or updating sysctl by running <br>
5152
`sysctl -p`
5253

53-
### Command keys
54+
### Command Keys
5455

55-
This command key table is taken from the SysRq Admin Guide.
56+
From the SysRq Admin Guide:
5657

5758
|Command| Function
5859
| ------| ----------- |
59-
|``b`` | Immediately restarts the system without syncing or unmounting your disks.
60-
|``c`` | Performs a system crash by a NULL pointer dereference. A crash dump file is created if configured.
60+
|``b`` | Will immediately reboot the system without syncing or unmounting your disks.
61+
|``c`` | Will perform a system crash by a NULL pointer dereference. A crashdump will be taken if configured.
6162
|``d`` | Shows all locks that are held.
62-
|``e`` | Sends a SIGTERM to all processes, except for init.
63-
|``f`` | Calls the oom killer to kill a memory-intensive process.
64-
|``g`` | Used by kgdb (kernel debugger).
65-
|``h`` | Displays help. (Any key other than the keys that are listed here also displays help, but "h" is easy to remember.)
66-
|``i`` | Send a SIGKILL to all processes, except for init.
67-
|``j`` | Forcibly thaws filesystems that are frozen by the FIFREEZE ioctl.
68-
|``k`` | Secure Access Key (SAK) that kills all programs on the current virtual console.
69-
|``l`` | Shows a stack backtrace for all active CPUs.
70-
|``m`` | Dumps current memory information to your console.
71-
|``n`` | Allows real-time (RT) tasks to be reprioritized by using the "nice" value. NOTE: The "nice" value controls a process's priority for CPU scheduling, where lower values indicate higher priority.
72-
|``o`` | Shuts off your system (if configured and supported).
73-
|``p`` | Dumps the current registers and flags to your console.
74-
|``q`` | Dumps CPU lists of all armed hrtimers (but not regular timer_list timers) and detailed information about all clockevent devices.
75-
|``r`` | Turns off keyboard raw mode and sets it to XLATE.
76-
|``s`` | Tries to sync all mounted filesystems.
77-
|``t`` | Dumps a list of current tasks and their information to your console.
78-
|``u`` | Tries to remount all mounted filesystems as read-only.
79-
|``v`` | Forcefully restores the framebuffer console.
80-
|``v`` | Creates an ETM buffer dump file [ARM-specific].
81-
|``w`` | Dumps tasks that are in uninterruptible (blocked) state.
82-
|``x`` | Used by the xmon interface on ppc/powerpc platforms. Shows global PMU registers on sparc64. Dumps all TLB entries on MIPS.
83-
|``y`` | Shows global CPU Registers [SPARC-64 specific].
84-
|``z`` | Dumps the ftrace buffer.
85-
|``0``-``9`` | Sets the console log level to control which kernel messages are printed to your console. (For example, "0" restricts messages that are sent to your console to emergency messages, such as PANIC and OOPS.)
86-
87-
### Distribution-specific documentation
88-
89-
For distribution-specific documentation about SysRq and the steps to configure Linux to create a crash dump file when it receives a SysRq "Crash" command, see the following articles.
63+
|``e`` | Send a SIGTERM to all processes, except for init.
64+
|``f`` | Will call the oom killer to kill a memory hog process, but don't panic if nothing can be killed.
65+
|``g`` | Used by kgdb (kernel debugger)
66+
|``h`` | Will display help (any other key than those listed here also displays help, but ``h`` is easy to remember :-)
67+
|``i`` | Send a SIGKILL to all processes, except for init.
68+
|``j`` | Forcibly "Just thaw it" - filesystems frozen by the FIFREEZE ioctl.
69+
|``k`` | Secure Access Key (SAK) Kills all programs on the current virtual console. NOTE: See important comments in the following SAK section.
70+
|``l`` | Shows a stack backtrace for all active CPUs.
71+
|``m`` | Will dump current memory info to your console.
72+
|``n`` | Used to make RT tasks nice-able
73+
|``o`` | Will shut off your system (if configured and supported).
74+
|``p`` | Will dump the current registers and flags to your console.
75+
|``q`` | Will dump per CPU lists of all armed hrtimers (but NOT regular timer_list timers) and detailed information about all clockevent devices.
76+
|``r`` | Turns off keyboard raw mode and sets it to XLATE.
77+
|``s`` | Will attempt to sync all mounted filesystems.
78+
|``t`` | Will dump a list of current tasks and their information to your console.
79+
|``u`` | Will attempt to remount all mounted filesystems read-only.
80+
|``v`` | Forcefully restores framebuffer console
81+
|``v`` | Causes ETM buffer dump [ARM-specific]
82+
|``w`` | Dumps tasks that are in uninterruptible (blocked) state.
83+
|``x`` | Used by xmon interface on ppc/powerpc platforms. Show global PMU Registers on sparc64. Dump all TLB entries on MIPS.
84+
|``y`` | Show global CPU Registers [SPARC-64 specific]
85+
|``z`` | Dump the ftrace buffer
86+
|``0``-``9`` | Sets the console log level, controlling which kernel messages are printed to your console. (``0``, for example would make it so that only emergency messages like PANICs or OOPSes would make it to your console.)
87+
88+
### Distribution-specific documentation ###
89+
90+
For distribution-specific documentation on SysRq and steps to configure Linux to create a crash dump when it receives a SysRq "Crash" command, see the following links:
9091

9192
#### Ubuntu ####
9293

@@ -105,24 +106,24 @@ For distribution-specific documentation about SysRq and the steps to configure L
105106

106107
- [Collecting crash logs](https://github.com/coreos/docs/blob/master/os/collecting-crash-logs.md)
107108

108-
## Nonmaskable interrupt (NMI)
109+
## Non-Maskable Interrupt (NMI)
109110

110-
A nonmaskable interrupt (NMI) creates a signal that software on a VM doesn't ignore. Historically, NMIs are used to monitor for hardware issues on systems that require specific response times. Today, programmers, and system administrators often use NMI as a mechanism to debug or troubleshoot systems that aren't responding.
111+
A non-maskable interrupt (NMI) creates a signal that software on a virtual machine doesn't ignore. Historically, NMIs are used to monitor for hardware issues on systems that required specific response times. Today, programmers, and system administrators often use NMI as a mechanism to debug or troubleshoot systems that aren't responding.
111112

112-
You can use the Serial Console to send an NMI to an Azure VM by using the keyboard icon on the Command bar. After the NMI is delivered, the VM configuration controls how the system responds. Linux systems can be configured to stop responding and create a memory dump file that the OS receives as an NMI.
113+
The Serial Console can be used to send an NMI to an Azure virtual machine using the keyboard icon in the following command bar. Once the NMI is delivered, the virtual machine configuration controls how the system responds. Linux operating systems can be configured to crash and create a memory dump the operating system receives an NMI.
113114

114-
:::image type="content" source="media/serial-console-nmi-sysrq/command-menu.png" alt-text="Screenshot of the Serial Console. The keyboard icon is highlighted, and its menu is visible. That menu contains a send nonmaskable interrupt item.":::
115+
:::image type="content" source="media/serial-console-nmi-sysrq/command-menu.png" alt-text="Screenshot of the Serial Console. The keyboard icon is highlighted, and its menu is visible. That menu contains a Send Non-Maskable Interrupt item.":::
115116

116117
### Enable NMI
117118

118-
For Linux systems that support sysctl to configure kernel parameters, you can enable a panic by running the following commands when you receive the NMI:
119+
For Linux systems that support sysctl for configuring kernel parameters, you can enable a panic when receiving this NMI by using the following commands:
119120

120-
1. Add this line to */etc/sysctl.conf*: <br>
121+
1. Adding this line to */etc/sysctl.conf* <br>
121122
`kernel.panic_on_unrecovered_nmi=1`
122-
1. Restart or update sysctl by running: <br>
123+
1. Rebooting or updating sysctl by running <br>
123124
`sysctl -p`
124125

125-
For more information about Linux kernel configurations, including `unknown_nmi_panic`, `panic_on_io_nmi`, and `panic_on_unrecovered_nmi`, see: [Documentation for /proc/sys/kernel/*](https://www.kernel.org/doc/Documentation/sysctl/kernel.txt). For distribution-specific documentation about NMI and the steps to configure Linux to create a crash dump file when it receives an NMI, see the following articles:
126+
For more information on Linux kernel configurations, including `unknown_nmi_panic`, `panic_on_io_nmi`, and `panic_on_unrecovered_nmi`, see: [Documentation for /proc/sys/kernel/*](https://www.kernel.org/doc/Documentation/sysctl/kernel.txt). For distribution-specific documentation on NMI and steps to configure Linux to create a crash dump when it receives an NMI, see the following links:
126127

127128
### Ubuntu
128129

@@ -144,9 +145,9 @@ For more information about Linux kernel configurations, including `unknown_nmi_p
144145

145146
## Next steps
146147

147-
- See the main [Serial Console Linux documentation page](serial-console-linux.md).
148-
- Use Serial Console to [start up into GRUB and enter Single User mode](serial-console-grub-single-user-mode.md)
149-
- Learn about the [Serial Console for Windows VMs](../windows/serial-console-windows.md).
148+
- The main Serial Console Linux documentation page is located [here](serial-console-linux.md).
149+
- Use Serial Console to boot into [GRUB and enter single user mode](serial-console-grub-single-user-mode.md)
150+
- The Serial Console is also available for [Windows](../windows/serial-console-windows.md) VMs
150151
- Learn more about [boot diagnostics](../windows/boot-diagnostics.md)
151152

152153
[!INCLUDE [Azure Help Support](../../../includes/azure-help-support.md)]

0 commit comments

Comments
 (0)