Top linux tools to monitor performance

In this blog post I will be going to share top linux tools to monitor performance of your webserver. These tools will be helpful you in identifying performance issues on your server. With these tools you can monitor cpu consumption, memory consumption, network traffic, tcp traffic etc. In this post we are considering ubuntu 16.04 VM.

Top linux tools to monitor performance:

1) Top

Top command shows the running processes of the system along with cpu consumption, memory consumption, swap consumption. It keeps updating every few seconds.

sudo top


Running above command will display following type of output:

linux top command

You can see CPU %, Idle CPU%, CPU Steal %, Memory in KB, SWP in KB, load average over 1, 5 and 15 minutes etc. To see help options press ? or h while TOP command is running, you may get output as below:

Top command help options

 

Z,B       Global: 'Z' change color mappings; 'B' disable/enable bold
l,t,m     Toggle Summaries: 'l' load avg; 't' task/cpu stats; 'm' mem info
1,I       Toggle SMP view: '1' single/separate states; 'I' Irix/Solaris mode
f,o     . Fields/Columns: 'f' add or remove; 'o' change display order
F or O  . Select sort field
<,>     . Move sort field: '<' next col left; '>' next col right
R,H     . Toggle: 'R' normal/reverse sort; 'H' show threads
c,i,S   . Toggle: 'c' cmd name/line; 'i' idle tasks; 'S' cumulative time
x,y     . Toggle highlights: 'x' sort field; 'y' running tasks
z,b     . Toggle: 'z' color/mono; 'b' bold/reverse (only if 'x' or 'y')
u       . Show specific user only
n or #  . Set maximum tasks displayed

k,r       Manipulate tasks: 'k' kill; 'r' renice
d or s    Set update interval
W         Write configuration file
q         Quit
        ( commands shown with '.' require a visible task display window ) 
Press 'h' or '?' for help with Windows,

You can sort the results by Memory with Shift + M command and by CPU with Shift + P:

Top Command Sort by Memory and CPU

2) HTOP

HTOP command is similar to top, the only difference is that is bit graphical and user friendly with different colors. It does not comes installed by default you may need to install it.

sudo apt-get install htop

Then you can run it as below:

htop

It will result in output as below:
HTOP Command

Please follow and like us:
20

Add a Comment

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