Go to content Go to navigation Go to search

Daily Del.icio.us

November 8th, 2007 by delicious

Wick Cool and Environmentally Friendly

November 2nd, 2007 by bkoch

I have always tried to do the right thing in regards to the environment. But I love cars that tend to use a lot of gas, I have until recently either driven a truck or something with a large engine. So whenever I read about hybrids and electric cars I always thought there had to be a better way to save gas.
My folks had a number of diesel cars when I was growing up and I even owned a Mercedes diesel for a while. The engines are rock solid and I liked them even more when I read about biodiesel. Now you could run your car on McDonald’s runoff, how cool is that.
And then the Audi R10 hit the track in the 2006 ALMS season, winning both the 12 Hours of Sebring and 24 Hours of LeMans. A diesel race car that just screamed! Actually it doesn’t, it is frighteningly quiet, I think the tires humming on the asphalt are louder than the engine. Now you could run a fast car on fry grease!
But it gets better, FastCompany has an article about a guy in Kansas who does Hummer conversions to diesel engines and using dual fuels can get better gas mileage than my Honda Accord.
I can have my big redneck pickup and be good to the environment. Sign me up!
Why Detroit isn’t all over this is beyond me.

Daily Del.icio.us

October 26th, 2007 by delicious

Stupid Unix Tips: vi tips

October 7th, 2007 by bkoch

Any experienced *nix admin that is worth his salt knows vi, but more than ever there are users who will only use vi to plow through configuration and/or log files. That is who I am writing this post for.

Hopefully as a user of a *nix system you will know how to move the cursor, page up and down and edit and save the file. But what about searching for a string or doing a search and replace. These are the functions that are going to be most useful when going through config files or logs.

1. Search for text

