Topic: Debugging

Hi,

I've got a problem with a program which makes the Chumby reboot when I run it (logged in via ssh). To solve this I'm trying to get some information about what is happening.

Using "dmesg" shows does not work when the Chumby reboots.

On a larger Linux distro I would try something like "tail -f /var/log/dmesg", but I couldn't find the log file on the Chumby. Is it possible to enable this logging?

I also tried reading the output from syslogd with "logread -f", but it doesn't seem to have the information I am looking for. Can I add the output from dmesg to this log?

Any other ideas regarding debugging is appreciated.

Eivind

Re: Debugging

cat /proc/kmsg

shows what the kernel is doing, but there is no messages before the Chumby reboots.

However, /proc/resetReason says "WATCHDOG_RESET", whatever that means...

Eivind

Re: Debugging

The issue with a device like this is - where would such a log go?

The firmware is read only, and RAM is limited, and used by the applications.  There is no hard disk.

We typically debug these types of things with strace, and/or use the console on the internal serial port (you need to open your device for that).

Re: Debugging

Yes, I understand, not any point in creating logs which most users never will read. I'm happy as long as I can get the output when I need it.

Thank your for your suggestions, I'll have a closer look. My Chumby is already open, and I'll probably use the serial port for other things too.

Re: Debugging

vikebo wrote:

cat /proc/kmsg
However, /proc/resetReason says "WATCHDOG_RESET", whatever that means...

WATCHDOG_RESET means that the hardware watchdog reset the device.  This can happen when the system kernel panics or gets into some other unresponsive state.

All possible values:

SOFTWARE_RESET - software rebooted the device (e.g. 'reboot' command)
WATCHDOG_RESET - hardware watchdog restarted the device
EXTERNAL_RESET - reset line was pulled while the processor was on
POWER_ON       - power switch was pressed or AC power was applied