↑ ↓ select, Enter open, Esc close

Count processes per user

user@server
ps -eo user= | sort | uniq -c | sort -rn

Prints the number of running processes for each user, with the most active at the top. On Plesk servers, PHP processes run under the system user of each subscription, so an outlier points directly to the affected website. Injected malicious processes often stand out this way first, too.

Note: ps truncates long user names to eight characters and marks them with +. Use ps -eo user:32= to avoid this.

Also searched as

  • which user has the most processes
  • count processes per customer
  • which subscription is causing load
  • number of processes per user

Related one-liners

All in Processes

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.