Web Application Development can seem easy if you’re used to a shared host and WordPress running out of the box. Moving into the world of unmanaged VPS can be daunting at first - or really easy if you’re insane.

If you’ve got access to a terminal or CLI - command line interface then you have here a number of options for checking your website performance. Here’s a few choice one’s I’ve been using lately.

Ubuntu / Linux - Login Information

The most basic is to open your Terminal and login to the server. This will show you something like this:

Welcome to Ubuntu 11.10 (GNU/Linux 3.0.0-12-virtual x86_64)
* Documentation: https://help.ubuntu.com/
System information as of Tue Jan 17 20:57:06 UTC 2012
System load: 0.0 Processes: 86
 Usage of /: 4.0% of 74.81GB Users logged in: 0
 Memory usage: 44% IP address for eth0: 11.222.333.444
 Swap usage: 0% IP address for eth1: 12.345.678.901

Ubuntu / Linux - W

If the most basic System info has gone from your terminal, try W.  Just type w and press enter. This will show you something like this:

21:31:20 up 2:59, 1 user, load average: 0.00, 0.01, 0.05
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
damien pts/0 11-22-33-44.zo 20:57 0.00s 0.54s 0.00s w

You’re most interested in the load average on the first line which shows the status for the past 1, 5 and 15 minutes.

Ubuntu / Linux - Top Command

Type Top and press enter will load your page and refresh every few seconds with stats on everything that is running.

Again -  You’re interested in the load average on the first line which shows the status for the past 1, 5 and 15 minutes.

top - 21:13:28 up 2:41, 1 user, load average: 0.00, 0.05, 0.07
Tasks: 84 total, 1 running, 83 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.3%us, 0.1%sy, 0.0%ni, 99.4%id, 0.2%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 2047820k total, 1128708k used, 919112k free, 22920k buffers
Swap: 4192960k total, 0k used, 4192960k free, 570000k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 
 1 root 20 0 24052 2072 1264 S 0 0.1 0:00.59 init 
 2 root 20 0 0 0 0 S 0 0.0 0:00.00 kthreadd 
 3 root 20 0 0 0 0 S 0 0.0 0:00.17 ksoftirqd/0 
 4 root 20 0 0 0 0 S 0 0.0 0:00.00 kworker/0:0 
 5 root 20 0 0 0 0 S 0 0.0 0:00.01 kworker/u:0 
 6 root RT 0 0 0 0 S 0 0.0 0:00.00 migration/0 
 7 root RT 0 0 0 0 S 0 0.0 0:00.00 migration/1 
 8 root 20 0 0 0 0 S 0 0.0 0:00.00 kworker/1:0 
 9 root 20 0 0 0 0 S 0 0.0 0:00.14 ksoftirqd/1 
 10 root RT 0 0 0 0 S 0 0.0 0:00.00 migration/2

Top - Continuous Load Average

A better version of this is command is

top -b | grep "load average"

Left running for a few minutes and your screen will fill up like this:

top - 21:14:27 up 2:42, 1 user, load average: 0.00, 0.04, 0.07
top - 21:14:30 up 2:43, 1 user, load average: 0.00, 0.04, 0.07
top - 21:14:33 up 2:43, 1 user, load average: 0.00, 0.04, 0.07
top - 21:14:36 up 2:43, 1 user, load average: 0.00, 0.04, 0.07
top - 21:14:39 up 2:43, 1 user, load average: 0.00, 0.04, 0.06
top - 21:14:42 up 2:43, 1 user, load average: 0.00, 0.04, 0.06
top - 21:14:45 up 2:43, 1 user, load average: 0.00, 0.04, 0.06
top - 21:14:48 up 2:43, 1 user, load average: 0.00, 0.04, 0.06
top - 21:14:51 up 2:43, 1 user, load average: 0.00, 0.04, 0.06
top - 21:14:54 up 2:43, 1 user, load average: 0.00, 0.04, 0.06
top - 21:14:57 up 2:43, 1 user, load average: 0.00, 0.04, 0.06
top - 21:15:00 up 2:43, 1 user, load average: 0.00, 0.04, 0.06
top - 21:15:03 up 2:43, 1 user, load average: 0.00, 0.04, 0.06
top - 21:15:06 up 2:43, 1 user, load average: 0.00, 0.04, 0.06
top - 21:15:09 up 2:43, 1 user, load average: 0.00, 0.04, 0.06
top - 21:15:12 up 2:43, 1 user, load average: 0.00, 0.04, 0.06
top - 21:15:15 up 2:43, 1 user, load average: 0.00, 0.04, 0.06
top - 21:15:18 up 2:43, 1 user, load average: 0.00, 0.04, 0.06
top - 21:15:21 up 2:43, 1 user, load average: 0.00, 0.04, 0.06
top - 21:15:24 up 2:43, 1 user, load average: 0.08, 0.05, 0.07
top - 21:15:27 up 2:43, 1 user, load average: 0.08, 0.05, 0.07

This command is really useful when doing server load testing. Leave your terminal window open. Open another new terminal window and run your benchmark script tests.

Tags: performance, Server, Usage

Read more from my blog for an introduction and quick tips on developing in Hugo or UCTD.

Meet the author

Photo for Damien Saunders
Damien Saunders
An experienced management consultant and business leader interested in digital transformation, product centred design and scaled agile. If I'm not writing about living with UCTD (an autoimmune disease), I'm probably listening to music, reading a book or learning more about wine.
Find our more about me.