On Thu, 29 Aug 2013, Martin MOKREJŠ wrote:

> > This really is asking too much of the kernel.  That's why we have 
> > userspace utilities like lsusb.
> > 
> > For example, it wouldn't be hard to write a shell script that would
> > take a device name like "4-2" and print out the information you want.
> 
> The problem is that I want the information to be logged automatically in 
> syslog.
> Think of laptop-mode-tools or acpid or ACPI events from BIOS fiddling with my
> devices and causing those resets. Sometimes PCI "restores" their config space
> and it is way too late to run manually some utility hours later. Please log
> automatically whatever is doable. I just wanted to raise this up. I don't 
> think
> usb core driver will call a shell script, so ... Just try to do something
> in this direction.

This really isn't necessary.  All the information you want is already 
in the system log.  It's merely a matter of locating it.

I can show you how.  If you post a complete dmesg log, starting from 
boot and running up to one of these errors, I'll point out the messages 
containing the relevant information.

> I understand, the parent could be a PCI device or another USB device so it 
> gets
> more complicated quickly but the relevant information must be gathered 
> immediately.

It is a mistake to put too much functionality in the kernel.  Today you 
want device IDs to be printed.  Tomorrow somebody will want something 
else.  Before you know it, the kernel will end up printing out the 
complete state of the system whenever anything happens!  :-)

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to