Skip to content

Commit 7efb5d9

Browse files
authored
Refine documentation for Azure Serial Console SysRq and NMI
Edit review per CI 7097
1 parent 06e6979 commit 7efb5d9

1 file changed

Lines changed: 53 additions & 54 deletions

File tree

Lines changed: 53 additions & 54 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: ''
@@ -15,79 +15,78 @@ ms.date: 08/14/2018
1515
ms.author: jarrettr
1616
---
1717

18-
1918
# Use the Azure Serial Console for SysRq and NMI calls
2019

2120
**Applies to:** :heavy_check_mark: Linux Virtual Machines(VMs)
2221

2322
## System Request (SysRq)
2423

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.
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.
2625

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).
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).
2827

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.
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.
3029

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.":::
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.":::
3231

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`.
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.
3433

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":::
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":::
3635

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.
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).
3837

3938
### Enable SysRq
4039

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:
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:
4241

4342
```console
4443
echo "1" >/proc/sys/kernel/sysrq
4544
```
4645

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

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

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

5655
From the SysRq Admin Guide:
5756

5857
|Command| Function
5958
| ------| ----------- |
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.
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.
6261
|``d`` | Shows all locks that are held.
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:
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 those 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. NOTE: See important comments in the following SAK section.
69+
|``l`` | Shows a stack backtrace for all active CPUs.
70+
|``m`` | Dumps current memory information to your console.
71+
|``n`` | Used to make RT tasks nice-able.
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.
9190

9291
#### Ubuntu ####
9392

@@ -106,24 +105,24 @@ For distribution-specific documentation on SysRq and steps to configure Linux to
106105

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

109-
## Non-Maskable Interrupt (NMI)
108+
## Non-maskable interrupt (NMI)
110109

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.
110+
A non-maskable 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.
112111

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.
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.
114113

115114
:::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.":::
116115

117116
### Enable NMI
118117

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:
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:
120119

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

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:
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:
127126

128127
### Ubuntu
129128

@@ -145,9 +144,9 @@ For more information on Linux kernel configurations, including `unknown_nmi_pani
145144

146145
## Next steps
147146

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
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).
151150
- Learn more about [boot diagnostics](../windows/boot-diagnostics.md)
152151

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

0 commit comments

Comments
 (0)