cpuset: add --count Can be used to count the number hardware threads in the cpu set. For example: $ cpuset -g -p $$ pid 2440 mask: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39 pid 2440 domain policy: first-touch mask: 0, 1 $ cpuset -g --count -p $$ 40
The intent is to replace calls to sysctl hw.ncpu and kern.smp.cpus which can be found in the tree.
I could not come up with a good letter, so added a long opt.