Finding out what a process is doing

Ian Petersen ispeters-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Fri Mar 30 11:57:07 UTC 2007


On 3/29/07, Lennart Sorensen <lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org> wrote:
> Does ptrace work on an alreadying running process?  I know strace has to
> be run with a process.  lsof certainly can be useful, although cpu use is
> often not based on file accesses.

You can run strace like this:

strace -p <pid>

and it will attach to the given (already running) pid.  You might have
to be root to do that.

Ian

-- 
Tired of pop-ups, security holes, and spyware?
Try Firefox: http://www.getfirefox.com
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list