LinuxCommandLibrary

udevmon

Monitor udev device events

TLDR

Start udevmon with specified configuration file

$ udevmon -c [path/to/config.yaml]
copy

SYNOPSIS

udevmon [--kernel] [--udev] [--property] [--subsystem-match=SUBSYSTEM] [--tag-match=TAG]

PARAMETERS

--kernel (-k)
    Print raw kernel uevents as received by udev

--udev (-u)
    Print processed udev events after rule handling

--property (-p)
    Include event properties (e.g., ID_VENDOR, SERIAL) in output

--subsystem-match=SUBSYSTEM (-s)
    Filter events matching specific subsystem (e.g., usb, net)

--tag-match=TAG (-t)
    Filter events with specific tag set by udev rules

--environment
    Print exported environment variables (newer versions)

--help (-h)
    Display usage information

--version (-V)
    Show version

DESCRIPTION

The udevmon command, also known as udevmonitor, is a debugging tool for observing device events managed by udev, the Linux device manager. It listens to netlink sockets for kernel uevents (raw device addition/removal/change notifications from the kernel) and udev events (after processing by udev rules and symlinks creation).

Useful for troubleshooting hardware detection, hotplug issues, USB device handling, and understanding device node creation in /dev. When run, it prints timestamped events in real-time, showing action (add/change/remove), subsystem, device path, and optional properties like vendor ID or serial.

By default, it displays both kernel and udev events. Filters allow focusing on specific subsystems (e.g., usb, block) or tags. Output format includes SEQ_NUM, ACTION, DEVPATH, SUBSYSTEM, etc. Requires root privileges to bind to netlink multicast groups. Interrupt with Ctrl+C.

Deprecated in modern systemd-udev versions; use udevadm monitor instead, which offers identical functionality.

CAVEATS

Requires root privileges; deprecated in favor of udevadm monitor; high event volume on busy systems may flood output; does not persist across reboots.

EXAMPLE USAGE

udevmon -k # Kernel events only
udevmon -u -p # Udev events with properties
udevmon -s usb # USB subsystem only

SAMPLE OUTPUT

KERNEL[1234.567890] add /devices/pci0000:00/0000:00:14.0/usb1 (usb)
UDEV [1234.567912] add /devices/pci0000:00/0000:00:14.0/usb1 (usb) ID_VENDOR=1d6b ID_MODEL=0002

HISTORY

Originally developed as udevmonitor around 2005-2008 by udev authors (Kay Sievers, Greg Kroah-Hartman). Integrated into udev package for major distros. Superseded post-2012 by unified udevadm subcommand with systemd-udev migration.

SEE ALSO

udevadm(8), systemd-udevd(8), udev(7)

Copied to clipboard