<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Jun 20, 2015 at 5:26 PM, Thomas Meyer <span dir="ltr"><<a href="mailto:thomas@m3y3r.de" target="_blank">thomas@m3y3r.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Is it possible to bind a key combination in systemd to perform a switch into emergency mode or another target?<br>
<br>
And would this key binding also work in situations where the system is under heavy cpu load and heavy swapping?<br></blockquote><div><br></div><div>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.</div><div><br></div><div>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.</div></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Mantas Mikulėnas <<a href="mailto:grawity@gmail.com" target="_blank">grawity@gmail.com</a>></div></div>
</div></div>