Vidi Vidi - 1 year ago 99
Linux Question

The number of processes a user is running using bash

I would like to know how I could get the number of processes for each user that is currently logged in.
Thank you.

Answer Source

Give this a try:

ps -u "$(echo $(w -h | cut -d ' ' -f1 | sort -u))" o user= | sort | uniq -c | sort -rn
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download