´ÙÀ½ ÀÌÀü Â÷·Ê

11. USB /proc µå¶óÀ̹ö

/procÀÇ USB Áö¿øÀ» À§Çؼ­´Â Preliminary /proc/bus/usb support¸¦ ¼±ÅÃÇØ¾ß ÇÑ´Ù. ±×¸®°í À§¿¡¼­ ¼³¸íÇÑ´ë·Î ÀçÄÄÆÄÀÏÇÏ°í À缳ġÇ϶ó.

USBÀÇ /proc Áö¿ø Ç׸ñÀº ÇöÀç 2°¡ÁöÀÇ ÀÎÅÍÆäÀ̽º¸¦ °®°í Àִµ¥, /proc/bus/usb/drivers¿Í /proc/bus/usb/devicesÀÌ´Ù.

/proc/bus/usb/drivers´Â ÇöÀç µî·ÏµÈ µå¶óÀ̹ö ¸®½ºÆ®¸¦ º¸¿©ÁØ´Ù(µå¶óÀ̹ö°¡ ÀåÄ¡¿¡¼­ »ç¿ëµÇÁö ¾Ê°í ÀÖ´õ¶óµµ). ¸ðµâ ¼³Ä¡ Å×½ºÆ®³ª ƯÁ¤(unknown) Ä¿³Î¿¡¼­ USB Áö¿ø ¿©ºÎ¸¦ »ìÆ캼 ¶§ À¯¿ëÇÏ´Ù. ¾Æ·¡ÀÇ ¿¹¸¦ º¸¶ó.

[bradh@rachel bradh]$ more /proc/bus/usb/drivers
 hub
 printer
 keyboard
 mouse

/proc/bus/usb/devices´Â ÇöÀç USB ¹ö½º¿¡ ¿¬°áµÈ ÀåÄ¡¿¡ ´ëÇÑ Á¤º¸¸¦ Ç¥½ÃÇÑ´Ù. °¢ ÀåÄ¡°¡ Á¦´ë·Î ¼³Á¤µÇ¾ú´ÂÁö¸¦ ÆľÇÇϴµ¥ À¯¿ëÇÏ´Ù. ¾Æ·¡ÀÇ ¿¹´Â ·çÆ®Çãºê, Çãºê, Å°º¸µå, ¸¶¿ì½º, ÇÁ¸°ÅÍ ¾î´ðÅÍ »ç¿ëÇÏ´Â °æ¿ìÀÌ´Ù.

 T:  Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= -1 Spd=12  If#=  0 MxCh= 2 Driver=(root hub)
 T:  Lev=01 Prnt=00 Port=00 Cnt=01 Dev#=  1 Spd=12  If#=  0 MxCh= 4 Driver=hub
 D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
 P:  Vendor=0451 ProdID=1446 Rev= 1.00
 C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
 I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00
 E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=255ms
 T:  Lev=02 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  If#=  0 MxCh= 0 Driver=printer
 D:  Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
 P:  Vendor=0729 ProdID=1284 Rev= 1.04
 C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr= 98mA
 I:  If#= 0 Alt= 0 #EPs= 1 Cls=07(print) Sub=01 Prot=01
 E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=  0ms
 I:  If#= 0 Alt= 1 #EPs= 2 Cls=07(print) Sub=01 Prot=02
 E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=  0ms
 E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=  0ms
 I:  If#= 0 Alt= 2 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=ff
 E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=  0ms
 E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=  0ms
 E:  Ad=83(I) Atr=03(Int.) MxPS=   4 Ivl=  1ms
 T:  Lev=02 Prnt=01 Port=01 Cnt=02 Dev#=  3 Spd=1.5 If#=  0 MxCh= 0 Driver=keyboard
 D:  Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
 P:  Vendor=045e ProdID=000b Rev= 0.82
 C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=100mA
 I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=01
 E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl= 10ms
 T:  Lev=02 Prnt=01 Port=02 Cnt=03 Dev#=  4 Spd=1.5 If#=  0 MxCh= 0 Driver=mouse
 D:  Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
 P:  Vendor=046d ProdID=c001 Rev= 1.10
 C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr= 50mA
 I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=02
 E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl= 10ms

/proc/bus/usb/devices °á°ú´Â ¸î °¡Áö ±×·ìÀ¸·Î ³ª´©¾îÁø´Ù.

/proc/bus/usb¿¡ °üÇÑ ´õ ÀÚ¼¼ÇÑ ³»¿ëÀº linux/Documentation/proc_usb_format.txt¸¦ Âü°íÇ϶ó.


´ÙÀ½ ÀÌÀü Â÷·Ê