[systemd-devel] Bind key combination to isolate emergency mode

Mantas Mikulėnas grawity at gmail.com
Sat Jun 20 08:01:47 PDT 2015


On Sat, Jun 20, 2015 at 5:26 PM, Thomas Meyer <thomas at m3y3r.de> wrote:

> Hi,
>
> Is it possible to bind a key combination in systemd to perform a switch
> into emergency mode or another target?
>
> And would this key binding also work in situations where the system is
> under heavy cpu load and heavy swapping?
>

Sort of. There's a single key combination (Alt+ArrowUp by default) which
maps to kbrequest.target, though it only works on the console and not
within Xorg & the likes. You can pull in emergency.target via that.

Also don't forget the magic SysRq keys – Alt+SysRq+F will run the OOM
killer in case of heavy swapping, Alt+SysRq+E/I will sigterm/sigkill all
programs (systemd will restart gettys afterwards), and Alt+SysRq+N will
renice high-priority processes. You need to enable this via sysctl.conf
though.

-- 
Mantas Mikulėnas <grawity at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150620/e240e4f9/attachment.html>


More information about the systemd-devel mailing list