MySQL is an excellent open source database system. Replication is a great way to keep data redundant in case of a server crash. However, replication should not take the place of backups in case of data corruption or mis-entered data – as this data will also be replicated to the slave.
MySQL replication takes place in a master-slave configuration. Be aware that by using the configuration – only changes made on the master are replicated to the slave. Any changes on the slave will not be replicated to the master.
Following the steps below, you can have MySQL replication setup in no time at all.
Source: MySQL Dev Site
Read the rest of this entry …
If you haven’t noticed, my posting has slowed to a crawl lately. I have been very busy at working on maintaining hundreds of systems and that leaves little time for much else. Enough with excuses and on to a bash script that you might be interested in.

image by Kirill
Ever have bandwidth issues and wish you could automated the testing process instead of manually testing every other hour of the day? I have.
By using the bash script below we are able to automate an upload and download of a file and email the speed results.
#!/bin/sh
cd /path/to/choosen/working/dir
filename="/path/to/test.file"
hostname="ftp.server.com"
username="user"
password="password"
echo -e "***FTP SERVER DOWNLOAD SPEED***\n" >> speedtest.log
ftp -inv $hostname >> speedtest.log <> speedtest.log
ftp -inv $hostname >> speedtest.log <> email.log
mail -s "Speed Test Results" youremail@whateva.com < /path/to/choosen/working/dir/email.log
rm /path/to/choosen/working/dir/speedtest.log
rm /path/to/choosen/working/dir/email.log
-
#!/bin/sh
-
-
cd /path/to/choosen/working/dir
-
filename="/path/to/test.file"
-
hostname="ftp.server.com"
-
username="user"
-
password="password"
-
echo -e "***FTP SERVER DOWNLOAD SPEED***\n" >> speedtest.log
-
ftp -inv $hostname >> speedtest.log <<EOF
-
quote USER $username
-
quote PASS $password
-
binary
-
put $filename
-
bye
-
EOF
-
-
echo -e "\n"
-
echo -e "***FTP SERVER UPLOAD SPEED***\n" >> speedtest.log
-
ftp -inv $hostname >> speedtest.log <<EOF
-
quote USER $username
-
quote PASS $password
-
binary
-
get $filename
-
bye
-
EOF
-
-
#REMOVE GARBAGE (REMOVE EVERY LINE EXCEPT FOR ONES CONTAINING '*' AND 'MB') FROM LOG FILE AND EMAIL IT
-
sed -n -e '/*/p' -e '/MB/p' speedtest.log >> email.log
-
mail -s "Speed Test Results" youremail@whateva.com < /path/to/choosen/working/dir/email.log
-
rm /path/to/choosen/working/dir/speedtest.log
-
rm /path/to/choosen/working/dir/email.log
Now we need to add it to cron for execution every hour:
crontab -e
Add the following to your crontab file:
@hourly /path/to/your/speedtest.sh
Don't forget to chmod 755 the script to make it executable. I have also attached the script in case of any formatting issues on this web page.
FTP Speed Test Bash Script
If you have any questions about how this script works, please leave a comment and I will be glad to explain.
Shell-Fu is a place for everyone to store those hard to remember *nix commands.
This is so simple yet very useful.
Some of my favorites:
Running a second command with the same arguments as the previous command, use ‘!*’ to repeat all arguments or ‘!:2′ to use the second argument. ‘!$’ uses the final argument.
$ cd /home/user/foo
cd: /home/user/foo: No such file or directory
$ mkdir !*
mkdir /home/user/foo
Make a whole directory tree with one command
Use the -p option to mkdir and make all parent directories along with their children in a single command.
mkdir -p tmp/a/b/c
This is a simpler password generator.
/dev/urandom tr -dc A-Za-z0-9_ | head -c8
Do you have any tips for *nix command line? Let us know in the comments.
Freenet is a relatively new P2P project in which members act similar to that of a cluster, donating hard drive space and bandwidth. It is similar to the Tor network in the fact that connections are encrypted and re-routed through other members of the network.
“It acts more like an Internet within an Internet.”
What’s different about Freenet is that you also dedicate parts of your hard drive for file storage. What is even more interesting is that you have no control over what is stored in your ‘data store’. Less popular files are deleted to make room for more popular files. The files are encrypted so that you ‘might’ not be held responsible for what lies within your data store.
Freenet is not only for storing files, but also allows you to create Freenet websites called ‘Freesites’. Also usenet, email, and more is possible on the Freenet.
Freenet is open source and runs anywhere Java runs. Windows, Linux, or Mac should work fine. After installing the interface is accessible through a web browser. Remember, Freenet is still in alpha stage so there may be some bugs.
Read more and download at the Free Network Project website.
Monitoring your website on a shared host is vital to the well being of your existence on the internet. There are several online services that will do this for you in exchange for a small price. While they may be a bit more accurate, I would like to share with you how to use RRDTool to monitor your website’s response time yourself.

image via rrdwiki (didn’t use mine because it hasn’t completed a full cycle yet.)
NOTE: I am using Ubuntu based Linux Mint. This process should be the same on other Debian based distributions. If you are not running a Debian based distribution, you may have to modify some paths to the rrdtool executable. Some of this procedure has been taken from the rrdwiki.
The first step is to install RRDTool:
sudo apt-get install rrdtool
-
sudo apt-get install rrdtool
Read the rest of this entry …

pdftk is an open source, cross platform PDF super manipulator. This goody allows you to split, merge, rotate, decrypt, encrypt, watermark, change metadata, attach files, detach files, repair, and more.
From the site:
“If PDF is electronic paper, then pdftk is an electronic staple-remover, hole-punch, binder, secret-decoder-ring, and X-Ray-glasses. Pdftk is a simple tool for doing everyday things with PDF documents.”
pdftk is command line only, so you might want to check out the examples for syntax. If you aren’t into command line, there are some GUIs available.
Get the full scoop along with package installers at the pdftk site.

Not the official ntop logo – icon courtesy of Tango Desktop Project
Forget about tools like lsof and netstat for trouble shooting and analyzing network traffic. Ntop blows everything else away. It comes jam packed with a web interface and outputs more data than you can shake a stick at. Ntop analyzes everything about how, where, when, and what your PC is connecting to on the internet.
I am running Linux Mint — installation is a cinch. This procedure should be the same on Ubuntu and other Debian based distributions. Make sure you have the universe repositories enabled.
sudo apt-get install ntop
The above will install ntop, now set a password:
sudo ntop --set-admin-password
Start ntop with the following command:
sudo ntop -u ntop -d -i eth0
Read the rest of this entry …
Dear Vyatta,
During the past couple of months I have been attempting to replace my Cisco 7500 with your routing software. The Vyatta product looked very promising and supported all the protocols and features that I needed including BGP, Bandwidth Management (through the kernel), VRRP, in addition to standard routing with TCP/IP.
I have run into many issues with the Vyatta software. Just to name a few — VRRP limitations, BGP Routing Policy limitations, static routing bugs, not being able to delete static routes and policy configurations, and more.
“I am sad to say, good bye Vyatta”
I am sad to say, good bye Vyatta. I have enjoyed the past two months getting to know you. You have what seems a wonderful team of individuals working towards the better. I would like to send a thanks to the support group and everyone on the mailing list, they were wonderful.
I will continue to support what the Vyatta team is trying to do. Unfortunately, the software is still premature. I, however, am looking forward to the next release so I can give it another try.
I am sure I could force the software to work, but I would hardly be confident with that procedure. That being said — Vyatta cannot replace my Cisco 7500 core router.
Farewell,
Shane