Memtester - Just in case

Submitted by admindm on Mon, 11/04/2013 - 21:03

Ok so we have our Drupal Web server set and running. Now we need to make sure thats always the case and that its protected. The first thing you will want to do, mostly because it is so simple is install memtester. As the name suggests this will allow you to test the memory, but most importantly it will let you do it while the server is still live. To install it run this.

sudo apt-get install memtester

Its a very small download so won't take long to install.

When you want to run memtester it is capable of finding the max available memory itself. To get it to do this just tell it to use more memory than is available and it will continually reduce its memor allocation until it can lock it and start testing. Don't go too far over what you have available or it will take a very long time to lock. Also bear in mind that your server will still need some free memory to go about its business. The server I'm testing on has a tick over memory usage of around 1Gb and it has about 4Gb of total memory so I'm going to ask memtester to test 2.5G of memory to test. This will test the bulk of my memory without leaving the server ram starved. You also need to tell memtester how many loops to do. Depending on your setup just one loop can take a very long time so I suggest you use a small number of loops the first time you do this so you have some idea of when to come back and check the results. Run this.

sudo memtester 2560M 2

This will do 2 loops of 2.5 gigabytes, or 2560 megabytes. You cant specify decimals so 2.5G will not work.

When memtester completes check over the output and hopefully you should ahve a long list of OKs, Otherwise it may be time for some new hardware.