Archive for November, 2006

Stop Windows XP Automatically Finding Printers

I hate all printers! Forever!

We’ve got three printers in the office:

  • A massive Xerox Phaser 7300
  • A fairly big Lexmark something or other
  • A tiny little Samsung whatsit

Last week we had a problem with the Xerox and it’s packed up until it can be serviced.

Then while we were waiting for a couple of new printers we ordered, the Lexmark ran out of toner leaving us with the crappy little one to print our thousands of pages of course materials on. Not good.

Luckily the new ones arrived and I got to spend all of yesterday either setting up or repairing printers. Woo!

Anyway, rant over, back to the point… I got in this morning and there was about 14 automatically detected shared printers. It’s slightly annoying because the shared printers I want, I installed and I don’t want another copy along with five others.

Quick look around Windoze Explorer and you can turn it off by:

  • Going to “Start > Control Panel > Folder Options”
  • Click on “View”
  • Un-tick “Automatically search for network folders and printers”
  • Click OK a dozen or whatever times

Just wish we had Active Directory so I don’t have to do it on every PC I use.

 

Apache Log Analysis

I’ve just had to do some Apache Log analysis for the various Find Locally domains. As all the sites are run off one server, the log files contain data from all the domains. This makes it a little difficult to get any meaningful information without having to analise each domain one at a time, but before getting to that, I’d have to get all the data into a format I could do something with.

After downloading the 140 Mb log files, I used M$ Access to import the delimited files and then used the MySQL ODBC Connector to export the tables into a MySQL database on my laptop (it’s a Core Duo and pretty much the fastest machine I have).

I then decided to get rid of the Bot traffic from the 5 million hits so I could be left with something usable. As Apache only stored the IP address of the remote machine, I sent PHP on a 12 hour mission to use gethostbyaddr() to store all the remote domains. This made it a lot easier to filter out known Search Engines and the like.

Having gotten rid of all the junk data and having it in a decent database, it made it easy to perform analysis on the remaining logs. As our domain names are all in the same format, using PHP made it easy to dump out a few tables of results showing exactly what I need. All I need now is to get it into a set of automated scripts so I don’t have to do it by hand next month.