Feature suggestion: displaying the process comm field alongside all pids

Michael Stapelberg michael+strace at stapelberg.ch
Fri May 1 09:17:36 UTC 2020


Hey,

I love the strace flag -y (“Print paths associated with file
descriptor arguments.”), and wish that something similar also existed
for printing the comm field of a process (its file name) whenever a
pid is printed.

For example, the current output I’m seeing is:
473091 execve("/ro/bin/expr", ["expr", "191", "+", "1"], …

Currently, I need to figure out that 473091 is a clone of 473078,
whose most recent execve call started
/usr/src/gcc-amd64-9.3.0-7/configure:
473078 execve("/usr/src/gcc-i686-amd64-9.3.0-7/configure", …
…
473078 clone(child_stack=NULL,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7f0ae02f1a10) = 473090
…
473090 clone(child_stack=NULL,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7f0ae02f1a10) = 473091
…
473091 execve("/ro/bin/expr", ["expr", "191", "+", "1"], …

Instead, the original line of output would be much easier to
contextualize if it was printed like so:
473091<configure> execve("/ro/bin/expr", ["expr", "191", "+", "1"], …

This would make it much more obvious what’s going on in
multiple-process scenarios.

Thanks for considering this,
Best regards,
Michael


More information about the Strace-devel mailing list