goo blog サービス終了のお知らせ 

pepoとネットワークを語ろう

40年前からこれまでとこれからのネットワークを語る

LinuxのUSB Driverのdebugやでー!7

2011-05-07 19:54:20 | Linux

今までがVmware上のPepoLinuxでLinuxのUSB DriverをDebugする方法を紹介していたが、調子に乗ってFedora14上でやってみることに

まずは、syslog.confを書き換えと言うことで
[root@p-4 ~]# vi /etc/syslog.conf
なんてやろうとしても、syslog.confがありません
という事で、grepで検索

[root@p-4 ~]# grep -r syslog /etc/*

/etc/rc4.d/S12rsyslog:# Provides: $syslog
/etc/rc4.d/S12rsyslog:# Description: Rsyslog is an enhanced multi-threaded syslog

どうも、Fedora14ではいつの間にかsyslogがrsyslogに変わっとるみたい
[root@p-4 ~]# vi /etc/rsyslog.conf
#rsyslog v3 config file

# if you experience problems, check
# http://www.rsyslog.com/troubleshoot for assistance

#### MODULES ####

$ModLoad imuxsock.so    # provides support for local system logging (e.g. via logger command)
$ModLoad imklog.so      # provides kernel logging support (previously done by rklogd)
#$ModLoad immark.so     # provides --MARK-- message capability


#### RULES ####

# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.*                                                 /dev/console
kern.*                                                 /var/log/debug
ルールを追加してrsyslogをrestartする
[root@p-4 ~]# /etc/init.d/rsyslog restart
システムロガーを停止中:                                    [  OK  ]
システムロガーを起動中:                                    [  OK  ]
[root@p-4 ~]#

[root@p-4 ~]# tail -f /var/log/debug
May  7 20:08:11 p-4 kernel: imklog 4.6.3, log source = /proc/kmsg started.
May  7 20:09:51 p-4 kernel: [ 1568.172034] usb 4-1: new full speed USB device using uhci_hcd and address 2
May  7 20:09:51 p-4 kernel: [ 1568.333954] usb 4-1: New USB device found, idVendor=0409, idProduct=0270
May  7 20:09:51 p-4 kernel: [ 1568.333961] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
May  7 20:09:51 p-4 kernel: [ 1568.333966] usb 4-1: Product: FOMA N09A
May  7 20:09:51 p-4 kernel: [ 1568.333970] usb 4-1: Manufacturer: NEC
May  7 20:09:51 p-4 kernel: [ 1568.333973] usb 4-1: SerialNumber: 3**********7
May  7 20:10:58 p-4 kernel: [ 1635.757032] usb 4-1: reset full speed USB device using uhci_hcd and address 2
May  7 20:10:59 p-4 kernel: [ 1636.136030] usb 4-1: reset full speed USB device using uhci_hcd and address 2
May  7 20:10:59 p-4 kernel: [ 1636.914412] usb 4-1: usbfs: process 2184 (vmware-vmx) did not claim interface 0 before use
May  7 20:10:59 p-4 kernel: [ 1637.044423] usb 4-1: usbfs: process 2184 (vmware-vmx) did not claim interface 2 before use
May  7 20:10:59 p-4 kernel: [ 1637.066167] usb 4-1: usbfs: process 2184 (vmware-vmx) did not claim interface 4 before use
VMwareのDriverがDebugコードを吐き出してくれないので大したところ分からんけどまーこんなとこか

pepo