Prevent strace from abbreviating arguments?

LinuxStrace

Linux Problem Overview


I'm trying to use strace to find out what commands a program executes using execve. Some of the arguments in these commands are quite long, and strace is abbreviating the arguments to execve (I see "..." after about 30 characters), preventing me from getting any useful information. How can I get the full text of each argument?

I've read the man page. The -v option prints the environment, which is useful, but the arguments are still truncated.

strace -f -e trace=execve -v -p 1234

I also tried passing verbose=all, but this just gives some extra information about SIGCHLD.

strace -f -e verbose=all trace=execve -v -p 1234

Linux Solutions


Solution 1 - Linux

You want the -v -s strsize option, which specifies the maximum length of a string to display (the default is 32).

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJay ConrodView Question on Stackoverflow
Solution 1 - LinuxMatthew SlatteryView Answer on Stackoverflow