You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you are tracing multiple different processes (with -f -ff options) when trying to understand what a system does, it is difficult later to understand what log file belongs to what process. There could be an option for automatic renaming the logs based on argv[0] supplied to execve syscall. I.e. with the proposed options you would get logs named like:
bash-1234.log
cp-1235.log
To make it possible, strace needs to:
read executable name at the time of attaching to some PID,
on the forking and cloning inherit that name,
but rename a file on execve.
The text was updated successfully, but these errors were encountered:
A file could be named after the last execve call. I.e. if processes call execve several times, the file will be renamed on each execve. So it will be named after the last executed command.
it could be named like 1235-1-bash and 1235-2-cp.
In the second case one could easily separate syscalls that were issued by one command from the syscalls of the execed command.
Also, may be it could be useful to allow specifying the file naming scheme with the printf-like syntax. I.e. --log-name=%p-%n-%c.log
When you are tracing multiple different processes (with
-f -ff
options) when trying to understand what a system does, it is difficult later to understand what log file belongs to what process. There could be an option for automatic renaming the logs based onargv[0]
supplied toexecve
syscall. I.e. with the proposed options you would get logs named like:To make it possible, strace needs to:
execve
.The text was updated successfully, but these errors were encountered: