The Cranky Sysadmin

May 25, 2009

Bluetooth GPS with Ubuntu 9.05

Filed under: System Administration — Cranky Sysadmin @ 12:09 pm

While going through my junk throwing stuff out or making excuses for not throwing stuff out, I came across a bluetooth GPS unit which I had forgotten about. This unit is the Holux GPSlim 240. It’s compact and it picks up sattelites pretty quickly. I decided to try connecting it to my laptop which runs Ubuntu 9.04. The most useful references I found were this Ubuntu forum post and this post for a holux specific problem. Below are the steps I took to get everything working:
Keep Reading about Bluetooth and Ubuntu…

May 5, 2009

Where are the blue lights?

Filed under: System Administration — Cranky Sysadmin @ 10:12 am

Last night, my wife mentioned that she didn’t see the usual blue light in my closet…. Oops! Apparently, the power went out and the server on which this blog resides died. I still haven’t attached an APC, so every power fluctuaton brings the server down. I should add that to my list to fix.

April 28, 2009

Ubuntu 9.04 and EVE-Online

Filed under: Eve-Online,Games,System Administration — Cranky Sysadmin @ 2:21 pm

Below is a description of how I installed Ubuntu 9.04 from scratch and got EVE-Online,
EVEMon, EFT, and Ventrilo working.

System:
Dell XPM M1710.
4GB RAM
Intel 3950 Wireless
Nvidia 7950 GTX 512 MB
New 5400 RPM 250GB Segate HD.

Go to the boot menu (F12 on Dell) and select CD-ROM boot.
Choose your language at the Ubuntu language picker. The second boot option is install. Pick
that. From here, you can probably pick the defaults and end up with a reasonable base
system. I chose to partition my hard drive using the advanced partition option.

My setup:
50GB root ( / ) partition
8GB swap
The rest for /home

After the first reboot, I only showed 3.3 GB of RAM with the generic 64 bit kernel. This was
surprising and a little disappointing. I tried to install and use the server kernel, but the
video drivers won’t work with that kernel, so I’m stuck with losing 700MB RAM. Wifi worked
out of box. I updated the system and attempted to enable the nvidia proprietary drivers.
They didn’t show up in the hardware drivers list until after a reboot, so….

Reboot ubuntu. Go to System/Administration/Hardware Drivers in the main menu. Select the
newest nvidia driver (it should be the “Recommended” driver) and click “Activate”. This wil
require another reboot. After the next reboot, you’ll want to set your resolution. It’s
best to do this as root so the configurator can save the X config file permanently, so run
this:
$ sudo nvidia-settings
Select X Server Display Configuration on the left. Set the resolution to the one desired and
click “Apply”. Click OK to accept the resolution. Then click “Save to X Configuration File”
to make the settings permanent.

Wine which comes with 9.04 is ancient (1.0.1). I compiled the latest as of
now (1.1.20). I had to patch the source to make the 3d models visible in EVE.
1) Spark up a terminal window and run:
$ sudo apt-get build-dep wine
to get the compiler and other stuff needed to compile wine.
2) Get the source from http://winehq.org in the right nav area of the site.
3) untar the source with:
$ tar xf wine-1.1.20.tar.bz2
4) $ cd wine-1.1.20
5) I need the patch from http://bugs.winehq.org/attachment.cgi?id=20412
save it where you untarred your source for wine and run this from the
wine-1.1.20 directory:
$ patch -p1 < ../apocrypha.shaders.1.1.19.patch
6) $ ./configure
7) $ make depend && make
8) $ make install
9) go do something else for a long while.
10)install cabextract:
$ sudo apt-get install cabextract

EFT installs and works out of box.
Ventrilo installs and works out of box.
EVEMon requires dotnet 2. Install that by using winetricks. Get winetricks from
http://www.kegel.com/wine/winetricks (save page as winetricks).
To run it, do this:
$ sh winetricks
Select core fonts (needed for EVE) and dotnet2. dotnet2 takes a long while to
download and install.

You can now use the offline installer to install EVE. You will lose all of your settings
from windows. I’m sure you can copy the settings folder from a windows partition, but I
didn’t test this.

