nuxx.net
Making, baking, and (un-)breaking things in Southeast Michigan.

Category moved from livejournal

Apache Logfile Analysis…

(First, this is a test post from Semagic behind the work firewall…)

Okay, so I think I’ve got a good way of processing the logs from websites that I host. I’m going to document how I do it here for myself and anyone else who might happen to care.

First off, I’m using Apache 2.0, cronolog to handle log files (essentially rotation… but not), and Webalizer to parse the files and provide reports.

First, each Apache vhost is logged via a pipe to cronolog so that it makes subdirectories for Year and Month, naming the file with Year-Month-Day-access.log. For example, today’s file as logged below would be /var/data/wwwlogs/default/2005/08/2005-08-22-access.log. This is done by CustomLog and ErrorLog lines for each vhost which are similar to this:

CustomLog “|/usr/local/sbin/cronolog /var/data/wwwlogs/default/%Y/%m/%Y-%m-%d-access.log” combined
ErrorLog “|/usr/local/sbin/cronolog /var/data/wwwlogs/default/%Y/%m/%Y-%m-%d-errors.log”

That alone will make it easier to look through logfiles, should the need arise.

Next, a script is set to run once per night which first runs Webazolver on all the log files in order to build a cache of resolved hostnames and then runs Webalizer itself, using that cache. File processing is done with the -p argument in order to provide incremental parsing. As each log file should only be parsed once, the end result should be that each day’s set of data is added to the collective reports.

Here is the script which I call run_webalizer.sh and will run via cron each morning (around 12:30am local time, I’d imagine):

#!/bin/sh

