Indeed mark IS planning on providing context switches by process. The process output has gotten so wide I've decided to make this optional by requesting 'extended' process stats like this, noting that extended stats apply to both top, interactive and playback. This is an example of top, sorted by voluntary context switches:
collectl --top vctx --procopt x
Code:
# TOP PROCESSES sorted by vctx (counters are /sec) 23:04:17
# PID User PR PPID THRD S VSZ RSS CP SysT UsrT Pct AccuTime RKB WKB VCtx NCtx MajF MinF Command
21171 1333 20 21170 0 S 42M 2M 12 0.01 0.00 1 00:03.83 0 0 309 21 0 0 ssh
21172 1333 20 21170 0 S 4M 584K 12 0.00 0.02 2 00:05.08 0 0 309 0 0 0 gzip
21198 1333 20 21195 0 S 4M 588K 8 0.00 0.02 2 00:04.19 0 0 263 1 0 0 gzip
21047 1333 20 21045 0 S 42M 2M 7 0.01 0.01 2 00:03.26 0 0 262 8 0 0 ssh
21197 1333 20 21195 0 S 42M 2M 20 0.01 0.00 1 00:03.33 0 0 262 2 0 0 ssh
21048 1333 20 21045 0 S 4M 584K 1 0.00 0.02 2 00:04.46 0 0 261 1 0 0 gzip
21071 1333 20 21070 0 S 42M 2M 0 0.01 0.00 1 00:03.30 0 0 261 0 0 0 ssh
I'm planning on pushing a new release next week, just waiting for some feedback from a few folks to make sure I didn't break anything they need.
-mark