Playing with MYSQL replication

One of my colleagues left to vacation. Now I have to work with his stuff. I found one of the hardest task is replication of two MYSQL servers. They work both as master and as slave. So, everytime I have to check their statuses to know replication is alive or not. Unfortunatelly, I haven’t faced with MYSQL replication before. That’s why it was novelty for me :). I’ve discovered a very useful book – “High Performance MySQL” on O’Reilly site.
As you can know there is a sample chapter for every O’Reilly books. I was amazing! The sample chapter of “High Performance MySQL” was “Chapter 7: Replication”!!! That chapter helped me. I found there some useful receipts how to check a process of replication. You can use my simple Perl script which check status of master and slave and create a report. The script is based on receipt from “High Performance MySQL”.
check_repl_status.pl

FC4: Finding modem

I upgrated my home computer up Fedora Core 4 and I was surprised when I tried to connect to Internet – my modem was not found (yeah, I still have dial-up connection but for me it’s enough). After two hours Google searching I found a way how configure the modem. I run a Linux utility wvdialconf and it found the modem on ttyS14. Then I just created a symlink:


ln -s /dev/ttyS14 /dev/modem

Now the modem works correctly! Strange, It seems Fedora Core 4 was released crude! I spent some time to resolve problems with FC4 on my work computer. Now I need to do the same things on my home computer. Perhaps, it’s a good idea to change Linux distributive 😉

Managing your projects with Planner

All developers sooner or later face with a problem of planning they projects. Planner which is a project management tool for the Gnome desktop can make developers live easier. Recently I’ve discovered an interesting article from RedHat Magazine – Managing your projects with Planner is Planner. There are clear and helpful recommendations about using Planner to plan a project and trace its development. Basically, Planer is good tool. But I’ve found a very big disadvantage: to share your project plan you can only print it or export in the HTML. It’s not suitable for projects which need to more than one developer.

tar: Howto Exclude or Include Files

Recently I’ve had a little problem. I’ve needed to create an archive from some source directories but I’ve not needed to add in the archive some subdirectorives. I’ve made a quick search in Google and found an article “Telling tar Which Files to Exclude or Include”. Here is a short example:


$ find videoguide/ ! -type d -print | egrep '/,|%$|~$|.jpg$|.gif$|.png$' > /tmp/exclude_files

That command forms a list of excluded files and store it into temporary file.

$ tar vcfX ~/projects/arc/vg-19012004.tar /tmp/exclude_files

will remove files which listed into excluded_files from archive.

Updated: There is a more simple way to exclude file/dir from the archive. You can define a pattern in the command line instead of creation a file. Let’s image that we need to exclude Subversion directories from the archive:
tar vzcf my-project.tar.gz --exclude='.svn' ProjectDir
Note: you should always wrap the pattern by quotes!