If you run 2 clients, you’ll want to do some further setup. First, set the graphics in EVE
to windowed mode and at some lower resolution then your whole screen.
Make 2 icons for EVE. The Commands for each should look like this:
env WINEPREFIX=”/home/jjorgens/.wine” wine explorer /desktop=1,1600×1050 “C:\Program Files\CCP\EVE\eve.exe”
env WINEPREFIX=”/home/jjorgens/.wine” wine explorer /desktop=2,1600×1050 “C:\Program Files\CCP\EVE\eve.exe”
Adjust the resolution to be the same as you set in the game. Run one launcher for one account, and the other for the other account.

Strangely, if I run the game with the graphics at full tilt, the laptop will overheat and
shutdown after about 10 minutes of play. After turning the graphics all of the way down,
the game runs fine. I needed to use these low settings for when I am in fleet engagements
anyway, so it’s no loss for me.

February 24, 2009

Ventrilo, Wow, and EVE Online under linux

Filed under: Eve-Online,Games,System Administration,World of Warcraft — Cranky Sysadmin @ 11:42 am

I use linux for everything computer related these days. My laptop has a windows partition which I never use except to reproduce some Windows XP problems I come across in my work as a sysadmin. The distribution I use these days is Ubuntu 7.10 (Gutsy Gibbon). It’s a little long in the tooth, but I see no compelling reason to upgrade yet. I’m also a gamer. When I want to go buy a new game, I go visit WineHQ and verify how much functionality there is under wine. For the uninitiated, wine is the linux way of running windows applications. It’s not perfect, but it does an admirable job in a lot of cases.

I won’t go into detail on how to run wine as there are plenty of web sites which will help you with this. I will give some tips about some of the issues I’ve run into which aren’t necessarily covered in the install guides at WineHQ or other support sites. I currently run wine 1.1.15. This version needs to be compiled from scratch since it’s not part of any distribution yet. It’s not hard to do and WineHQ has good instructions. Ubuntu 8.10 comes with a fairly new wine, so if you’re looking for something which works out of the box, that’s a serviceable choice.

Who should run games on linux? If you’re a sysadmin, or are comfortable with the command line in a linux environment, then you have a good shot at success. If you’re new to linux, you’re probably in for a steep learning curve. The instructions at WineHQ are complete in many cases, but they will seem arcane to the uninitiated.

ATI Video cards: I always had many problems in the past when I tried to use wine with ATI video cards. In the past, the 3D support has been pretty poor for linux. Judging from the comments on WineHQ, the situation hasn’t changed much up to now. I have had good luck with Nvidia cards.

WineHQ: On WineHQ, there is a tab at the top of the page labeled “AppDB”. You can browse this section to find info about whatever you may want to run under wine. The search also seems to work well. Use this to look at the various application entries and comments about various problems and fixes.

Ventrilo: I’ve had some issues getting ventrilo to consistently run well. My guild in WoW and my Corp in EVE both use vent, so I have to suffer through. I’ve had the best luck with OSS set under winecfg. This is probably why I have to disable sound in WoW. I suspect I’ll have to do the same with EVE. With ALSA set, I get the event sounds, but no voice under Vent. I’ll update this when I get ALSA working properly. Push to talk works for me if I enable “Use Direct Inut to detect Hotkey”.

WoW: For me, this has worked mostly out of box for a long time. Follow the instructions on the WineHQ AppDB site and you should be good to go.

EVE Online: The classic content linux client from the EVE Online site worked fine for me. This is being discontinued when the next expansion comes out, so I’ll talk about the premium client. The install seems to work fine. Occasionally, the splash screen will pop up and the game won’t start. I have to kill the process when this happens. Up to now, the premium client locked up frequently if sound was enabled. I read on a forum that disabling hardware acceleration fixes that. I’ll try that tonight and update this post if it works. EVE without sound is ok, but I’d like to get it working. Again, if you follow all of the instructions at WineHQ, things should mostly work.

January 5, 2009

The Cost of Checks

Filed under: Programming,System Administration — Cranky Sysadmin @ 10:14 am

