5 simple commands to monitor the performance of your Linux VPS

The jump from a shared server to a VPS or a Dedicated is often a tough call to make as the tech know-how and effort required is higher by several orders of magnitude, unless of course, you choose to use Managed Dedicated servers. For someone who uses VPS, here are a few useful tips and tricks to troubleshooting issues on your VPS server.

Monitoring the performance of your VPS can be a tough task. Even System administrators find it difficult to monitor performance at times. In this article, we listed 5 simple commands that will help you troubleshoot issues on your server.

1.Free

This command will give you the amount of memory free on your system. The second line of this command gives you the actual free memory. This is because it subtracts cache memory.

In Linux, a cache memory is considered as free memory as it is available on demand for your applications to use.

free -m

2.HTOP

HTOP is inspired from the famous top command but gives you a much better display of information.

htop

You can sort information by CPU time or Memory usage by pressing F6 and debug which process is using your memory.

3. AB

The apache benchmark testing tool allows you to test the speed of your website.

ab -n 1000 -c 10 http://test.com/index.html
  • -n option specifies the number of requests
  • -c option allows you to specify the number of concurrent requests.

4. MTOP

How can an application be complete without a database. This simple command helps you monitor your mysql database and displays real time queries, cache and query time.

mtop

5.netstat

Netstat is handy when you want to check, which ports are open and which processes are using those ports.

netstat -tpln

However, you can also find out if you are under a DDOS attack

<netstat>
	netstat -plan  | grep  :80 | awk ‘{print $4}’ | cut -d: -f1 |sort |uniq -c
</netstat>

Please Note:

For mtop you will need to install it by adding epel and rpmforge repos.

You also need to give super, reload and process privileges to the user mtop.

Hope this helped! Let us know in the comments section below.

Suggested Articles

Start building your website today!

Free Domain with Unlimited Hosting including Website Builder and Branded SSL

Only at $2.5/mo