I use machine with USB 2 and USB 3 ports, and I have USB 3 external disk which works perfectly in term of speed (I use it as backup drive so during the night new files are nicely transfered to this external drive).
Now I try to do simple script to check if USB drive connected to the right (USB 3) port, and not slow USB 2. Easy to say, but...
The disk is WD's Elements series, and camcontrol devlist tells me:
...
<WD Elements 1042 1007> at scbus11 target 0 lun 0 (pass9,da1)
...
Ok, it shows the device (da1), but it won't tells me the speed.
At the same time usbconfig shows me:
...
ugen1.2: <Elements 1042 Western Digital> at usbus1, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=ON
...
Here I see speed ("spd=SUPER (5.0Gbps)"), but I see no way to understand if this "Elements 1042 Western Digital" is the same "WD Elements 1042 1007" from above command.
So could please tell me if there is any way to clearly get given da's speed?
Elements 1042should be a match forElements 1042unless you have multiple identical drives. – killermist Jun 21 '12 at 15:39camcontrol inquiry da1 -Swill return the serial number of the disk. In a script you could loop through the da* devices and match the serial to the da* name. Withusbconfigyou can then findout what usb port that da* device is using. Then the script can compare this with the desired situation and make a decision if that connection is 'correct'. – Multimho Jul 26 '12 at 21:16