On Wed, 9 Jun 2004, Dhanesh D Pai wrote:

> hi all,

Hi Dhanesh and others,

I recently asked this question too. Alan Stern told me that I'm probably
not the first person who needs it, but no one has ever submited any code.

I started to write an "URB Monitor" but it only fits my needs (only bulk,
ctrl, intr data is dumped).

I'm very new to kernel development. For me it was the easiest way to use
proc-fs. My URB monitor creates a proc entry (in /proc/urb_monitor) for
each connected device.

The monitor can be activated by echo "1" > /proc/urb_monitor/<device> and
deactivated by echoing "0" to it.

When activated cat /proc/urb_monitor/<device> gets the traffic transferred
since the last cat or since activation.

Unfortunately, high traffic kills the system (at least for me, when using
vmware, which is unstable as well, even not using usb).

I would prefer to write the traffic directly to a file is userspace, but
due the lack of knowledge, I wasn't able to this yet.

If someone wants to have a look, I applied a patch as attachment, but
remember, it is probably very very unstable. Should work for 2.6.6. I
appreciate proposals, how such a monitor can be implemented more
efficient and more stable.

best regards,
Patrick

Attachment: linux-2.6.6-patch-usb_urb_monitor.diff.bz2
Description: BZip2 compressed data

Reply via email to