# First, run webazolver to resolve all IPs
for i in /var/data/wwwlogs/*
do CURLOG=`date -v-1d +”$i/%Y/%m/%Y-%m-%d-access.log”`
/usr/local/bin/webazolver -Q -p -N 10 -D /var/db/webalizer_cache.db $CURLOG
done

# Run webalizer with all config files…
for i in /var/data/wwwlogs/*
do VHOST=`echo $i | cut -f5 -d\/`
CURLOG=`date -v-1d +”$i/%Y/%m/%Y-%m-%d-access.log”`
/usr/local/bin/webalizer -Q -p -n $VHOST -o /var/data/www/admin/webalizer/$VHOST -D /var/db/webalizer_cache.db -N 10 -r $VHOST\/ -s \*$VHOST $CURLOG
done

Well, hopefully some people will find this useful. It appears that it’ll work fine for now. I guess I’ll know for sure after a few days…

computersmoved from livejournal

Beer #8 – Random Vanilla Stout

So, after getting home from work today I decided to fire up the turkey fryer I had purchased back in December but never put to use. Now that summer is getting a bit cooler, I figure it’ll be fine for me to use it to boil some beer. Well, I calibrated it (at 5, 5.5, 6, and 6.5 gallons) and then picked a spot to do the boiling at. It turns out that the best spot will be just off of my front porch on the sidewalk. I had initially fired it up in the garage, but at maximum flame it kicks out a ton of heat, and I’m also worried about carbon monoxide. I’m probably just being paranoid, but it seems better this way.

So, if things go as I hope, come Saturday or Sunday (it’ll be cooler Sunday… Hmm…) I’ll make up a batch of something I’m currently calling Random Vanilla Stout. suggested that I make a vanilla porter, but I’m wishing to go even darker, so a stout it is. I hope he still likes it. Hell, I hope I like it… I’ve only been shooting about 60% with my beers thus far.

Anyway…

I’ve also started to use a piece of software called Promash for my brewing calculations. It really makes everything very, very easy. Also, playing with the numbers in a piece of software really gives one a better understanding of how things fit together behind the scenes.

After creating the recipe I went ahead and exported it. So, if you’d like to see the recipe, take a look here.

Thus far it’s planned to be a 52.8 SRM beer and 45 IBU. This will be extremely dark, somewhat bitter, and will hopefully, thanks to the addition of two vanilla beans in bulk conditioning, have a nice underlying vanilla flavor.

So, yeah… That’s it. Hopefully it’ll go well. My attempt to buy the ingredients today didn’t go so hot, but that’s because I had forgotten that today is the one weekday I can remember which Cap’N’Cork is closed. This was so they could attend some sort of event or festival… Ah well. I’ll go tomorrow.

beermoved from livejournal

rsync -E on OS X 10.4

[Cross posted to and …]

Hey everyone… I hadn’t seen this mentioned yet, so I thought I’d bring it up. In short, I’m writing a new script for backing up everything on both my local computer and my web server. Well, I use rsync for this, and when poking through the rsync man page, I came across the following:

-E –extended-attributes copy extended attributes, resource forks

So, yeah. That’s yet another nice new thing about Tiger… In the past (I wrote this up before but I don’t have the link handy) one had to install RsyncX and use the undocumented –eahfs option and now you can just use -E. Woo!

computersmoved from livejournal

Bottles’O’Urine

So back in early April while at a theater in Ann Arbor I happened to come across an absolutely completely full bottle of urine. I found it to be a curiosity, so I snapped a picture of it and uploaded it to my moblog.

Fast forward to today, and while watching the log files for nuxx.net I happened to see a referrer from this site, which is the first actual use I’ve seen for that picture. (Scroll down about 4/5 of the way…)

The writer is talking about how to determine bad traffic areas, and they write:

You see, as we were driving the early part of the CBE, we began to see bottles of refreshing Aquafina and Poland Springs and Dasani and other popular brands of water lying by the side of the road filled with a suspicious liquid of different shades of yellow and gold. What I now know is that when there are multiple water bottles full of urine lying on the side of a road – thrown there from car windows – this is NOT the road you want to take if you need to get anywhere in a hurry.

So, Mr. Dave Nalle, thank you for finding an actual use for my silly, silly photo of a bottle of urine. While I don’t completely agree with his analysis (I tend to see these bottles in more rural area where there often isn’t bad traffic) I do think he’s got a valid point. If there are lots of these bottles along the side of a highway, there’s a good chance it’s often backed up.

On a side note, maybe it’s just that I’ve been noticing it more often, but I’ve been seeing similarly full bottles all too often. There was one just outside of the driveway at my condo, one on a random corner I noticed en route to work, and I saw one along the side of I-75 last time I drove it as part of heading to Ann Arbor.

It’s just really an interesting thing… I guess urinating while driving isn’t something I’d thought of. I’d rather just pull over, stand in a somewhat sheltered area, and go.

found thingsmoved from livejournal

Thanks, Google!

Wow, it’s interesting what kind of stuff one stumbles across when searching Google for network information: http://www.usmc.mil/maradmins/maradmin2000.nsf/Date1?OpenView

And here I was just Googling for info on SIPR (Secure IP Routing) with the string “sipr dod”.

computersfound thingsmoved from livejournal

Photo Rights…

Yesterday I received a piece of email from a film production company in Toronto asking if I’ll grant them rights to use this photo in a documentary they are making “…about the archaeology of the birthplace of Jesus: the well known Bethlehem.”

The company is AP LTD/ TSU Productions who is located somewhere downtown along Spadina in Toronto. I’m also not sure of any of the details of this documentary nor why they would be interested in such a poorly shot photo (it’s just a random snapshot from when I was wandering around Frankenmuth alone one day), but they do. < shrug >

Digging a bit further, one of this company’s previous works is The Naked Archaeologist which looks like it might actually be interesting. Actually, looking at the dates of this show, this photo might be wanted to be included as part of this series. The aforementioned press release is only from two weeks ago, and it looks like the series isn’t complete yet.

Hmm, I guess I will let them use it… No reason not to…

Now, to figure out how to communicate the release back to them in the most efficient manner.

UPDATE: Hmm, the number to fax the relese to is for the Riverdale Jewish Community Center. Interesting…

found thingsmoved from livejournal

Learning…

Tonight’s shiny happy lesson?

Denatured alcohol is not the same as isopropyl alcohol.

This because readily apparent when the $6 can of denatured alcohol that I just purchased failed to remove the label adhesive from some PVC pipe, yet the isopropyl did the job in seconds.

Doh.

making thingsmoved from livejournal

Beer…

Well, now that the wheat berry ale is bottled, I’m starting to think about making another beer. I probably shouldn’t, as I have six cases of beer actively aging. That said, I’m really wanting to make something else… I’m thinking a stout or vanilla porter. Hrm.

beermoved from livejournal