This is the mail archive of the
mailing list for the glibc project.
Re: tracing only direct childrens
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: Shameem Ahamed <shameem dot ahamed at yahoo dot com>
- Cc: libc-help at sourceware dot org
- Date: Thu, 26 Nov 2009 09:36:35 -0500
- Subject: Re: tracing only direct childrens
- References: <email@example.com>
On Thu, Nov 26, 2009 at 9:03 AM, Shameem Ahamed
> Hi Guys,
> I know this is not the correct list to ask this question. But I am sure somebody from here can help me out.
> My problem is, i am trying to trace a currently running Apache root process for creation of childs using strace. ?But strace also lists the details of childs of childs. I want to restrict my trace only to the direct childrens.
> How can we do it? .
This is off-topic for this list. Please contact the strace developers.
AFAIK there is no specific feature to trace only direct children. You
would have to add a new feature to strace to trace children of only a
A quick hack might be to use -ttt -ff -o <filename>
The algorithm would look like this:
* for all forks in the parent <filename>.pid call them <fork pid>
* read the filename <filename>.<fork pid> and merge with <filename>.pid
* sort all lines using the timestamp.
* write out new merged file.
The final file would have only the parent and all immediate children trace data.