We do support Round the Clock 24 x 7 x 365 (+91) 883 012 3924
 

How to check the resource usage on the server

How to check the resource usage on the server

If there is a high load on your server and you need to find out exact processes & users are consuming your server resources.
In such case, we can use “ps” command.

Here are some useful commands :

# To list top 10 CPU usage processes with user

# ps -e -o pcpu,pid,user,args|sort -k1 -nr|head -10

# Find out top 10 CPU consuming process

# ps -auxf|sort -nr -k3|head -10

# To list top 10 Memory consuming processes with user

# ps -e -o pmem,pid,user,args|sort -k1 -nr|head -10

# Find out the top 10 memory consuming process

# ps -auxf|sort -nr -k4|head -10

# Find out every process running under a user

# ps -U user-name -u user-name u

Or

# ps -e -o pid,user,args|grep $username

1 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Post navigation