A work “pick-me-up”

Some days it is just great to bring the kids to the office with you. This past Saturday I brought the whole family in for a few minutes so I could pick up something that I had forgotten and this is what my daughter wrote on my board.

White board message

White board message

Man I love being a dad.

1 Comment

Finally a two car family again

After two long years of being a single car household my wife and I were finally able to purchase two vehicles. The van that we had was on it’s last leg and we were no longer comfortable driving it. It has been quite a while since we were in a position where we could make a purchase like this so it was pretty scarey signing on that line. However it did feel pretty good this morning driving my own car to work.

We purchased both of these from Enterprise Car Sales and I highly recommend them if you are in the market for a new vehicle. The entire process was very easy and pressure free.


Xorg working (finally)

On the last Free Linux Help Line show both I and another caller had an issue with getting an older model ATI card (ATI Technologies Inc Radeon RV250 [Mobility FireGL 9000] in my case) to work with recent releases of the distros we like to use. I was able to find someone who was able to point me in the right direction to get it working though. Basically you have to set:

Option      "AGPMode" "1"

in the Device section of your xorg.conf. Once you have that then you can safely set the driver to be “ati”. I have tested this on both Debian Lenny and Ubuntu 8.04.2 LTS. Note that this will really only work after the you get Linux installed on the system. In my case I used the alternate CD for Ubuntu to get it going.

More information can be found on the following pages:


Review of “Python for Unix and Linux System Administration”

I first got introduced to Python a few years go. Between now and then I mostly did some hackish scripts solving various small problems that me or my colleagues had. It has not been until recently that I started writing something that can remotely be called serious stuff that often makes its way to production environment.

I recently got my hands on a copy of Python for Unix and Linux System Administration. After reading it, I felt the time I’ve invested in reading it was well spent. The author introduced the reader to many different situations where python would help make their lives as system administrators easier, without confusing the reader with some complex forms or statements. My feeling is that this book is aimed at people who want to use Python to solve their problems quickly and efficiently, but only have a limited experience with the language – and the books fits that purpose well with its rather superficial approach that the reader can later extend later on with various available resources. It would only be fair that I too mention some of the shortcomings that I noticed while reading this book.


  • The author introduces the reader to ways that Python can be used.
  • Most of the time there will be more than one way to accomplish a task. The author at times presents a scenario and showed the reader how to do the same task with different modules. This places the choice of which to use back where it belongs, with the reader.
  • The book has a website (most do these days) where the code examples can be downloaded. http://py4sa.appspot.com/


  • More time was spent on iPython than was really needed.
  • The case of a word is important in Python. For instance “import Sys” and “import sys” are two completely different things. There were quite a few occasions where a module name was used as the first word in the sentence and because of that it was capitalized.
  • There was once instance that I saw where a script example had no indentation at all. Trying to run it would have resulted in complete failure.
  • It would have been nice if the script examples were named instead of leaving it to the reader to figure it out based on the imports used in another example.

When all is said and done I think I would recommend the book to others if I knew that they had at least some background with Python. And I would highly recommend that they check the addendum and errata pages.


Gaming Night / LUG Meeting

This Saturday (03/07/09) from 4:00PM to 7:00PM (EST) the Blue Grass Linux User Group (BGLUG) along with the Ubuntu Kentucky LoCo will be hosting a gaming night / LUG meeting. The event will be held at Tates Creek Christian Church (see below for the map). Check out this thread on the BGLUG forums for more information on the games that we will be playing and the topics for discussion. Also attached is a flyer for the event.

If you plan on gaming remember to bring a laptop or desktop with all of the hardware you need to run it (monitor, power cords, keyboard, etc). We will have a game server there with the install packages available so if you don’t have time to get the game installed beforehand don’t let that stop you from coming.

We will be ordering pizza at some point during the night so if you you have it and are willing to chip in on the cost that would be great too.


irssi logging question

I have recently upgraded my home server from Ubuntu 7.10 to Ubuntu 8.10. I have been using irssi on this box for quite a while now and the logging has been just fine. Until this recent upgrade that is.

Below is what the my logs looked like before I did the upgrade:

