Which user is running the most processes?

Dave K

My top looks like this:

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND          
 6524 asjzdiwq  30  10  500m  41m  24m S  0.0  0.3   0:15.27 php-cgi      
21274 asjzdiwq  30  10  500m  41m  24m S  0.0  0.3   0:04.97 php-cgi      
 9047 asjzdiwq  30  10  500m  40m  24m S  0.0  0.3   0:13.72 php-cgi      
26918 asjzdiwq  30  10  499m  40m  24m S  0.0  0.3   0:12.87 php-cgi      
13168 ahfvw0d1  30  10  498m  35m  20m S  0.0  0.2   0:03.49 php-cgi      
 8859 realnoni  30  10  495m  33m  20m S  0.0  0.2   0:11.27 php-cgi      
 6590 asjzdiwq  30  10  495m  32m  20m S  0.0  0.2   0:13.34 php-cgi      
 5657 holeyrai  30  10  495m  31m  19m S  0.0  0.2   0:04.47 php-cgi      
14480 ripplecr  30  10  498m  31m  17m S  0.0  0.2   0:02.90 php-cgi      
14442 ripplecr  30  10  497m  31m  17m S  0.0  0.2   0:02.00 php-cgi      
10720 computer  30  10  496m  31m  18m S  0.0  0.2   0:08.75 php-cgi      
23821 loghome   30  10  496m  31m  18m S  0.0  0.2   0:02.22 php-cgi      
17623 devilsti  30  10  495m  31m  19m S  0.0  0.2   0:05.81 php-cgi      
13305 realnoni  30  10  495m  30m  18m S  0.0  0.2   0:06.29 php-cgi      
14461 ripplecr  30  10  496m  30m  17m S  0.0  0.2   0:01.47 php-cgi           
 8738 holeyrai  30  10  495m  30m  18m S  0.0  0.2   0:03.37 php-cgi      
17569 devilsti  30  10  495m  30m  18m S  0.0  0.2   0:05.73 php-cgi      
13174 ahfvw0d1  30  10  484m  30m  18m S  0.0  0.2   0:04.00 php-cgi      
16126 realnoni  30  10  484m  30m  18m S  0.0  0.2   0:12.08 php-cgi      
31561 a0w4pkbp  30  10  496m  30m  17m S  0.0  0.2   0:03.54 php-cgi      
31565 ahfvw0d1  30  10  484m  29m  17m S  0.0  0.2   0:05.80 php-cgi      
21275 asjzdiwq  30  10  484m  29m  18m S  0.0  0.2   0:01.77 php-cgi      

You can see that the same "USER" can have multiple "COMMAND"s running as "php-cgi". I would like to find out which user is running the most processes and get a count of how many processes they are running.

meuh

To count all processes per user:

ps -eo user|sort|uniq -c|sort -n

or to just have the ones running php-cgi:

ps -eo user:15,cmd|sed -n '/php-cgi/s/ .*//p'|sort|uniq -c|sort -n

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How can I see which user accounts are running which processes in Windows 8.1?

From Dev

What processes are running on which CPU?

From Dev

Which user is running tomcat?

From Dev

Which user is running tomcat?

From Dev

Which way is the best for running background processes?

From Dev

htop shows only the processes of the user that's running it?

From Dev

How to find out which processes consume most energy on Linux

From Dev

How do I know which processes are running and who own the process?

From Dev

How do I know which processes are running and who own the process?

From Dev

how to get info about the user and the processes he is running in systemd?

From Dev

In linux, how can you tell which processes use the most network bandwidth?

From Dev

How to get records which matches most to lesser criteria for user search?

From Dev

python multiprocessing - select-like on running processes to see which have one have finished

From Dev

Which processes with daemon are unnecessary?

From Dev

Which processes with daemon are unnecessary?

From Dev

Which processes are not needed for boot?

From Dev

Get list of running processes

From Dev

Running two python processes

From Dev

2 processes running on Sphinx

From Dev

Extract running processes android

From Dev

running two processes on the PI

From Dev

Two Celery Processes Running

From Dev

How can I tell which user limit I am running into?

From Dev

Linux: How to show a list of running processes with PID, user, group, command line, and parent/child hierarchy?

From Dev

Ghost user processes that restart?

From Dev

How would you find the most specific "filter" that matches a document? (determining which market segment a user fits in)

From Dev

Which is the most flexible way for end-user to create a report querying an SSAS Cube?

From Dev

SQL: How do I find which movie genre a user watched the most? (IMDb personal project)

From Dev

Which of the following is the most efficient

Related Related

  1. 1

    How can I see which user accounts are running which processes in Windows 8.1?

  2. 2

    What processes are running on which CPU?

  3. 3

    Which user is running tomcat?

  4. 4

    Which user is running tomcat?

  5. 5

    Which way is the best for running background processes?

  6. 6

    htop shows only the processes of the user that's running it?

  7. 7

    How to find out which processes consume most energy on Linux

  8. 8

    How do I know which processes are running and who own the process?

  9. 9

    How do I know which processes are running and who own the process?

  10. 10

    how to get info about the user and the processes he is running in systemd?

  11. 11

    In linux, how can you tell which processes use the most network bandwidth?

  12. 12

    How to get records which matches most to lesser criteria for user search?

  13. 13

    python multiprocessing - select-like on running processes to see which have one have finished

  14. 14

    Which processes with daemon are unnecessary?

  15. 15

    Which processes with daemon are unnecessary?

  16. 16

    Which processes are not needed for boot?

  17. 17

    Get list of running processes

  18. 18

    Running two python processes

  19. 19

    2 processes running on Sphinx

  20. 20

    Extract running processes android

  21. 21

    running two processes on the PI

  22. 22

    Two Celery Processes Running

  23. 23

    How can I tell which user limit I am running into?

  24. 24

    Linux: How to show a list of running processes with PID, user, group, command line, and parent/child hierarchy?

  25. 25

    Ghost user processes that restart?

  26. 26

    How would you find the most specific "filter" that matches a document? (determining which market segment a user fits in)

  27. 27

    Which is the most flexible way for end-user to create a report querying an SSAS Cube?

  28. 28

    SQL: How do I find which movie genre a user watched the most? (IMDb personal project)

  29. 29

    Which of the following is the most efficient

HotTag

Archive