Getting easy-to-read stdout of a process

Ben Forbes bdforbes at gmail.com
Sun May 25 12:30:36 UTC 2008


I'm playing around with strace, attaching it to a running process to
capture anything written to stdout. The following command gets close
to what I want:

strace -e trace=write -e write=1 -s 1024 -p 12345

The problem is, it traces writes to all file descriptors, whereas I
just want writes to fd1. Also, I'd prefer to just get what was written
to stdout, I don't need to see the actual call to write(). Can this be
done cleverly or do I have to use grep and sed?

Thanks.




More information about the Strace-devel mailing list