21:47 < etank> someone told me that it was the way my client was set up
21:47 < etank> or a mode on my nick
21:47 < etank> i gots no idea
21:47 < klb> do a /mode etank
21:48 < etank> Your user mode is +ei
21:48 < klb> ah.. +i is invisible
21:48 < etank> oh
21:48 < klb> I see the channels in your whois that I share with you
21:48 < etank> now try me

This is what it looks like now:

12:30 4/<gc c4/ etankg4/>g e?/Sup3rkiddo: nice rant
12:30 4/<gc c4/ etankg4/>g e?/i had never thought of it that way before myself
12:30 4/<gc c4/ etankg4/>g e?/but it sure makes sense to me
12:31 4/<gc 2/Sup3rkiddgc4/>g eetank, wow, someone is alive :D.. thanks :)
12:31 4/<gc c4/ etankg4/>g e?/np.
12:32 4/<gc c4/ etankg4/>g e?/i just tried it out on my box (a, b = b, a)
12:32 4/<gc c4/ etankg4/>g e?/all it did was move the memory reference around it looks like
12:37 4/<gc 2/Sup3rkiddgc4/>g eetank, yeah

I did not make any changes to the irssi config file. All I did was the OS upgrade and with that got the new version of irssi. Is anyone else seeing this kind of behavior?

Thanks in advance for any help you provide.



The servers in our DMZ do not have any access to the outside world. Getting Symantec dat files onto the DMZ AV server was kind of a pain. I would manually download the latest file (when I remembered) and then copy it to the correct directory on the server. I was getting kind of tired of manually doing this and add to that it was only happening about 2 times a month. Today I decided that I would write a script in python to take care of getting the correct file and moving it to the right location for me.  I have not set it up as a scheduled task yet but I may in the future. Here is what I came up with:

Disclaimer: I know that this may not be the best code written. I am still learning so please make comments that could improve on what is here. Thanks.

#!/usr/bin/env python

import datetime
from ftplib import FTP
import shutil, os

### Config stuff ###
# FTP site to connect to
ftpsite = 'ftp.symantec.com'

# Directory where the files are stored on the FTP server
directory = 'AVDEFS/symantec_antivirus_corp/xdb/'

# Set a variable for todays date like Feb 03 to match to
today = datetime.datetime.now().strftime("%b %d")

# Array to hold the directory listing of the remote server
data = []

# Set the directory on the DMZ AV server to copy to
destDir = r'\\SomeRemoteAvServer\RemoteDir'

def handleDownload(block):
    print ".",

# Find the file that matches todays date
def getFilename(data):
    for line in data:
        perms, x, y, z, size, month, day, time, filename = line.split()
        if len(day) == 1:
            day = '0' + day
        timestamp = month + ' ' + day
        if timestamp == today:
            return filename

def compareFileSize(filename,destFile):
    Compares src file to destFile to see if they are the same size.
    if os.path.getsize(filename) == os.path.getsize(destFile):
        return 1
        return 0

# Open a connection to the FTP server
ftp = FTP(ftpsite)

# Log in as anonymous
print 'Logging in.'
print ftp.login()

# Change to the directory where the files are stored

# Get a directory listing

# Get the file that matches todays date from the directory listing
filename = getFilename(data)

print 'Opening local file ' + filename
file = open(filename, 'wb')

# Download the file a chunk at a time
# Each chunk is sent to handleDownload
# We append the chunk to the file and then print a '.' for progress
# RETR is an FTP command
print 'Getting ' + filename
ftp.retrbinary('RETR ' + filename, handleDownload)

# Clean up time
# Close the local file
print 'Closing file ' + filename

# Disconnect from the FTP server
print 'Closing FTP connection'
print ftp.close()

destFile = os.path.join(destDir,filename)

# Now copy the file to the AV server in the DMZ if it does not already exist
# then remove it from the local system.
if os.path.isfile(destFile):
    print 'The file %s is already on the server.' % filename
    print 'Copying the file to %s' % destDir
    shutil.copy2(filename, destDir)
    # Compare the two files to make sure they copied correctly
    if compareFileSize(filename, destFile):
        print 'The file looks to have copied fine. Deleting the local copy now.'
        print 'Something seems to have gone wrong. The file did not copy correctly to %s' % destDir