You first hit Esc to get you out of editing or Insert mode.
Then type a forward slash (’/') and the string you are looking for.
/SomeText
When you hit Enter your cursor will be moved to the first occurrence of the string from where you cursor currently sits.
If you type n then your cursor will move the next occurrence of the string down the file.
You can move up file if you use a capital N, meaning hit Shift+N.
Pay attention because once you hit the top or the bottom of the file the search will wrap around to the other end of the file.

2. Replace text

This is another powerful tool with vi. You can search and replace text using regular expressions. I am not going into detail about this but will hit on the basics to whet your appetite.

Once again hit the Esc key to get you out of Insert mode.
Then type the following:
:%s/SomeText/YourNewText/
This will replace every occurence of SomeText with YourNextText in the file. You might find you need to include a g at the end to globally replace your text, like this:

:%s/SomeText/YourNewText/g

If you only want to replace the string on the line you are on then remove the %. So your expression will look like this:
:s/SomeText/YourNewText/

3. Removing ^M from DOS files.

Now I am sure many of you have gotten files that have the ^M characters after you have moved a file from a Windows computer to a *nix based computer. You could just use the utility dos2unix but not all systems will have it. So you can use vi to accomplish the task.

Get out of Insert mode then type the following:

:%s/^v^m//g

The ^ character is signifies the control key. What you will actually see is this:

%s/^M//g

This will strip out all of the ^M characters.
I hope you will find this information useful.

Know thy Network

October 5th, 2007 by bkoch

Why is it that as computer systems become more distributed fewer and fewer IT professionals understand the part that everything rides on? The Network. I find developers and system engineers both do not fully understand the basics of how a network works, and this is especially problematic considering that most applications in the enterprise are not running on a single server.
I want to take a moment and hit on a few of the ‘must knows’ for anyone who deals with more than 1 server on the network.

1. Bandwidth vs Latency
Almost everyone understands bandwidth, and that is how much data can move over a wire. But many do not understand latency and its impact on distributed application performance. Latency is how long it takes a packet to move over a wire. What you have to remember with applications is that every time you make a call across the wire that time to make a round trip is how much longer your transaction is going to take to complete.
Latency is usually not something that is easily corrected, it bound by physics. Light can only travel so fast.

2. Protocols
You don’t have to quote the specs for a protocol. But you should understand the underpinnings of the protocol. What are its issues is it lightweight or resource intensive. For example it is good to know the difference between TCP and UDP. Or understanding HTTP and how it rides on top of the TCP/IP stack or the basics steps in a DNS lookup.

3. Fallacies of Distributed
If you are a developer or a systems engineer or an architect you should read this paper, Fallacies of Distributed Computing
Explained
.
The fallacies of distributed computing is something that came out of Sun Microsystems in the mid-90’s and I think is something that everyone in IT should be familiar with.

This post is more of a rant than actual useful information. I will probably revisit a few of these points in later posts so please come back to check it out.

Daily Del.icio.us

October 5th, 2007 by delicious

Stupid Unix Tips: Handling filenames that start with special characters.

September 27th, 2007 by bkoch

You learn the best things in computers when you do something stupid. For example, I learned alot about file handles after taking crashing 2 production web content servers by using the filemon utility. I have a colleague who told me that really learned about UNIX internals when he deleted the /usr/lib directory on a server and the back up was bad.
And it was a similar situation that I learned how to deal with special characters in file names, not just in file names but at the beginning. I was attempting to use the tar command to ball up some log files and placed an option where the archive name should have been (I knew better but multitasking is not always a good idea). So I was left with a file called –exclude.

First I tried to enclose it in parentheses:

# rm ‘–exclude’

But I got the following error:

rm: unrecognized option `–exclude’
Try `rm –help’ for more information.

As you can see the rm command interpreted the filename as an option.
I thought about escaping the hyphens:

# rm \-\-exclude

And I received an identical error.
What finally worked was
#rm ./–exclude

Now this will work for many special characters but not ! in the bash shell (ksh doesn’t have the same problem). To delete a file name that starts with ! you use the parentheses method.
#rm ‘!ohno’

Hope that was helpful.

What is my point?

August 25th, 2007 by webmaster

The first point I should address is the title and point of this blog. The theme of this blog is my return to the basics of living, more precisely living deliberately. I have started to realize how we allow our lives to be shaped by outside influences, media, family, government and my favorite societal institutions (i.e. school). It would probably be much more exciting if I said that I had a major epiphany about how I was living and needed to change. But the truth is that this is something that I knew when I was in high school. I knew that I didn’t want to live like most people, nothing outrageous, I just didn’t want to be tied down to something, a job, a business or anything else that could hold me hostage. But shortly after hitting the real world I fell into the rut that I think most people fall into, simply moving from day to day without paying attention to what we really want out life. Or worse yet, following a path that someone or something else has laid out before us. I, like many others, simply followed the well worn path in front of me, hoping that the next thing would satisfy me, a new job, nicer clothes, maybe a home or a different relationship.
Now I have always been an avid reader and I have read a great deal of the success literature (Tony Robbins, Zig Ziglar, Denis Waitley, Stephen Covey etc.). But I never found myself leaving the path that I was on. So I started asking why was this the case, I have all this information at my disposal, I am intelligent, I have plenty of opportunity and I am not entirely lazy, why was my life flat, not bad but not fulfilling?
Upon examining my life and how I lived it, I quickly realized that I wasn’t even practicing the basics, so how could I expect greatness? Now what I mean by the basics are the rules to successful living that is almost always included in any information on how to live a fulfilling life. In any literature you read on how to live whether it is the latest best-seller or in older writings such as the Bible these ideas are going to be present. Points such as do things in moderation, save money, eat healthy foods, exercise, be nice to others and the list goes on. The problem is that so few of us actually do these basic things and in the mean time we are wondering why our lives are out of balance. Then we spend a fortune on self help materials, financial planners and gym memberships, while still ignoring these basic tenants that need to be mastered before you can move on.
As with any skill or undertaking, if you don’t master the basics then you have nothing to build on. I am a musician, I have a Bachelor’s degree in music. When I arrived at college the first thing that I was told to start with were scales. Now I had been playing for years, I knew my scales. But the point of starting with scales was to ensure that I mastered them, because in music scales are the building blocks of everything else. If you have not mastered the building blocks then you have nothing to build on. And anything you do build will more than likely collapse for lack of a foundation.
This concept can be applied to all aspects of life. How can you expect to increase your financial worth when you can’t budget and manage what you have. Or why do you expect to look like something on the cover of a fashion magazine when you don’t even do the simplest of exercises or eat a solid diet. I am guilty of this type of thinking as well. I wish for changes but I don’t even do the bare minimum that is required to make those changes happen. And that is the point of this blog, to discuss these “basics” of life, the skills that you must master to lay a foundation for a bountiful life.

The First Post

August 25th, 2007 by webmaster

Ready? Here we go, I am now in the blog-o-sphere. Like most things, I am late getting here but at least I am here.

The real point of this first post is to create a place holder so no one will see that silly message that I don’t have anything there.

Anyways, more will be coming so please come back.