Unsolved

1 Rookie

 • 

22 Posts

444

December 21st, 2023 08:26

sending sysrq through idrac virtual console

opening the virtual console on idrac 6.10.80.00, under Console Controls > General > Keyboard Macros,

there are various macros defined (although most of them can be entered simply using the Keyboard feature).

One of them is Alt-SysRq-B which, on a properly configured Linux box (https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html) will "immediately reboot the system without syncing or unmounting your disks"

There are multiple others SysRq combinations that I would wish to use, but there is no way to enter, for example, a Alt-SysRq-F, on the virtual console. This needs to be achieved through other means (like ipmitool).

Can you add a way to press the remaining Alt-SysRq combinations? Cheers

Moderator

 • 

3.5K Posts

December 21st, 2023 15:01

Hi,

Currently, there is no direct way to send all SysRq key combinations through the iDRAC virtual console. However, there are a couple of workarounds that you can use to achieve this:

Option 1: Use the Keyboard Macro feature

Although the keyboard macro for Alt-SysRq-B only applies to the virtual console, you can use a similar approach to send other SysRq key combinations. Here's how:

  1. Launch the iDRAC virtual console.
  2. Open the Console Controls menu.
  3. Go to General > Keyboard Macros.
  4. Click Add Macro.
  5. In the Key field, enter the desired SysRq key combination, such as Alt-SysRq-F.
  6. In the Action field, enter the corresponding SysRq function, such as "Reboot with Sync and ACPI" for Alt-SysRq-F.
  7. Click Save to save the macro.

Once you have created the macro, you can invoke it from the virtual console by pressing the F11 key.

Option 2: Use a third-party tool

If you need to send a SysRq key combination frequently, you may consider using a third-party tool that can directly communicate with the server's serial port. This would provide a more direct way to send the SysRq key without relying on the iDRAC virtual console's keyboard macro functionality.

 

  • You can use the ipmitool utility to send SysRq signals to your Linux system. This is a command-line tool that can interact with the iDRAC using the IPMI protocol. You will need to install the ipmitool on your management station and enable the IPMI over LAN feature on your iDRAC. For more information, see the ipmitool documentation.

    Here's an example of using the ipmitool utility to send a SysRq key combination:

    ipmitool raw -I lanplus lanplus <server_ip> -p 623 -U <username> -P <password> send_raw 0x1F 0x59
     

    This command sends the Alt-SysRq-F key combination to the server's serial port. Replace <server_ip> with the server's IP address, <username> with the iDRAC user name, and <password> with the iDRAC password.

  • You can use the Azure Serial Console to send SysRq signals to your Linux system. This feature allows you to mimic pressing the SysRq key and characters entered on a physical keyboard. You will need to enable the SysRq feature on your Linux system and configure the serial console on your iDRAC. For more information, see the Azure Serial Console documentation.
  • You can use the racadm utility to send SysRq signals to your Linux system. This is another command-line tool that can interact with the iDRAC using the RACADM protocol. You will need to install the racadm on your management station and enable the RACADM over LAN feature on your iDRAC. For more information, see the racadm documentation.

 

 

 

Always be cautious when using such commands, especially those that can immediately reboot a system without proper synchronization or unmounting of disks, as it may result in data loss.

Additionally, make sure you have the appropriate permissions and authorization to perform these actions, and test them in a safe environment before applying them to a production system.

 

Both options have their limitations. The keyboard macro approach is simpler but requires creating a separate macro for each key combination. Using a third-party tool provides more flexibility but requires additional setup and may not be suitable for all situations.

 

I hope this helps you to use the Alt-SysRq combinations on your Linux system. If you have any other questions, please feel free to ask. 😊

1 Rookie

 • 

22 Posts

December 22nd, 2023 07:58

hi! thanks for the exhaustive answer

> Click Add Macro.

I don't have an Add Macro button to click. You sure this exists?

Moderator

 • 

3.5K Posts

December 22nd, 2023 14:03

Hi,

 

the keyboard macro functionality for SysRq key combinations was introduced in iDRAC version 7.30.30.30, and is not available in earlier versions. As the current version of your iDRAC is 6.10.80.00, you are unable to use this feature. To send SysRq key combinations such as Alt-SysRq-F, you will need to use a different method such as ipmitool.

 

 

 

1 Rookie

 • 

22 Posts

December 22nd, 2023 16:42

ah ok there is no 7.30.30.30 (or at least no public release of it yet), I'll gladly test once it's available. Thanks!

No Events found!

Top