33

Strangely i can't find it any where but when i stdout the output of strace into afile like this:

strace foo.exe | & tee foo.log

the out put is to short, how can i make the width longer?

user61104
  • 549

3 Answers3

50

The -s option under Linux, from the strace package, will let you specify the width:

-s strsize  Specify  the  maximum  string  size  to  print  (the
            default is 32).  Note that filenames are not consid-
            ered strings and are always printed in full.

e.g.

strace -s 128 ...
0

As other answers point to good directions in general, the specific issue is probably the space you have between "|" and "&". If you're trying to use a bash "|&" to pipe both stdout and stderr you can't have a space between those characters.

0

Use '-o filename' option:

  strace -f -o foo.log foo

man strace

-o filename Write the trace output to the file filename

ooshro
  • 11,502