2

I know there is a one-line-per-thread view (-H), but the particular threads are not grouped by master process. In fact, I would be completely satisfied with the sole thread count per process (= how many sub-threads does some process create?).

1 Answer 1

1

The top man page describes the field you're looking for:

  1. nTH -- Number of Threads
    The number of threads associated with a process.

(number above would probably change depending on OS and top version).

Interactively, you can use the f (Fields Management) key, then move down to nTH, activate it with space, select it for column display order change with , move it up with , and validate with esc. If you're satisfied with the result, you can finally save it in ~/.toprc with shiftw, so you won't have to do this again.

I'm not sure if there's an other method (eg command line) to toggle this field.

1
  • Yes, I didn't know the trick with the fields management yet. But now it works. Thank you!
    – Neppomuk
    Commented Oct 20, 2019 at 12:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .