On 12/25/23, Greg Wooledge <g...@wooledge.org> wrote: > If you want to see what a process is doing, there's strace. It can > even be told to follow all the children of a process (strace -f).
But how do you strace a program saving the output (of the stracing) in a logfile while you also save that program's output without making it part of the stracing? Say you go: $ strace -f wget --help You can clearly see the output of "wget --help" tailgated as part of the stracing (which, of course, you can parse out), but I want two separate log files. One for the stracing and the other for the actual output of that program you ran. I found some posts suggesting that to be possible, but I couldn't get it right: https://serverfault.com/questions/205498/how-to-get-pid-of-just-started-process https://askubuntu.com/questions/137233/how-to-command-ping-display-time-and-date-of-ping/867500#867500 lbrtchx