Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
PIDs and TIDs in filters and output #547
Lots of the scripts in
Sometime it's handy to filter events by a single task but very often I want to do something for a whole process without filtering by threads within it. E.g., if I wanted to see which stacks in my webserver are doing block IO I'd run
Any objections to changing tools to:
I realise this is changing existing behavior but I'd argue it'd be a net improvement overall.
Makes sense to me. I think -p should match whatever pidstat says is the PID, and -t should match what "pidstat -t" says is the TID.
I likely got this wrong many, many times (copy-n-pasted) in /tools, sorry. Would be happy to see it fixed!
As for printing both PID and TID, definitely print TID if -t is used (as the user has signaled that it is important). As for other tools and default output, I guess it would depend on the tool. I try to keep the default output to a minimum. Some tools probably have -v for verbose. Plus I also try to keep the default output to < 80 chars width.
Eg, execsnoop default output probably shouldn't have TID. Nor should killsnoop. ... Actually, I probably wouldn't add TID to most of the scripts' default output. It could show up with -t, or -v.
This will require updates to the /examples files and man pages...