1 |
$ /sbin/udevadm info -a -p $(/sbin/udevadm info -q path -n /dev/sdb1) |
2 |
|
3 |
Udevadm info starts with the device specified by the devpath and then |
4 |
walks up the chain of parent devices. It prints for every device |
5 |
found, all possible attributes in the udev rules key format. |
6 |
A rule to match, can be composed by the attributes of the device |
7 |
and the attributes from one single parent device. |
8 |
|
9 |
looking at device |
10 |
'/devices/pci0000:00/0000:00:02.1/usb1/1-2/1-2:1.0/host4/target4:0:0/4:0:0:0/block/sdb/sdb1': |
11 |
KERNEL=="sdb1" |
12 |
SUBSYSTEM=="block" |
13 |
DRIVER=="" |
14 |
ATTR{partition}=="1" |
15 |
ATTR{start}=="63" |
16 |
ATTR{size}=="976768002" |
17 |
ATTR{alignment_offset}=="0" |
18 |
ATTR{stat}==" 30791 1166 1053460 192160 691 898 |
19 |
12712 204930 0 160890 397090" |
20 |
|
21 |
looking at parent device |
22 |
'/devices/pci0000:00/0000:00:02.1/usb1/1-2/1-2:1.0/host4/target4:0:0/4:0:0:0/block/sdb': |
23 |
KERNELS=="sdb" |
24 |
SUBSYSTEMS=="block" |
25 |
DRIVERS=="" |
26 |
ATTRS{range}=="16" |
27 |
ATTRS{ext_range}=="256" |
28 |
ATTRS{removable}=="0" |
29 |
ATTRS{ro}=="0" |
30 |
ATTRS{size}=="976773168" |
31 |
ATTRS{alignment_offset}=="0" |
32 |
ATTRS{capability}=="52" |
33 |
ATTRS{stat}==" 30806 1219 1054004 192220 691 |
34 |
898 12712 204930 0 160940 397150" |
35 |
|
36 |
looking at parent device |
37 |
'/devices/pci0000:00/0000:00:02.1/usb1/1-2/1-2:1.0/host4/target4:0:0/4:0:0:0': |
38 |
KERNELS=="4:0:0:0" |
39 |
SUBSYSTEMS=="scsi" |
40 |
DRIVERS=="sd" |
41 |
ATTRS{device_blocked}=="0" |
42 |
ATTRS{type}=="0" |
43 |
ATTRS{scsi_level}=="3" |
44 |
ATTRS{vendor}=="Maxtor " |
45 |
ATTRS{model}=="Basics Desktop " |
46 |
ATTRS{rev}=="0122" |
47 |
ATTRS{state}=="running" |
48 |
ATTRS{timeout}=="30" |
49 |
ATTRS{iocounterbits}=="32" |
50 |
ATTRS{iorequest_cnt}=="0x7b1a" |
51 |
ATTRS{iodone_cnt}=="0x7b1a" |
52 |
ATTRS{ioerr_cnt}=="0x0" |
53 |
ATTRS{modalias}=="scsi:t-0x00" |
54 |
ATTRS{evt_media_change}=="0" |
55 |
ATTRS{queue_depth}=="1" |
56 |
ATTRS{queue_type}=="none" |
57 |
ATTRS{max_sectors}=="240" |
58 |
|
59 |
looking at parent device |
60 |
'/devices/pci0000:00/0000:00:02.1/usb1/1-2/1-2:1.0/host4/target4:0:0': |
61 |
KERNELS=="target4:0:0" |
62 |
SUBSYSTEMS=="scsi" |
63 |
DRIVERS=="" |
64 |
|
65 |
looking at parent device |
66 |
'/devices/pci0000:00/0000:00:02.1/usb1/1-2/1-2:1.0/host4': |
67 |
KERNELS=="host4" |
68 |
SUBSYSTEMS=="scsi" |
69 |
DRIVERS=="" |
70 |
|
71 |
looking at parent device '/devices/pci0000:00/0000:00:02.1/usb1/1-2/1-2:1.0': |
72 |
KERNELS=="1-2:1.0" |
73 |
SUBSYSTEMS=="usb" |
74 |
DRIVERS=="usb-storage" |
75 |
ATTRS{bInterfaceNumber}=="00" |
76 |
ATTRS{bAlternateSetting}==" 0" |
77 |
ATTRS{bNumEndpoints}=="02" |
78 |
ATTRS{bInterfaceClass}=="08" |
79 |
ATTRS{bInterfaceSubClass}=="06" |
80 |
ATTRS{bInterfaceProtocol}=="50" |
81 |
ATTRS{modalias}=="usb:v0D49p7410d0122dc00dsc00dp00ic08isc06ip50" |
82 |
ATTRS{supports_autosuspend}=="0" |
83 |
|
84 |
looking at parent device '/devices/pci0000:00/0000:00:02.1/usb1/1-2': |
85 |
KERNELS=="1-2" |
86 |
SUBSYSTEMS=="usb" |
87 |
DRIVERS=="usb" |
88 |
ATTRS{configuration}=="" |
89 |
ATTRS{bNumInterfaces}==" 1" |
90 |
ATTRS{bConfigurationValue}=="1" |
91 |
ATTRS{bmAttributes}=="c0" |
92 |
ATTRS{bMaxPower}==" 2mA" |
93 |
ATTRS{urbnum}=="117284" |
94 |
ATTRS{idVendor}=="0d49" |
95 |
ATTRS{idProduct}=="7410" |
96 |
ATTRS{bcdDevice}=="0122" |
97 |
ATTRS{bDeviceClass}=="00" |
98 |
ATTRS{bDeviceSubClass}=="00" |
99 |
ATTRS{bDeviceProtocol}=="00" |
100 |
ATTRS{bNumConfigurations}=="1" |
101 |
ATTRS{bMaxPacketSize0}=="64" |
102 |
ATTRS{speed}=="480" |
103 |
ATTRS{busnum}=="1" |
104 |
ATTRS{devnum}=="2" |
105 |
ATTRS{version}==" 2.00" |
106 |
ATTRS{maxchild}=="0" |
107 |
ATTRS{quirks}=="0x0" |
108 |
ATTRS{authorized}=="1" |
109 |
ATTRS{manufacturer}=="Maxtor " |
110 |
ATTRS{product}=="Basics Desktop " |
111 |
ATTRS{serial}=="2HBEQTN2 " |
112 |
|
113 |
looking at parent device '/devices/pci0000:00/0000:00:02.1/usb1': |
114 |
KERNELS=="usb1" |
115 |
SUBSYSTEMS=="usb" |
116 |
DRIVERS=="usb" |
117 |
ATTRS{configuration}=="" |
118 |
ATTRS{bNumInterfaces}==" 1" |
119 |
ATTRS{bConfigurationValue}=="1" |
120 |
ATTRS{bmAttributes}=="e0" |
121 |
ATTRS{bMaxPower}==" 0mA" |
122 |
ATTRS{urbnum}=="40" |
123 |
ATTRS{idVendor}=="1d6b" |
124 |
ATTRS{idProduct}=="0002" |
125 |
ATTRS{bcdDevice}=="0206" |
126 |
ATTRS{bDeviceClass}=="09" |
127 |
ATTRS{bDeviceSubClass}=="00" |
128 |
ATTRS{bDeviceProtocol}=="00" |
129 |
ATTRS{bNumConfigurations}=="1" |
130 |
ATTRS{bMaxPacketSize0}=="64" |
131 |
ATTRS{speed}=="480" |
132 |
ATTRS{busnum}=="1" |
133 |
ATTRS{devnum}=="1" |
134 |
ATTRS{version}==" 2.00" |
135 |
ATTRS{maxchild}=="10" |
136 |
ATTRS{quirks}=="0x0" |
137 |
ATTRS{authorized}=="1" |
138 |
ATTRS{manufacturer}=="Linux 2.6.31-gentoo-r10 ehci_hcd" |
139 |
ATTRS{product}=="EHCI Host Controller" |
140 |
ATTRS{serial}=="0000:00:02.1" |
141 |
ATTRS{authorized_default}=="1" |
142 |
|
143 |
looking at parent device '/devices/pci0000:00/0000:00:02.1': |
144 |
KERNELS=="0000:00:02.1" |
145 |
SUBSYSTEMS=="pci" |
146 |
DRIVERS=="ehci_hcd" |
147 |
ATTRS{vendor}=="0x10de" |
148 |
ATTRS{device}=="0x005b" |
149 |
ATTRS{subsystem_vendor}=="0x1043" |
150 |
ATTRS{subsystem_device}=="0x815a" |
151 |
ATTRS{class}=="0x0c0320" |
152 |
ATTRS{irq}=="21" |
153 |
ATTRS{local_cpus}=="ffffffff" |
154 |
ATTRS{local_cpulist}=="0-31" |
155 |
ATTRS{modalias}=="pci:v000010DEd0000005Bsv00001043sd0000815Abc0Csc03i20" |
156 |
ATTRS{broken_parity_status}=="0" |
157 |
ATTRS{msi_bus}=="" |
158 |
ATTRS{companion}=="" |
159 |
|
160 |
looking at parent device '/devices/pci0000:00': |
161 |
KERNELS=="pci0000:00" |
162 |
SUBSYSTEMS=="" |
163 |
DRIVERS=="" |
164 |
|
165 |
|
166 |
On 30 March 2010 17:24, Neil Bothwick <neil@××××××××××.uk> wrote: |
167 |
> On Tue, 30 Mar 2010 17:10:53 +0100, mikey wrote: |
168 |
> |
169 |
>> This is the info about my drive: |
170 |
>> |
171 |
>> $ /sbin/udevadm info -a -p $(/sbin/udevadm info -q path -n /dev/sdb) |
172 |
> |
173 |
> |
174 |
> You need the output for /dev/sdb1. |
175 |
> |
176 |
> |
177 |
> -- |
178 |
> Neil Bothwick |
179 |
> |
180 |
> What's the difference between ignorance and apathy? |
181 |
> I don't know and I don't care |
182 |
> |