-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/29/2012 04:15 PM, Arthur Dent wrote:
> I have never used udevadm before. If I have read the man page
> correctly, all I need to do is to initiate "udevadm monitor" and
> then plug in the card, is that right?

Yes - just run the command as root and it will continue running and
printing events to the terminal until you interrupt it with Ctrl-C.

Here's some sample output showing an add/remove cycle for a USB flash
device (although this machine has an SD reader I don't have a card on
me right now so a USB stick was the closest I could get):

http://fpaste.org/UwHH

> I will have to do that when I get home this evening. I am SSH'd
> into the box at the moment, but it's a bit difficult to put a card
> in a slot from 35 miles away!

Been there :-)

> In the meantime is there anything else I can check from a SSH
> connection - drivers / modules etc?

Make sure the usb-storage module is loaded and check to see if a SCSI
host exists for the storage device. To do this you need to look for an
entry in /sys/class/scsi_host that corresponds to the USB bus address
of the card reader.

E.g. the key from the example above shows up like this:

$ ls -l /sys/class/scsi_host/ | sed 's/.*\ host/host/'
total 0
host0 -> ../../devices/pci0000:00/0000:00:1f.2/host0/scsi_host/host0
host1 -> ../../devices/pci0000:00/0000:00:1f.2/host1/scsi_host/host1
host2 -> ../../devices/pci0000:00/0000:00:1f.2/host2/scsi_host/host2
host3 -> ../../devices/pci0000:00/0000:00:1f.2/host3/scsi_host/host3
host4 -> ../../devices/pci0000:00/0000:00:1f.2/host4/scsi_host/host4
host5 -> ../../devices/pci0000:00/0000:00:1f.2/host5/scsi_host/host5
host9 ->
../../devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/host9/scsi_host/host9

That last one is the one we're interested in.

$ ls -l /sys/class/scsi_host/host9
lrwxrwxrwx. 1 root root 0 May 29 17:07 /sys/class/scsi_host/host9 ->
../../devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/host9/scsi_host/host9

If you've no other USB storage on the system this is easy enough to
spot. If you do then you'll need to look at the PCI addresses and USB
addresses to figure it out. If in doubt look at the info option to
udevadm - it can print out all the attributes it can find for a device
and often there's something in there that will identify the thing.

Regards,
Bryn.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk/E9gQACgkQ6YSQoMYUY97/ggCfdT9O+jZOrUXZBgJ29zsCOOZo
M+IAn3eekT6B/S0KjDikG293+Tz2jGUN
=tL7L
-----END PGP SIGNATURE-----
-- 
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org

Reply via email to