Deutsch   English   Français   Italiano  
<sneccs$p2t$1@shakotay.alphanet.ch>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: eternal-september.org!news.eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.uzoreto.com!news.alphanet.ch!alphanet.ch!.POSTED.localhost!not-for-mail
From: Marc SCHAEFER <schaefer@alphanet.ch>
Newsgroups: fr.comp.os.linux.configuration
Subject: [RESOLU] sysrq sur USB?
Date: Sun, 21 Nov 2021 21:06:36 -0000 (UTC)
Organization: Posted through ALPHANET
Message-ID: <sneccs$p2t$1@shakotay.alphanet.ch>
References: <skcmcg$2dt$1@shakotay.alphanet.ch>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 21 Nov 2021 21:06:36 -0000 (UTC)
Injection-Info: shakotay.alphanet.ch; posting-host="localhost:127.0.0.1";
	logging-data="25693"; mail-complaints-to="usenet@alphanet.ch"
User-Agent: tin/2.4.3-20181224 ("Glen Mhor") (UNIX) (Linux/4.19.0-18-amd64 (x86_64))
Cancel-Lock: sha256:soXFEr6S0zwOCmlYysYKs6e3FoaEl9TLgC14rom15e0=

Dans l'article [1], je demandais s'il était possible de faire du sysrq
sur un port série USB.

Il est possible de faire du sysrq sur un port série USB, mais il
faut activer, si ce n'est pas déjà fait, quelques options du kernel
Linux et le recompiler [2].

      CONFIG_USB=y
      CONFIG_USB_SERIAL=y
      CONFIG_USB_SERIAL_CONSOLE=y
      CONFIG_U_SERIAL_CONSOLE=y

C'est notamment nécessaire sous Debian GNU/Linux en raison de [3].

Ensuite, il faut configurer la ligne de commande du kernel pour
y ajouter par exemple console=ttyUSB0,9600 console=tty0 dans
/etc/default/grub et lancer update-grub.

On teste avec:

      # cat /proc/consoles
      tty0                 -WU (EC p  )    4:1
      ttyUSB0              -W- (E  p  )  188:0

On peut ensuite faire marcher sysrq par USB depuis une autre machine,
par exemple:

   schaefer@acer-1:~$ cu -l ttyUSB0 -s 9600
   Connected.
   ~%break
   [ 1633.701624] sysrq: HELP : loglevel(0-9) reboot(b) crash(c)
   terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i)
   thaw-filesystems(j) sak(k) show-backtrace-all-active-cpus(l)
   show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p)
   show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u)
   force-fb(V) show-blocked-tasks(w) dump-ftrace-buffer(z)

L'écran HDMI affiche toujours les logs et le clavier PS/2 ou USB
peut toujours également être utilisé pour sysrq.

[1] https://usenet-fr.alphanet.ch/search/message-id/%3Cskcmcg%242dt%241%40shakotay.alphanet.ch%3E/0
[2] https://wiki.debian.org/BuildADebianKernelPackage
[3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=868352