Monitor and alert hard drive temperature in Linux

Due to the current heatwave in South Africa I have had to deal with quite a few hard drives failures. One of which was my file server at home and another server at the office. So I wrote this little bash script that will email me if the temperature on a hard drive on one of my servers is above a predefined threshold.


  • You should make sure that you schedule to run the script every 30-60 minutes using the Linux crontab.
  • Also make sure you have installed the hddtemp program on your server.

Read More

CrashPlan backup destination offline

Sometimes CrashPlan shows that the backup destination is offline especially when the destination is a Linux server. What I have recently learnt is that the issue isn’t on the backup destination but rather on the client. In order to fix this you should double click on the CrashPlan Icon and issue the following command in the console:

ra, restart

This will reset the CrashPlan service on the host you are connecting to and probably sort out the connection problem to the offline server.

Read More

Using PHP to harvest email addresses from websites

I recently had the need to contact a lot of people in the golfing industry but found it rather tedious to do Google searches for people who organize golf events and then copying each email address one by one off the website. So I set off in search for a simple PHP script that could harvest the email addresses from a website but I didn’t really find an out of the box solution. So I wrote this little app using some of my own code and some code I found on can download the script from here.

Read More

Crashplan – Plan to Crash!

I remember the days when CrashPlan used to be awesome, but in the last year they have released so many updates to their core system and in return caused a shit storm of headaches for people like myself.

CrashPlan has a builtin algorithm that does (or rather attempts to do) automatic upgrades of their client software which works great if you use a Microsoft based operating system. Unfortunately the same can not be said for all my CentOS servers that run CrashPlan. So this morning I came into the office again thinking I was going to spend my Monday hacking away at some PHP code but unfortunately I was faced again a bombardment of CrashPlan alerts for my servers not being able to make any backups. After some investigation I noticed that some servers were on version 4.5.0 and others still on 4.4.1 which means I will have to do manual upgrades again and waste another 2 days of my life just to have stable backups again.

The worst part is that the installation package for CrashPlan version 4.5.0 is not available for download from the CrashPlan website. This means that until that happens I am stranded. If anything goes belly up on any my Linux servers before version 4.5.0 is available for download I am going to be in big trouble.

I really wish that CrashPlan would get their damn act together already!

Read More

DataTables on click event fail to fire on page 2

I recently stumbled upon a JavaScript issue that I have actually encountered in the past but couldn’t remember where I used it.

The problem comes in when you try to fire an on click event on an element within a DataTables table and the element is after page 1 in the DataTable. This happens because the second page does not yet exist in the DOM by the time you bind the on click event in your code, thus the click function doesn’t fire when you actually click on the element it’s bound to.

To get passed this problem you need to bind the handler to a static element, not the rows that can be added dynamically. The wrong way to do it is as follows:

In the example above the the anchor with the class name aviewmsgdetails‘s on click event will only bind to the first page of the DataTables table.

Below is the correct way of firing the on click event:

Read More