LWN.net Logo

CLI Magic: Linux troubleshooting tools 101 (Linux.com)

CLI Magic: Linux troubleshooting tools 101 (Linux.com)

Posted Feb 20, 2007 6:23 UTC (Tue) by donio (subscriber, #94)
In reply to: CLI Magic: Linux troubleshooting tools 101 (Linux.com) by Ross
Parent article: CLI Magic: Linux troubleshooting tools 101 (Linux.com)

He attached gdb to the running process by specifying the pid as the
second argument to gdb.


(Log in to post comments)

CLI Magic: Linux troubleshooting tools 101 (Linux.com)

Posted Feb 20, 2007 14:46 UTC (Tue) by foo (guest, #1117) [Link]

Exactly. If you give gdb a second argument that's not
a core file, he'll interpret it as a PID and attach
to it. When you exit gdb, he detaches and everything's
copacetic.

If you just want to see where a process is spending time,
doing an "strace -p PID" can attach to a running process,
and later detaches properly with a Ctrl-C.

And to be fair with the comment above, I'm sure you can do
the same thing under Windows, if you have a debugger
installed.

CLI Magic: Linux troubleshooting tools 101 (Linux.com)

Posted Feb 20, 2007 16:24 UTC (Tue) by Ross (subscriber, #4065) [Link]

Ah, I misread "lock up" as "crashed". I often have the latter problem, especially when trying to save a link in Firefox, but haven't seen too many lockups.

-Ross

CLI Magic: Linux troubleshooting tools 101 (Linux.com)

Posted Feb 20, 2007 22:45 UTC (Tue) by Los__D (subscriber, #15263) [Link]

I have a feeling that you are not a Flash user :)

At least under my Ubuntu installation, the Flash player has a habit of locking Firefox quite hard, especially when sound is involved.

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds
Powered by Rackspace Managed Hosting.