strace trap tool needed?
Christoph Höger
choeger at cs.tu-berlin.de
Fri Jul 25 11:20:35 UTC 2008
Am Freitag, den 25.07.2008, 09:56 +1000 schrieb Dave Airlie:
> On Fri, 2008-07-25 at 01:48 +0200, Christoph Höger wrote:
> > Hi,
> >
> > a little tool came up to my mind today: How about the possibility to
> > strace a given binary upon execution and write the output to some file?
> > That could be easy to do (I've already roughly written the code down),
> > so I am not going to make a package of it.
> >
> > To demonstrate my idea:
> > if you invoke the script like:
> >
> > trap-strace /usr/bin/less -o /tmp/less.strace
> >
> > after invoking less you cat /tmp/less.strace to see what was going on.
> >
> > Does anyone else need such a tool?
> > If so, what package could collect it, and what constraints (language,
> > i/o, etc.) should it comply with?
> >
>
> any reason
>
> strace -o /tmp/less.strace /usr/bin/less
>
> won't work?
>
> Or did I miss something?
>
> Dave.
>
well, strace starts the process itself, that is not always usefull.
Consider complex scripts or applications that fork-exec alot around.
Sometimes you (or, at least I ;) ) just do not want the complete strace
with fork() or clone() but just the output of one particular binary in
the chain. My tool would set up a trap which invokes strace when the
binary is executed (basically you could do that by replacing the binary
with a script wrapper).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://lists.fedoraproject.org/pipermail/devel/attachments/20080725/9f20aa40/attachment.bin
More information about the devel
mailing list