I've written a udev
rule which is run each time my device is mounted/dismounted.
However, in which Linux (Debian) error log should I check when debugging such rules?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityYou can change logging priority to "info" level or even "debug" by:
udevadm control --log-priority=info
Then you should see all logs in your system log. If you don't, then rsyslogd
may not be configured to read kernel logs and you may still view the kernel logs using dmesg
.
When you are done, bring it to default "err". See in /etc/udev/udev.conf
what is your default logging level.
udevadm control --log-priority=info
is different from setting udev_log="err"
in /etc/udev/udev.conf
? Thanks
Aug 29, 2015 at 10:16
udevadm
method is to change the logging priority of the running udevd
; udev.conf
is for permanently changing it.
info
was not sufficient for me to see logs in journalctl
; I needed to bump it to debug
.
unbuffer udevadm monitor --environment
The use of unbuffer
is optional, but when piping output to grep
saves you a headache. By default output is buffered in 4k blocks, nothing will be printed until that buffer is full.
You didn't forget to reload the rules?
sudo udevadm control --reload