On Wed, 3 Mar 2010, Rory Browne wrote:
> Personally for a freeze, first thing I'd check is the general process
> statisitcs ( CPU, Memory, etc ), using top.
I'd start with gdb actually. It will tell you exactly where the thing
is spinning around.
$ gdb app [optional core or pid to investigate]
(gdb) run
<do whatever you need to do to wedge your process>
<press ctrl+c - gdb will catch this>
(gdb) bt
<see what your programme is up to>
(gdb) cont
<press ctrl+c again>
(gdb) bt
...
(gdb) cont
etc..
Course, anyone who uses the "bt" command is a big pansy. Real hackers
use print/x and mentally unwind the stack in their heads, only
ocassionally cross-checking addresses with disassemble...
(That may sound like I'm joking, but the mdb debugger popular with
Solaris kernel devs doesn't have a symbolic stack unwinding command
:) )
regards,
--
Paul Jakma paul at jakma.org Key ID: 64A2FF6A
Fortune:
Bachelor:
A man who chases women and never Mrs. one.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!