• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Troubleshooting random restarts through logs?

D

Deleted User

Guest
Anyone have any suggestions on leveraging the logs (specifically /data/dontpanic/apanic_*) to help troubleshoot random restarts?

I'm not exactly sure how these logs are generated or what is typically put in them. Other than the obvious that they are system events, of course. I'm used to looking at logs, am fairly adept with *nix, and spend a lot of my days troubleshooting network and system problems.

I guess what I'm really looking for is if there are ways to trace back the flags in the file to their source. There are trace numbers, hardware references, exception numbers, etc. Is any of this stuff user-facing enough that I can ferret out at least what part of the system causes, for instance, my somewhat-frequent kernel panics?

I know that frequently these trace elements are squirreled away in the code for the developers to troubleshoot, just trying to determine if there are any user-accessible elements.
 
Anyone have any suggestions on leveraging the logs (specifically /data/dontpanic/apanic_*) to help troubleshoot random restarts?

I'm not exactly sure how these logs are generated or what is typically put in them. Other than the obvious that they are system events, of course. I'm used to looking at logs, am fairly adept with *nix, and spend a lot of my days troubleshooting network and system problems.

I guess what I'm really looking for is if there are ways to trace back the flags in the file to their source. There are trace numbers, hardware references, exception numbers, etc. Is any of this stuff user-facing enough that I can ferret out at least what part of the system causes, for instance, my somewhat-frequent kernel panics?

I know that frequently these trace elements are squirreled away in the code for the developers to troubleshoot, just trying to determine if there are any user-accessible elements.

bv,

Yeah, I've been toying a little with this thought too. I've had a few (maybe two or three) random restarts since GB, but at least one of those I believe was related to being attached via USB.

One thing you might do is install something like aLogcat and have it write / record the logcat messages to the SD card:

menu -> Preferences -> Periodic Save? checkbox (and set the frequency as desired 15 / 30 / 60 minutes)

This would be a little hit-and-miss since there's no guarantee that you'd actually be capturing logcat traffic at the time of the restarts, but its probably better than actually being tethered to a "adb logcat > mylogcat.txt" session all the time.

I'm not as familiar with the panic files as I am with the logcat messages, but this might prove fruitful, especially if you are really getting a lot of restarts.

Cheers!

P.S. I can also look into writing a q&d app that might scan for the panic files if you want, but like I said, I'm not familiar with their origins / updates, so this might take a little more research.
 
Thanks for the feedback.

I'm familiar with logcats, but the chance of capturing the offending function that caused the kernel panic is virtually nil even if you get the logcat to save every few seconds. I suppose we might see errors leading up to the panic if there are any, but still, it's imprecise at best. Great tool for debugging applications, of course, since most app errors aren't causing reboots.

If logcat would act like syslog and constantly write to a permanent file, there might be better information there but as far as I know, that's really not how its designed. Might be an app out there for it, I haven't looked - but I'll definitely poke around the market. The problem with an app running interference there, though, is if the system dies it's likely the app chokes before it writes anything.

I just find it mildly frustrating because I spend a lot of my days troubleshooting and diagnosing problems, or doing "forensics" on problems that have already occurred, so if there were a good resource for learning a little more about the way events are logged I figured I could help nail down problem spots.

Incidentally, this is being driven mostly by my CM7 install. It seems to reboot somewhat frequently - rarely when it's in use, but if it sits on a table at night when I'm working on other stuff, I might see a couple reboots in a night.
 
Back
Top Bottom