I read an interesting article by Paul Graham about the cost of checks in an organization. Checks in this case refer to things like comprehensive QA of a product or feature before release. Paul’s premise is that all checks have a cost and some of the costs are surprisingly high. I tend to agree, but I also see things through the lens of an operations guy. When I release a product that has gone through no checks (I have been told to do this), there is a high probability that something will break. In many cases, the breakage can be crippling. I think there is a good chance that some checks will actually make a company more nimble, especially as a code base grows in complexity and more people depend on your product.

If a company spends as much or more time fixing the problems caused by a release as they spent on the release, maybe some checks need to be put in place to cut down that wasted effort. The problem is finding a balance where the check costs less then this extra effort and pain.

Maybe unit tests help. People who do unit tests seem to have different opinions about how effective they are. Some say that it causes them to take twice as long to write the code. Others say it helps them write the code faster since they have a codified requirement.

Automated testing is another thing that can make the release process better. There is a large cost associated with this in many cases though. You need a highly qualified QA guy who knows how to program and knows the product to write the tests. If he’s that good, maybe his time is better spent helping build the product (if this is a small organization). Could the automated tests be written by the group who develops the software? Sure, but it will slow down “real” development work.

I think the real problem is that as complexity increases, the need for checks increases. Eventually, one gets to a point where progress is ponderously slow. What do you do about this? Well, all of the solutions that I know of are bad in some way. One has to make a choice between pain and searing pain.

  • Keep it simple. Simple systems are easier to check and there is less risk in changing them since they’re easily understood.
  • Keep it small. This is really a subset of simple. If you have 5 simple systems (like web servers), you’ll have an easier time managing them then if you have 100 simple systems.
  • If you can’t keep it simple, only make it as complex as it has to be. This means managing customer expectations (which no one wants to do in my experience). Make sure the system isn’t more complex then your developers and operations staff can manage.
  • Don’t let complexity creep up on you. Know that it’s coming and plan for it. Know that your costs will rise as the complexity rises. Find ways to make the cost rise as slowly as possible.
  • If you have to have complexity, automate the heck out of everything you can find. This is easy to say, but if the system has grown so complex that all you do is fight fires, then you won’t have time to automate unless you are willing to accept a lower level of service for the time it takes to automate.

I am learning these things the hard way, so I don’t know of any elegant solutions to the problem of complexity which go beyond what I’ve already mentioned. Maybe after a few more startups I’ll have more useful advice then, “Watch out! You’re headed for a big bucket o’ misery!”

December 12, 2008

Blog outage

Filed under: System Administration — Cranky Sysadmin @ 10:37 pm

As I’ve mentioned before, the server which hosts this blog resides in my closet. Last night there was a power outage which lasted until a couple of hours ago, so blog.2gn.com bit the dust during that time. My apologies for any inconvenience this may have caused.

December 9, 2008

What One Learns from Web Logs

Filed under: System Administration,World of Warcraft — Cranky Sysadmin @ 8:43 pm

This post is only peripherally related to WoW, so if you need WoW info, look at some of my other posts. If you’re interested in web traffic and how to analyze it, you may want to look elsewhere too, but that is the topic I am learning about now. If you run apache on your own server, you may want to consider an upgrade from the venerable webalizer or manual log analysis to awstats. It’s free, and runs on most unix flavors. The instructions even state that it will run on windows and parse IIS logfiles. Awstats is capable of slicing and dicing your logs in many meaningful ways so you can count visits, pages per visit, time visited, user-agent metrics divided by month, day, and hour. Many of the metrics are probably inaccurate like time visited, but they are still interesting metrics if you take them with a pinch of salt.

What have I learned from looking at awstats for blog.2gn.com? Well, the main search terms folks use to get here ,largely from google, have to do with shaman preparing to get into naxx. I’m trying not to use key words which will mislead search engines about this article right now, so I won’t list the whole pile of keywords. I’ve learned that there are some regular readers, and most folks add something on this blog to their bookmarks. I don’t know how awstats tracks that and I suspect it’s inaccurate, but it’s nice for the ego. I’ve also learned that there are enough readers so that I should pay more attention to the uptime of the server, which sits in my closet.

