さて、USB Driverのdebugでもう一つ興味があるのがusbmonだ、
使えるようにするには、Kernelのmake menuconfigでCONFIG_USB_MONとCONFIG_DEBUG_FSをYESにするよ
[root@linux-2.6.35.6-pepo]# make menuconfig
CONFIG_USB_MON: x
x x
x If you select this option, a component which captures the USB traffic x
x between peripheral-specific drivers and HC drivers will be built. x
x For more information, see <file:Documentation/usb/usbmon.txt>. x
x x
x If unsure, say Y, if allowed, otherwise M. x
x x
x Symbol: USB_MON [=m] x
x Prompt: USB Monitor x
x Defined at drivers/usb/mon/Kconfig:5 x
x Depends on: USB_SUPPORT [=y] && USB [=y] x
x Location: x
x -> Device Drivers x
x -> USB support (USB_SUPPORT [=y]) x
x -> Support for Host-side USB (USB [=y])
CONFIG_DEBUG_FS: x
x x
x debugfs is a virtual file system that kernel developers use to put x
x debugging files into. Enable this option to be able to read and x
x write to these files. xx
x x
x For detailed documentation on the debugfs API, see x
x Documentation/DocBook/filesystems. x
x x
x If unsure, say N. x
x x
x Symbol: DEBUG_FS [=y] x
x Prompt: Debug Filesystem x
x Defined at lib/Kconfig.debug:77 x
x Depends on: SYSFS [=y] x
x Location: x
x -> Kernel hacking
詳しくは下記のKernel Documentationを確認してもらったら良いのだが
root@linux-2.6.35.6-pepo]# less Documentation/usb/usbmon.txt
まずは、どんなんかを紹介
[root@linux-2.6.35.6-pepo]# mount -t debugfs none_debugs /sys/kernel/debug
dfコマンドでは確認出来ないので、mountコマンドでマウント状態確認を
[root@linux-2.6.35.6-pepo]# mount
/proc on /proc type proc (rw,relatime)
/sys on /sys type sysfs (rw,relatime)
udev on /dev type devtmpfs (rw,relatime,size=119700k,nr_inodes=29925,mode=755)
/dev/pts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
/dev/shm on /dev/shm type tmpfs (rw,relatime)
/proc/bus/usb on /proc/bus/usb type usbfs (rw,relatime)
none on /dev type tmpfs (rw,relatime,mode=755)
tmpfs on / type tmpfs (rw,relatime,size=167936k)
/dev/scd0 on /pepo-cdrom type iso9660 (ro,relatime)
/dev/loop0 on /BINMP type squashfs (ro,relatime)
unionfs on /BINRW type unionfs (rw,relatime,dirs=/UNION=rw:/BINMP=ro)
/dev/loop1 on /USRMP type squashfs (ro,relatime)
unionfs on /usr type unionfs (rw,relatime,dirs=/UNION=rw:/USRMP=ro)
/proc on /proc type proc (rw,relatime)
/sys on /sys type sysfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
/dev/sda1 on /mnt/hdd type ext2 (rw)
none_debugs on /sys/kernel/debug type debugfs (rw)
一番最後の行に何やら怪しげなdebugfsがmountされてま
何が分るかは後に続くよ
pepoと