Re: How to go about debugging usb driver.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 20 Sep 2010, Martin Fuzzey wrote:

> >> Does this device have a serial port that can be used as a console?
> >
> > Well, it does on the board, but I do not have the requisite voltage
> > converter, so I'm just relying on the net. At the moment, I ssh into the box
> > and track /var/log/messages, which gets populated, as expected.
> >
> You can get nice little usb/serial devices with 5 and 3.3v outputs.
> The one I have is : http://byvac.co.uk/co_serial.php
> 
> One advantage of a serial port over netconsole is that it normally
> works in the bootloader before the kernel starts.

USB serial ports might not capture everything that happens early on
during the kernel startup, especially not things that happen before the
USB drivers are loaded.

> > I'll try to throw netconsole in. But is it not going to be the same set of
> > messages I get via syslog? And why don't I see much in /var/log/messages.
> > Can I alter some flags in  to make it more verbose.
> >
> Normally they are the same yes but not in the case of a crash/
> panic.
> 
> printk writes synchronously to a circular buffer in memory and
> to the console (serial, netconsole or whatever).

It only writes to the console if the console log-level is set 
sufficiently high.  The usual log level does not permit debug messages 
to show up on the console.  You have to type Alt-SysRq-8 or "echo 8 
>/proc/sys/kernel/printk" to get them.

> Whereas /var/log/messages (or the busybox syslogd) is handled
> by a userspace program reading the log buffer asynchronously.

And normally that user program is configured not to send debug-level
messages to /var/log/messages.

Alan Stern

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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux