• 09
  • Jun

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

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 …

  • 05
  • Jun

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.

Speedometer
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.

  1. #!/bin/sh
  2.  
  3. cd /path/to/choosen/working/dir
  4. filename="/path/to/test.file"
  5. hostname="ftp.server.com"
  6. username="user"
  7. password="password"
  8. echo -e "***FTP SERVER DOWNLOAD SPEED***\n" >> speedtest.log
  9. ftp -inv $hostname >> speedtest.log  <<EOF
  10. quote USER $username
  11. quote PASS $password
  12. binary
  13. put $filename
  14. bye
  15. EOF
  16.  
  17. echo -e "\n"
  18. echo -e "***FTP SERVER UPLOAD SPEED***\n" >> speedtest.log
  19. ftp -inv $hostname >> speedtest.log  <<EOF
  20. quote USER $username
  21. quote PASS $password
  22. binary
  23. get $filename
  24. bye
  25. EOF
  26.  
  27. #REMOVE GARBAGE (REMOVE EVERY LINE EXCEPT FOR ONES CONTAINING '*' AND 'MB') FROM LOG FILE AND EMAIL IT
  28. sed -n -e '/*/p' -e '/MB/p' speedtest.log >> email.log
  29. mail -s "Speed Test Results" youremail@whateva.com < /path/to/choosen/working/dir/email.log
  30. rm /path/to/choosen/working/dir/speedtest.log
  31. 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.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]
  • 09
  • Apr

Shell-FuShell-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.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]
  • 31
  • Mar

PizzaWhen you are hungry, it is crucial to know where your pizza is in the process of being delivered to your door.

By using this python script you can monitor the status of your pizza, in real time, ensuring it receives the proper care it needs.

The process is simple. Just download the script, make it executable (on Linux) and run it in the following syntax, where XXXXXXXXXX is your telephone number:

./dominos.py XXXXXXXXXX

Thanks to Chris for the heads up! And pizza thumbnail via jetalone.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]
  • 31
  • Jan

Freenet Logo

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.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]
  • 29
  • Jan

Vidalia LogoOpen source, cross platform Vidalia is a Tor GUI that runs on Windows, Linux, and Mac.

Simply put, Vidalia makes it really easy to setup, configure, turn on and off, and configure relays for the Tor network. Complete with bandwidth graphs and network maps, Vidalia should have everything you need to get started and stay on the Tor network.

After installing Vidalia, it is as simple as pointing your browser’s proxy setting to 127.0.0.1:8118 to start using the Tor network.

Vidalia Bandwidth Graph

You can even choose which country to originate your connection from. Don’t get too frisky now. ;)

Vidalia Homepage | Vidalia Downloads | Vidalia Screenshots | Vidalia Support

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]
  • 26
  • Jan

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.

RRDTool Ping Graph
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:

  1. sudo apt-get install rrdtool

Read the rest of this entry …

  • 25
  • Jan

pdftk Logo

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.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]
  • 22
  • Jan

Ntop Logo
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 …

  • 21
  • Jan

Vyatta Cannot Replace My Cisco

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

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]