[Q] How to trace Kernel threads ??

bokeron2020

Member
Mar 7, 2011
48
5
0
Hi.
I'm a total newbie with a problem.

My Defy has a bug, I believe. When the phone should be on suspend mode, a process called "suspend" starts using a lor of CPU time, so the battery lasts for just a few hours.

This is, I suppose, not the forum for asking for help about this, so I'll just say I've tried everything I could think of... and now I would like to use "strace" to... trace what's going on.

There are two problems.

One, the bug dissapears when the phone is suspended but connected to USB... so issuing commands is a problem without connection :) ... I suppose I could try WiFi, but I haven't tried yet.

Two. What I call the "suspend" process seems to be a kernel thread... so, I can't use strace.


Could someone, please, explain me wich command (if any) can help me trace the activity of this kernel thread ? Or... well, any other way you can think of.
 
Last edited:

Beach_Head

Senior Member
Aug 25, 2010
593
75
0
You have strace compiled for Android?

Try issuing the command via ConnectBot or any other free terminal so you don't need to be connected via USB...
 

bokeron2020

Member
Mar 7, 2011
48
5
0
That's part of the problem... I'm "hunting" a bug that only appears when the phone is suspended... If I use ConnectBot to write commands... the phone is, by definition, active. So...

Also... we have another problem: strace fails because "suspend" is not a process but a kernel thread... or that's what I've been told :)
 
Last edited:

bokeron2020

Member
Mar 7, 2011
48
5
0
OK... I've finally been able to set up adb over wireless.

But strace doesn't work, and "top" shows that suspend almost always uses around 5%.

But... I still can't trace what suspend is doing.
 

fritolays

Senior Member
Dec 29, 2010
391
384
93
Great White North
Use the dalvik debugger, open command window and type ddms (assuming you have android sdk).
Once open under the Device menu you can see running process's/track them.

Heh didnt see that it doesnt happen when connected to usb. Dont know if ddms works over wifi too, should, but give it a shot.
 
Last edited:

adlx.xda

Inactive Recognized Developer
Feb 4, 2010
1,541
1,752
0
Madrid
You have strace compiled for Android?

Try issuing the command via ConnectBot or any other free terminal so you don't need to be connected via USB...
All adlxmod roms, starting from my first Cliq rom have strace ;)

Sent from my Defy running adlxmod using Tapatalk