Archive for the 'linux' Category


Doin’ it Right 0

Anyone attempting to do RAW conversion under Linux (in GIMP, specifically) is probably using DCRaw, as it appears to be the only guy in town. In which case, you owe it to yourself to check out UFRaw — it’s another GIMP plugin that’s a much better front-end for DCRaw (read: one that actually has options).

~Time 0

I’ve been playing around with Xubuntu on an old machine, and happened to install the latest version of Eclipse + PDT (1.0.3, IIRC?). While setting up the myriad of options I require to feel comfortable in the editor, I noticed that they’ve added the ability to strip whitespace on save. May the authors be praised!

Pharmacists 5

Tonight I installed dnsmasq as a caching DNS forwarder on our home network (under a VM, no less). Additionally, I changed our primary DNS servers to those hosted by OpenDNS. To double-check that things were working, I figured I’d whip up a quick script to make a bunch of DNS requests and give an average time. First round, I faced the OpenDNS server against Cox’s own. I’d never really benchmarked the Cox DNS servers, so this was quite enlightening:

andrew@ubuntu-server-vm:~$ php ./dns_bench.php dothedrew.net 208.67.222.222
Average response time: 27.53
andrew@ubuntu-server-vm:~$ php ./dns_bench.php dothedrew.net 68.105.28.11
Average response time: 158.58

This only serves to strengthen my belief that all cable ISPs are run by pharmacists.

To satisfy morbid curiosity, here are the results against the local dnsmasq daemon:

andrew@ubuntu-server-vm:~$ php ./dns_bench.php dothedrew.net 127.0.0.1
Average response time: 0.21

That’s only about, oh, a 755x improvement. Hopefully that’ll sufficiently speed things up.

To Believe It 2

Bandwidth graph of the period during which my machine was compromised:

For the month, I’ve used about 34GB; so while my bandwidth usage was minimal overall, it was a sight higher than what I’d consider normal.

CouchDB on Ubuntu 3

I’ve been meaning to play around with couchDB lately, and finally took the time to get it installed on my Linux VM at home running Ubuntu Server 7.10. I ran into a few problems while getting the thing to compile, so I figured I’d outline them here.

First, look at the instructions in the INSTALL file, or at the wiki. They’ll give you a good starting point — especially for all the development tools you’ll need to begin compiling things (automake, libtool, etc. — Ubuntu doesn’t install these by default). If you’re running a headless machine (like my VM) without X, however, you won’t want to install the erlang meta-package, as this will install a bunch of X related crap. And you can’t just install erlang-base, since this won’t give you everything you need, as evidenced by a failing make (trust me).

Now, before you go and search the Internet and decide that you should compile erlang from source — hardly an attractive option — keep reading. The silver bullet is that you need the erlang-nox package (that’s “no X”, not some form of nitrous oxide). The description is very vague, but it’s apparently a bunch of erlang stuff that doesn’t require X11. I also installed erlang-dev, since the description made it sound important (i.e., I’m not sure if it’s required).

Hopefully this helps somebody else.

Wireless Statistics 2

My brother’s out visiting for Thanksgiving, and his Vista-powered (or was it ready?) notebook is having an incredibly difficult time connecting to our wireless network (for whatever reason). I was, of course, quick to place the blame on Vista — and not just because I’m being bigoted; this isn’t the first time I’ve heard someone complaining about Wifi problems under Microsoft’s “best” OS.

Anyways, I began searching Google for problems specifically related to his PC/chipset, but, in the process, stumbled across a completely scientific method of proving which operating system — Vista or XP — was better.

First, I searched for “Vista wireless problems”: 15,400,00 results.

Then I searched for “XP wireless problems”: 13,700,00 results.

Not quite as overwhelming a victory as I’d hoped for, but it’s pretty clear who the top contender is.

(As a purely academic exercise, I then typed in “Linux wireless problems”. A scant 46,200,000 results. Maybe this method isn’t really as accurate as I was hoping for. Or, more likely, people are posting lots of comments about how Linux fixed their wireless problems. Yeah.)

Check out your Pipes 2

While we’re on the topic of the Linux command line, I figured I’d highlight a useful tool that I accidentally discovered a few days ago. I don’t remember what I was searching portage for, but I happened across Pipe Viewer, or pv. From the website:

Pipe Viewer - is a terminal-based tool for monitoring the progress of data through a pipeline. It can be inserted into any normal pipeline between two processes to give a visual indication of how quickly data is passing through, how long it has taken, how near to completion it is, and an estimate of how long it will be until completion.

And using it? You just insert pv anywhere you’re piping data between processes — it simply passes the data from stdin to stdout — and you get a nice little wget style progress bar. For instance, I could insert it in Matt’s previous example, and I’d get something like:

# pv /var/log/messages | grep bumttwagnerfor \
>  | awk '{ print $10}' | sed "s/\[/ /g" \
>  | sed "s/\]/ /g" | awk '{print $2}'
94.5MB 0:00:03 [34.3MB/s] [=======>            ] 41% ETA 0:00:04

The only thing I’ve noticed is that you really need to be working with a lot of data to make the information it provides useful; most of the time the piping is completed by the time you even get any output. But for situations where you’re dealing with a lot of data (like log files), it’s golden!