I was moving a WPMU site to a new server and saw that the database had grown to about 250Mb, and there were about 700 blogs running on the server. I used a few database queries to pull out a list of which blogs I wanted to delete — basically any which had a creation date and last update date the same, and any with only one post etc — at which point I had a list of 300 blog IDs. So was I going to manually delete them all? Nope, I did what any sensible person did, and wrote a script to do it.
Linux
vnstat for webservers
This is quickly becoming one of my favourite tools when setting up webservers, after discovering it recently. I have all sorts of monitoring set up and use munin a lot, but vnstat seems to be a very lightweight daemon which gives you insight into the traffic to and from your box. Best of all it integrates well with logwatch, so it will send you a quick report every day so you can see immediately if something is going wrong.
UFW script for Logwatch
I enabled UFW on an Ubuntu server recently and started getting all manner of stuff in my logwatch reports. It activated a section called 'iptables' and started logging every line in syslog with [UFW BLOCK] in it. It was marginally interesting, but not really worth the space devoted to it, so I decided to write a little script to parse the UFW log and summarise the top Blocked Hosts and top Blocked Ports. Therefore I could easily see if there was a change in pattern.
Power Mutt usage.
I always install mutt when I'm setting up a server, mainly because I use it to send myself files from the command line, for local examination or archiving. Its quicker than using scp, ssh, or (heaven forbid) ftp. Plus you can use it in shell scripts. For example; But recently I was troubleshooting a server … Read more
Dos Boot Disks Under Linux
Sometimes you have no choice and you need to boot into a DOS boot disk — to upgrade your BIOS for example, or to run Seagate's SeaTools, as I had to recently. This can be a headache when you're using Linux. I was having issues with the SeaTools' own boot disk, as I wanted to … Read more