I suppose I had this coming. Without enough time to really sit and tinker with my desktop, I missed one crucial setting that I usually don’t overlook: Windows’s power saving functionality. What’s the moral of the story? Make sure that your computer running on RAID isn’t set to turn off its hard drives after 20 minutes. (for those who might not remember my problem, I gave more detail a few weeks back)
Boy oh boy, I feel like a dummy!
I probably should have gone to the trouble of figuring all this out back in February when I first rebuilt my desktop, but free time is something I haven’t had a lot of this year. It all started when I upgraded my X38/Q6600 based computer to a platform which could support more memory. The Intel 6 series debacle surfaced the day I was sitting down to order my parts, so I decided to go a generation back not knowing how long the recall and re-release would take. No complaints though, as I grabbed myself an i7-950, Gigabyte X58-UD3R, and 16GB of G.Skill RAM.
When it finally arrived I threw it all together and booted my Ubuntu partition: Everything worked. I then set about re-installing Windows and again, everything worked (unfortunately I had to install the network drivers from the included CD, that kind of sucked!). It was one of those tumultuous times in my life where I needed to use Windows so I set it about whatever task it needed to do and went to sleep. I woke up the next morning to a frozen desktop. Not cool. I memtested my RAM again and again convinced this was the source of trouble, but time and again it checked out fine (not to mention that it was rock solid in Linux). This went on until about a week ago when I finally got the blue screen I had been waiting for. It referenced the M-Audio driver for my [pretty old] MobilePre USB. I immediately backed up a few databases and re-installed Windows. Thankfully, Windows 7 used the standard audio over USB drivers and I’ve been rock-solid ever since.
Of course I don’t have the money or extra hardware around to test this, but I do have a theory as to what the issue was. The Gigabyte board I purchased used a number of non-Intel components, including NEC supplied USB 3, Realtek networking, and an apparently strange implementation of SATA 3. My guess is that, since none of these are integrated into the southbridge, one of them was interfering with something in the USB firmware supplied by NEC. Then again, since I’m not having this problem anymore hopefully this is the last time I need to give it too much thought
Over the past few months, I’ve been making significant progress on the Betaville Web Service (written in PHP, returns JSON responses). This has become a major point of focus as of a few weeks ago when we decided to convert the current Betaville website from a largely broken Ruby-on-Rails site to a new PHP site that makes use of this service.
With an increasing number of people working on both the service and the website I’ve written a short tutorial on getting the service set up for yourself. If you’re interested, give it a try
I recently wrote a quick blurb on how to get a load balancer setup quickly and easily under Red Hat Enterprise Linux, but this morning I found myself needing to do some work on a train where my internet connectivity was shoddy at best. I thought I’d remembered reading on the website that Balance worked on OS X and other Unix-like operating systems, but no directions were provided. Luckily, the standard commands worked out pretty well and it was quite simple to get running.
Download the latest version of balance from here (3.54 as of writing)
tar -zxvf balance-3.54.tar.gz cd balance-3.54 make sudo mkdir -m 01777 /var/run/balance
This completes the setup of balance, now its just a matter of running it. Examples of use can be seen in the excellent PDF that they’ve included with their distribution as well as in my earlier post on how to get setup in Red Hat
After spending roughly 36 hours trying to get the combination of heartbeat and ldirectord to cooperate, I threw in the towel and went in search of something simpler so I could test my code without becoming a full-time Linux Administrator. Introducing Balance, an easy to use load-balancer that won’t make you crazy. Before we get started, just a quick note to you Ubuntu users out there: The balance package available from the repositories as of the time of this writing is out of date and has a bug that seems to cause non-IPv6 addresses to fail (bummer).
Now then, if you’re on Red Hat, you will want to use the EPEL repositories from Fedora (setup instructions here)
su root yum install balance exit # Bind port 80 on the localhost to port 80 on servers 1 and 2 # The -f option will keep the process in the foreground balance -f 80 server1.example.com server2.example.com
Was that simple or was that simple? For more specific options, the man page for the software is very informative and explains, with examples, how to perform most tasks.
I’m still learning my way through Red Hat Enterprise Linux, and today went looking for htop. Unfortunately, its not quite as easy as installing through yum from the default repositories, so we must dig a bit deeper. By adding the Extra Packages for Enterprise Linux (EPEL), provided by the Fedora Project, to the repository list, we can then install htop, as well as a number of other great packages.
# as root rpm -Uvh http://download.fedora.redhat.com/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm yum install htop
I give the city an enormous amount of credit for the GIS data that they make available online. Unfortunately, the city’s love affair with Esri’s ArcGIS means that its spatial reference system (SRS) can be difficult to identify.
Fear not, however, as a quick trip over to one of my favorite websites ever, spatialreference.org, can help you find a corresponding EPSG code. The available conversions are invaluable for anyone interested in geospatial data. Simply give the site the contents of your .PRJ file or the projection’s well-known text (WKT) and you will get back that magical identifier.
Ah, and if you’re looking for the reference system that New York City usually uses then you’re probably looking for EPSG:2263
Here’s a neat little script I whipped up this morning to give me some real time information on what my desktop’s load temperatures are. Please note that this requires lmsensors to be setup for your box.
#!/bin/bash while : ; do sleep 3 clear sensors | grep Core done
If you don’t have lmsensors setup, its pretty easy to do in Debian/Ubuntu
sudo apt-get install lm-sensors
And then run this to set it up:
Edit: Our good friend Torben has very wisely pointed out that this could actually be much simpler using the watch command. Thanks Torben!
watch -n 3 “sensors|grep Core”
Here’s a nasty little annoyance I get whenever I install/reinstall Eclipse on an Ubuntu box: The Ctrl+Alt+Down keybinding to copy a line down doesn’t work!
Luckily, it indeed works but is being blocked by part of the default Compiz configuration that ships with Ubuntu (and I believe has been being shipped since version 7.10).
# The application is installed to the System/Preferences menu sudo apt-get install compizconfig-settings-manager
If you install the CompizConfig Settings Manager (see above), the binding can be disabled in Desktop Wall -> Bindings -> ‘Move within wall’ -> ‘Move Down’. Notice also that the ‘Move Up’ option blocks Eclipse’s default mapping for the copy line up command as well so it may behoove you to disable or change that setting too.