Category: Linux & Server Administration

  • Small Shell Script for monitoring

    A customer wanting to do basic monitoring , i had a google and found the following script which is very handy. #!/bin/bash # # Script to notify admin user if Linux,FreeBSD load crossed certain limit # It will send an email notification to admin. # # Copyright 2005 (c) nixCraft project # This is free…

  • Adding timestamps to your bash history

    Often we’ve had boxes compromised, or commands run that we have no idea who did it and at what time. Its very frustrating, especially when we have no idea if a customer did it, one of the staff, or if a box was compromised. Glenn found this little snippet which is now default in all…

  • sshmnt installation and useage for backups

    So you want to use sshfs to do a backup? We have had a couple of customers unsure what to do when the sshfs command is not found. Its not too hard to do. Debian based VPS can just run apt-get install sshfs Centos doesnt come with it by default and you need to install…

  • One Java init script to rule them all

    Need an init script for a Java service? Like tomcat, liferay, or jboss? Regular Linux init scripts often don’t work so well. e.g. Java apps typically want to be run by a particular user (e.g. tomcat or liferay). e.g. They may require a ‘special’ shutdown mechanism (e.g. with Tomcat sending a signal to a particular…

  • Is your VPS slow to login at all? Applications not running so fast?

    Often we will get customers emailing in saying that things are just running ‘slow’. Often when we login the first thing we notice is after the password has gone through it just hangs for a fair while before login. This is usually a sign that its trying to do a reverse DNS lookup and failing.…

  • Safe rm prevents accidents! try it!

    I found this the today http://www.safe-rm.org.nz/ , and having had the odd accident im most definitely going to be installing this on my own server! What is safe-rm? Safe-rm is a safety tool intended to prevent the accidental deletion of important files by replacing /bin/rm with a wrapper, which checks the given arguments against a…

  • libc6 vs libc6-xen problems with applications segfaulting

    We recieved the following email this morning which may be a problem from time to time with other users, so i thought I would share this. Subject: Seg faults on apache mysql and a couple of other less import programs. Probably need a fresh install. Message: Hi I have a serious problem with my VPS…

  • nginx hacking using proxy

    It sucks getting hacked Every now and then servers get hacked. Often because of an exploitable webapp, or because (most commonly) a weak, easily guessable password was used on a well known user account (like ‘root’ or ‘info’ or ‘test’). Once hackers gain access they often install some kind of malware. e.g. something that goes…

  • David’s Handy Scripts – bandwidth usage – disk usage

    I thought a useful addition to our blog might be a running series of handy scripts.  Just for the sake of things (and because I couldn’t find a better title), I’m calling the series “David’s Handy Scripts”.  I’ll get this show on the road with a quick script I put together to track 2 things…

  • Ubuntu 9.04 bug with networking directory creation

    We had a customer email in after updating to Jaunty recently. They said the following Hi guys, I upgraded my VPS a little while back to Ubuntu Jaunty (because I was several versions out of date and the apt repositories had gone away.) I never actually rebooted the machine afterwards though because it wasn’t a…