[Mono-list] Determine what's using CPU

David Evans devans at pacificbiosciences.com
Tue Apr 9 16:14:37 UTC 2013


I usually use "top -H" to get the thread id of the thread that is hogging the CPU. Then I use "top" to get the process id, then connect to that process using gdb and use "info threads" to find the thread number for the thread id that was hogging the CPU. Then I switch to that thread and back trace to see what it's doing, sometimes continuing and breaking a few times as a poor man's sample of different stack traces for what it's doing.

There are probably better ways of doing this, but that's the simple approach I've used with gdb.

-----Original Message-----
From: mono-list-bounces at lists.ximian.com [mailto:mono-list-bounces at lists.ximian.com] On Behalf Of Dave Curylo
Sent: Tuesday, April 09, 2013 8:20 AM
To: mono-list at lists.ximian.com
Subject: [Mono-list] Determine what's using CPU

I have a process that sporadically becomes unresponsive and starts using a lot of CPU.  Before I thought this was a GC issue, and switched to sgen, but the issue is still there.  I've use gdb with "thread apply all bk" in the past, which pointed me to the GC issues, but now it appears GC isn't really the problem.  Is there some other way to see what is causing the high CPU in gdb or is my only option to start the process with the mono profiler attached?
_______________________________________________
Mono-list maillist  -  Mono-list at lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list


More information about the Mono-list mailing list