Help using udevinfo or udevadm

rtmistler - January 13, 2011

On a different distribution udevadm has a different version, newer by about .20 subrevision numbers.

On that distribution I can execute a udevadm info request using arguments like --query=property --name=/dev/ttyS0.

I cannot get a similar result at all using the udevadm on my MVL6.0 distribution.  The version shows as 124 whereas I have a version 157 on that other distribution.  Rebuilding udevadm appears to require a lot of utilities to be installed.

Any suggestions, I merely need the udev information for a USB serial device because I need to monitor that during runtime.  These devices can be unplugged or reinserted and my application needs to follow this.  At present I'm considering that I'll have to iteratively check and ls -1 /dev/ttyUSB* result and then look backwards in my system log (dmesg), and that isn't the way I should be doing that.

- RT

Share this

Comments

Hi RT, I checked with the MV

Hi RT,

I checked with the MV userland guru, and he suggested that over time the udev tools change the command-line options:

The first thing to do is check the man pages.

udevadm info --query="property" --name=/dev/ttyS0

Should work. udevadm "ate" another tool called udevinfo thus the info.

 udevadm info --help
Usage: udevadm info OPTIONS
  --query=<type>             query database for the specified value:
      name                     name of device node
      symlink                  pointing to node
      path                     sysfs device path
      env                      the device related imported environment
      all                      all values
  --path=<devpath>           sysfs device path used for query or chain
  --name=<name>              node or symlink name used for query
  --root                     prepend to query result or print udev_root
  --attribute-walk           print all key matches while walking along chain
                             of parent devices
  --device-id-of-file=<file> print major/minor of underlying device
  --export-db                export the content of the udev database
  --help                     print this text

 udevadm info --query=all --name=/dev/ttyS0
P: /devices/pnp0/00:09/tty/ttyS0
N: ttyS0

 

HTH!

stacykor