[systemd-devel] Collect logs over serial
Jóhann B. Guðmundsson
johannbg at gmail.com
Fri Feb 1 07:18:37 UTC 2019
On 1/31/19 4:34 PM, Paul Menzel wrote:
> numbered differently
You can try to do this via tty symlinked udev rule, something along the
lines of
# /etc/udev/rules.d/99-consistent-serial.rules
# Generic sample ( replace $FOO with something relevant to your
environment )
SUBSYSTEM=="tty", KERNEL=="tty$FOO", SYMLINK+="ttySLAB0",
TAG+="systemd", ENV{SYSTEMD_WANTS}+="tty-logger.service"
# Vendir spesific, ( replace idVendor,idProduct,serial for with
something relevant to your environment
SUBSYSTEM=="tty", ATTRS{idVendor}=="VI123", ATTRS{idProduct}=="IDP123",
ATTRS{serial}=="12345", SYMLINK+="ttySLAB0" TAG+="systemd",
ENV{SYSTEMD_WANTS}+="tty-logger.service"
Remove any [Install] section from the tty-logger type service unit.
You might not even need the type service unit ( omitt TAG+="systemd",
ENV{SYSTEMD_WANTS}+="tty-logger.service" ) if you create a journal
snippet along these lines...
/etc/systemd/journald.conf.d/ttyslab0.conf
[Journal]
ForwardToConsole=yes
TTYPath=/dev/ttySLAB0
MaxLevelConsole=<your choice>
Regards
JBG
||
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20190201/0d47d6c2/attachment.html>
More information about the systemd-devel
mailing list