strace of all the process running in the system

Philippe Ombredanne pombredanne at
Mon Mar 31 06:44:56 UTC 2014

On Fri, Mar 28, 2014 at 3:18 PM, Volcan Renewed <volcan9000 at> wrote:
> My name is Parashara
> I would like to know is there any way that we can find the strace of all the
> process running in the system
> Using the  strace -p option as shown below we can display the strace for a
> given process id
> Example
> sudo strace -p 1542
> Using the  ps command we can display the all the process running in the
> system
> ps -ef
> How to find the strace of all the processes running in the system?
> Can you just guide me in right direction?

Hi Parashara!

I am not sure why you would want to do that, yet you could effectively
as you suggested collect all PIDs and then trace them all, possibly
with -ff to trace their children and log it all to files.
Since you can attach to up to 32 process per strace launch (using -p
multiple times) and a typical running Linux distro has about ~100 to
200 processes running, so that sounds possible to achieve with about
eight "tracers" each running strace with multiple -p.
Make sure do you do no trace strace itself though... and you might
want to exclude also your user process that spawns the strace runs.
Your system might slow down quite a bit if everything is traced ...
but if you think that tracing them all is what you need, your approach
might work.

Philippe Ombredanne

More information about the Strace-devel mailing list