Bash scripting: another use for “DD”

For most linux users, "dd" is mostly used when dealing with disk issues, such as copying one disk to another (byte for byte) creating an ISO from a CD/DVD, and so on. I personally didnt know what else I would use dd for until I ran across a particular need.... I needed my linux script … Continue reading Bash scripting: another use for “DD”

Sending nagios / centreon notifications via IRC

Lately we needed to find a convenient method of notifying service desk operators of centreon notifications. Email was not a good option since operatives tended to simply delete the messages. Besides, we wantede something a bit more realtime. In the end, I decided on using IRC. I went with IRC rather than jabber due to … Continue reading Sending nagios / centreon notifications via IRC

Analyzing SQUID access logs

There are loads of programs on the internet which are squid log analyzers. While this article does address the same thing, it’s presented more with an eye to how you can use standard linux bash scripts to obtain almost any output you want from log files. In the following script I use no python / … Continue reading Analyzing SQUID access logs

Linux script for automatic notification of failed download

Scenario: We need a CentOS machine to periodically automatically download a file from a remote server on the internet. If this download fails for any reason, the network admin should be emailed to investigate further. Resolution: A simple cron job can be used which executes a download script. The following script was used: #!/bin/bash wget … Continue reading Linux script for automatic notification of failed download

OpsView, bash and GNUplot

Update: The method I go on to describe is over complicated for the objective. Matt in the comments section pointed out a much easier, OpsView method of doing this. Still, the below is a good exersize in bash / gnuPlot scripting. So, OpsView has away around it's own limitation of not graphing host checks. Thanks … Continue reading OpsView, bash and GNUplot

Script to backup WordPress from remote PC

Another auto-backup script 🙂 This time, I wanted to have a quick and easy way to login to my server from my windows laptop, compress and backup the wordpress blog content, as well as the wordpress mysql database, then copy everything back to my laptop. A one-click backup basically. Here's what I did. First up, … Continue reading Script to backup WordPress from remote PC

Backup Scripts

On my work PC I have several important files and folders that I would regularly want to backup. These are usually some MySQL database backend for a website, the website content itself, my Outlook .pst file and a folder containing important work documents. I wanted a backup script that would automatically backup these files regularly, … Continue reading Backup Scripts