5 free tools to monitor your Moodle server while load testing

Using Munin to monitor Moodle server

[pulledquote]As part of Oktobertest I am going to share 5 free tools you can use to monitor your Moodle server. The focus of this post is on load testing but these tools can be (and some should be) used as part of your normal monitoring.[/pulledquote]

Note: this post is aimed towards admins who run their Moodle installation on a Ubuntu Linux server. As usual, this is not meant to be a definitive list or how-to, but rather an introduction to what a Moodle administrator can do to ensure their installation is running smoothly

 

 

Monitoring tools

The following tools are listed in increasing order of difficulty of use. I have used them all but I have found that unless I load test, the first 3 tools tend to be enough for me. I ran Zabbix for a while but it requires quite a bit of TLC, which I simply don’t have time for – great tool though. If I had to keep only one tool it would be htop.

 


Moodle server monitoring tool 1: top 

 

Moodle monitoring tool - top

 

What it does

  • By default, the top command lists all processes in decreasing order of amount of CPU they use
  • The top command also shows your memory (RAM) status and your overall load average (CPU usage)
  • Pressing the M key (capital letter) will sort the processes by amount of RAM used (decreasing)
  • All figures are updated in real time, so I usually have it running in a window whenever I load test to see how the server performs under specific loads

 

Installation

  • Top should come packaged up with your Linux server, you shouldn’t need to install anything for it to work.
  • All you need to do to start it up is type the following command in a terminal window:
sudo top

 

If you would like to find out more about all of the options the top command has to offer, read this excellent article.

 


Moodle server monitoring tool 2: atop

  

Using atop to monitor Moodle server

 

What it does

  • atop is very similar to top but gives you access to more data (network, disk, etc.)
  • atop shows usage summaries by all processes e.g. you have access to a summary of all memory, network, CPU (per core) usage

 

Installation

  • If you want to install atop from a package, simply type
sudo apt-get install atop
  • All you need to do to start it up is type the following command in a terminal window:
sudo atop

 

If you would like to find out more about all of the options the atop command has to offer, read this excellent article.

 


Moodle server monitoring tool 3: htop

 

Using htop to monitor Moodle server

  

What it does

  • htop is very similar to top but allows you to sort data more easily
  • htop also shows CPU & memory usage in a more user-friendly way

 

Installation

  • If you want to install htop from a package, simply type
sudo apt-get install htop
  • All you need to do to start it up is type the following command in a terminal window:
sudo htop

 

If you would like to find out more about all of the options the htop command has to offer, read this excellent article.

 


Moodle server monitoring tool 4: Munin

 
Using Munin to monitor Moodle server

 

What it does

  • Munin presents your server data in easy to read graphs
  • Munin can monitor pretty much everything on your server, from CPU usage to MySQL slow queries, etc.
  • Munin data is saved in a flat file and historical data can be accessed in the graphs
  • Good support community

 

Installation

Rather than re-write an install guide for Munin, I have compiled all of the resources I used to get Munin up and running smoothly on my VPS

You might run into some issues (I did) – here is where you can get an easy fix

  

You can see a screenshot of whole Munin report page here (800KB) – possibly the World’s longest screenshot 🙂

 


Moodle server monitoring tool 5: Zabbix

Monitor your Moodle server with Zabbix - IO wait

 

What it does

  • Zabbix is similar to Munin – it displays server vitals in graphs
  • Zabbix also has the ability to send you email alerts should your server reach critical values e.g. disk usage > 80%
  • You have the ability to create your own alerts, with custom thresholds
  • Zabbix is a full fledged server monitoring solution – you can monitor multiple servers
  • Zabbix is best run on its own server as it is MySQL intensive (every piece of data is stored in a database)

 

Installation

 

Monitor your Moodle server with Zabbix - CPU

Monitor your Moodle server with Zabbix - bandwidth

 

 

16 comments

    1. Hi Joseph,
      I don’t manage any Moodle installations on Windows and I don’t know much in this area. I am sure there are plenty of good tools out there to monitor Windows servers (maybe even built-in). If you know of any, please post the links here.
      Cheers,
      Fred

  1. Nice post as always Frederic, but I think you forgot the best of all: sysstat! With the right configuration, it’s verylightweight and may server for long time monitoring, without much hassle to setup.

    Hope to see more of your posts in the future!

Leave a Reply

Your email address will not be published.