Re: strace only one child process



On Fri, 20 Oct 2006 07:19:49 -0700 John Reiser <jreiser@xxxxxxxxxxxx> wrote:
|> In the sytem I'm working, one server process creates one child process
|> for each client request. I like to strace one of these child process.
|> strace without specific options only traces the parent, and with the
|> "-f" option traces all childs, overloading the system.
|>
|> Knows someone any trick to trace only one (or a few ones) childs?
|
| Attach to the desired child after it has been created.
| See the documentation for "strace -p <pid>".

He might be wanting to see what the child does with the incoming connection
right when it forks. The child may only live long enough to do something
and then exit. I have a daemon that, upon TCP connection, spits out a file
to whatever connects, then exits. If it's a short file, the child is gone
in quite a hurry.

--
|---------------------------------------/----------------------------------|
| Phil Howard KA9WGN (ka9wgn.ham.org) / Do not send to the address below |
| first name lower case at ipal.net / spamtrap-2006-10-20-1248@xxxxxxxx |
|------------------------------------/-------------------------------------|
.



Relevant Pages

  • Re: Should parents WIFSIGNALED(siginfo->si_status) be true EVEN IF the SIGNAL was caught by the
    ... Since the exit() will cause a SIGCHLD to the parent, ... returns true if the child process was terminated by a signal. ... to terminate. ...
    (Linux-Kernel)
  • Re: forking in c
    ... the very last child it prints out says it has a parent id ... each child process should have a child process of their own. ... The next statement the child executes is ...
    (comp.unix.programmer)
  • Re: problem with WaitForSingleObject on WM5
    ... signaled after child exit and it wait for long until new child create. ... BTW is there other way for parent process to know about child exit? ... I want to wait for child process shutdown, ...
    (microsoft.public.windowsce.embedded)
  • Making existing process efficient
    ... output streams and keeps writing records to the ... internal buffer. ... pipe with the child. ... buffer and fork a child process C1. ...
    (comp.unix.programmer)
  • Re: monitoring the progress of a child process
    ... The child periodically writes a line to a file containing the percentage that it has accomplished. ... What I've tried doing is opening a pipe to tail this file and using fileevent to read from the pipe each time it ... dmsg $Percent; SetProgress $::PBAR $Percent;} else {dmsg "Empty read from plogfd." ... I should add that the child process loads the CPU very heavily ...
    (comp.lang.tcl)