Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Trying to track a sleeping CGI request with gdb

by jbert (Priest)
on Oct 10, 2006 at 17:54 UTC ( [id://577456]=note: print w/replies, xml ) Need Help??


in reply to Trying to track a sleeping CGI request with gdb

If your OS has 'pstack' (which at least Linux and Solaris do) then you can get a stack trace from a running process without using gdb.

You won't see too much of use unless you've got symbols loaded, but it's worth a try.

Otherwise, on Linux you can try 'strace -p <pid>' to get a look at what system calls the process is doing, this can be quite illuminating.

The equivalent on Solaris is 'truss', which can also peek into shared libraries (see the -u option).

  • Comment on Re: Trying to track a sleeping CGI request with gdb

Replies are listed 'Best First'.
Re^2: Trying to track a sleeping CGI request with gdb
by talexb (Chancellor) on Oct 10, 2006 at 18:26 UTC

    strace! That's the sucker.

    Just tried it on another process (not the one I want) but at least it gave me a C style trace of what's going on, and that should be enough to find out where the code's at and what it's waiting for.

    Alex / talexb / Toronto

    "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://577456]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (6)
As of 2024-04-16 07:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found