Feature requests: list of PIDS, and all threads

Denys Vlasenko dvlasenk at redhat.com
Fri Mar 9 10:13:59 UTC 2012


On 03/08/2012 01:52 PM, Alexander Kriegisch wrote:
>>> 2) A simple way to trace all threads of a process.  strace doesn't really
>>>      take process IDs but thread IDs, so if a process has multiple threads,
>>>      only the primary process gets traced.  I'd like an easy way to say
>>>      "what the heck is firefox doing?" and get all the threads.
>>>      (Once again, this is working around a limitation of pgrep.)
>>
>> The code to do so is there (-p PID -f would do what you want even today -
>> but it will also follow forks which you didn't ask for).
>> We only need an option to indicate this. -T and -t are taken. -P is taken too.
>> We are running out of alphabet! :)
>
> Why is -P taken? Because of (1)?

No, in current git help text says "-P path -- trace accesses to path"

> than that, if we have -tt and -ff, we could also use -pp, couldn't we? ;-)

Probably not. By the usual rules of option parsing, "-pp" means
"-pPID" where PID is a string "p".

-- 
vda




More information about the Strace-devel mailing list