1

Is it possible to monitor processes of multiple (but not all) users in Linux top?

Something of this kind: top -u user1 -u user2

Thank you for your help!

  • this (unix.stackexchange.com/questions/188702/…) may help you if you know the processes, but -u switch according to manual is exclusive - you can try to join by running a top in batch mode and out put to files and combine them or so, but no direct way I think. – Drako Jul 10 '18 at 14:22
  • Unfortunately, I do not know the processes in advance. The manual only says that 'p', 'u', and 'U' are mutually exclusive. That means that one can not do: 'top -u user1 -U user2". The manual does not say that there can not be 2 'u' options, for example. In fact, one can monitor multiple PIDs, e.g. "top -p 777 -p 888", even though 'p' is on the 'mutually exclusive" list. I am guessing that multiple -u options are simply not implemented (yet) in top. – S.V Jul 10 '18 at 14:36
0

My suggestion is to run the top command using the u options, either in different tabs, or different terminals (that way you could get what you are asking for in an organized way). The top command doesnt offer that option, so the only other way would be to filter the top output with the two "usernames" you want to show.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.