I am using awstats to decide how much time to spend on this blog, where I should consider expanding (I like hunters, but they are covered well by BigRedKitty). I am also considering advertisements, especially in this economy. I’ll probably experiment by writing articles on paladins, and death knights if I feel I can contribute something.

Writing a blog is an interesting hobby. I recommend it. Writing a good blog is probably beyond my skill, but I’ll try.

June 8, 2008

That Which is Measured…

Filed under: Navel Gazing,Programming,System Administration,World of Warcraft — Cranky Sysadmin @ 11:59 am

Lately I’ve been doing a lot of pickup groups in World of Warcraft. If we’re doing something hard, those that ask what my healing bonus is seem to do the best. If no one asks me about it, the outing almost always ends in disaster. In my work experience, small companies which measure their performance and their team’s performance seem to do better then those which are fast and loose with metrics.

The Hawthorne Effect describes a situation where merely measuring workers improves their performance for a short period of time. I think something similar, but better is going on with WoW pickup groups and small companies. If you’re willing to measure yourself, you’re more willing to learn to perform better in fundamental and permanent ways. Can measurements be gamed? Maybe they can. In WoW, I will forgo other stats to bring my healing bonus up. This is probably not great for my long term raiding viability, but it is the one thing that other non-healers know how to measure. Fortunately, in WoW, there are ways to cover up the slack in some of my stats. I can eat buff foods, and drink elixirs to cover up my woefully low stamina for instance. For me, this leaves a guilty voice in my head that says I’m not measuring all of the stuff I need to, so yes I’m beginning to look for gear with more stamina and mp5 so I can stay alive and contribute longer.

In real life, I hate being measured and measuring myself. I’m a fat-body because I don’t like to get on the scale. I’m not a great programmer because (among other reasons) I’m not willing to profile my work and measure it against the good works out there, or against any performance goal. I just want to slam in the code and pray that it works. As a sysadmin, the idea of measuring my work by the number of warnings and alarms that nagios produces annoys me, but if I make good alarms, they are actually a passable measure of how stable the system is.

So what do I have to do? I have to think briefly about whether I’m measuring the right things about myself and then start measuring.

May 24, 2008

A more stable home for blog.2gn.com

Filed under: System Administration — Cranky Sysadmin @ 10:58 am

I’ve been running blog.2gn.com on a server in my office which was connected to a wireless bridge which connected to the wireless router. Well, the bridge occasionally died, which would cause blog.2gn.com to go off-line. This morning the bridge finally gave up the ghost, so I moved the server down the hall to my closet and attached it via a real network cable to the router. Hopefully, the long outages are a thing of the past. If I were more interested in uptime, I’d go get a UPS for the occasional brownouts that happen here. This blog is just a hobby though, so no such luck.

For those that are interested, the “server” is a micro-itx motherboard with a 1.5 ghz c7 via chip in a case the size of a shoe box. It has 1 gig of memory. It is a quiet server or my wife wouldn’t allow it in the bedroom. This server is perfect for my experiments in web technologies if I can ever break myself away from World of Warcraft.

November 28, 2007

Analysing Apache Web server response times

Filed under: Programming,System Administration — Cranky Sysadmin @ 11:51 am

Apache logs a lot of useful information about each request in the access logs. By default, it doesn’t include response times for each request, but that’s easy to remedy. In your httpd.conf, find the line that looks like this:

LogFormat “%h %l %u %t \”%r\” %>s %b \”%{Referer}i\” \”%{User-Agent}i\”" combined

and replace it with:

LogFormat “%h %l %u %t \”%r\” %>s %b \”%{Referer}i\” \”%{User-Agent}i\” %D” combined

The %D appends the response time to the end of the log line. After you have collected some hits with response times, you can use a perl one-liner to look at timestamps and response times like so:

tail -1000 access_log|perl -ne ‘chomp; split; $_[3] =~ s/^\[//; print "$_[3] $_[$#_]\n”;’

replace tail -1000 with whatever number of log lines you want to look at. I use some GNU date magic,  perl’s GD:Graph, and some shell programming to build a graph of average and high response times over the last hour. For now, I leave this as an exercise for the reader. GD::Graph is a great tool for visualizing all kinds of data where rrdtool may not suffice.

« Newer PostsOlder Posts »

Powered by WordPress