How we will sort easily CPU and Memory consumption of users

Sometimes, we have a tendency to face high load problems on the server and that we ought to conclude that user is inflicting such problems particularly once the server is hosted with multiple domains. Here we are able to get such details victimization the commands 'ps' and 'top'. area unit able to use many various choices to type the results of those commands and a few helpful examples are provided here:

We can get the top 10 CPU consuming processes including the user details with the following command:


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


To find the top 10 CPU consuming process:


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


To list the top 10 Memory consuming processes with each user:


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


To show the process usage of a user with ‘top’ command:


# top -u $username


To get a  list of top 10 CPU usage processes with username:


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


To list the top 10 Memory consuming processes with username:


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


To check the number of connections from an IP address currently connected to the server:


# netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

DDOS and DNS A Records Need Why ?

It is required that all DDOS shared hosting clients use Rivalhost Global Protected Name-servers...

Can you change my PHP version?

All new shared hosting accounts are created on a server which runs php version 5.3.x or higher We...

Do you host adult sites or content?

Yes we have Offshore Server also Offshore/ anonymous location . you can host / or runs any type...

Can I have multiple domains point to the same website?

Yes. These are commonly referred to as "parked domains" and allow you to have multiple domain...

How long does it take for my account to be setup?

Generally, it will not take more than 24 hours for us to setup your account, unless we have...