How do I check CPU Affinity for a linux processes and all of it's threads?
It's pretty simple. Gather the all process id and thread ids, then call taskset.
The reason this is not a simple one-liner is because the pgrep command cannot return thread ids (only process ids). We do a little extra work with the command