Shlrm.org Blag

Linux

UPS failure graphs

by David Kowis on Jul.26, 2010, under Linux

There was a lightning storm recently and the silly Arc Fault Circuit Interrupters in my house tripped off the power in most all the bedrooms, except the room my desktop was in. And so the UPS tanked, because the batteries are old and lose their charge very quickly. The graphs are logged using Cacti, and using a template/polling logic that I built using the mysql-cacti-templates project.

I really should replace the batteries in this guy (freaking sweet UPS by the way, highly recommended) so he’ll last more than a few minutes.

A friend of mine did a bit more controlled test of his UPS and here’s his blog post with graphs also.

I have zoomed the graph a bit more to get more detail on the last 20 minutes of my servers uptime.

I find it interesting that the UPS temperature actually dropped when the thing was on batteries. I remember reading somewhere that the fan only runs when the inverter is actually active, so I guess that would make sense. I also find it interesting that the input frequency never changed, perhaps the UPS only records that value once every now and then, and doesn’t update it. I would think that with 0 input voltage I wouldn’t have any measurable frequency either.

I wonder if I could/should get those AFCI breakers replaced. They tend to not keep my computers on when there’s a lightning storm, and the only way to turn them back on is to go into the garage and flip it by hand.

Leave a Comment :, , more...

A refreshing new perspective on init systems

by David Kowis on Jun.23, 2010, under Linux

I used to think that Upstart was the wave of the future regarding new init systems.

Boy, was I wrong. Not that upstart is “bad.” Just that there’s something much better.

This actually makes things better instead of just providing the ability to make things better. It involves less shell, and more configuration. Dependencies are automatic, instead of manually specified. The author of the previously linked post goes into great detail regarding the reasoning behind the decisions made. It’s quite a good, albeit long, post.

I think I will have to get this working on my linux box that I intend to build. Possibly even on my laptop, as the features for enabling and disabling bluetooth would be quite advantageous. Also for the wifi and such. It’d be great if when I fired up the bluetooth, it were to start various things, like trying to connect to my mouse, or enabling the obex ftp thing.

As for a server, it’d be really nice to have if I can ever get my fibre channel setup to work. The Xen VMs won’t start until the Fibre Channel drives are available, and then they’ll all start up. Events could be fired depending on when the UPS was online or on battery.

I’m very impressed with it in concept, I’ll have to see how it goes in practice. Oh, and it’s going to be in Fedora 14. Woot.

Leave a Comment : more...

Building ruby 1.9 on Fedora 13

by David Kowis on Jun.19, 2010, under Ruby, fedora

Was harder than it should’ve been. I got annoyed.

You need to install openssl-devel, zlib-devel, bison, gcc, make, patch, tar, and maybe gcc-c++ (although I don’t think this one is needed).

Go get the latest ruby 1.9 source, as of this writing 1.9-p378, and extract it somewhere. Then go get the patches on this bug, at the specific comment. You will need to apply at least the openssl-build-fix patch, since fedora uses openssl 1.0 and it’s not yet into ruby 1.9. Then follow your typical ./cofnigure, make, and make install stuff. I installed mine into a prefix of /opt/ruby so that it wouldn’t affect any fedora ruby stuff that it might want. I then added ruby’s path to the end of my user’s PATH variable.

That’ll get you a working ruby 1.9 in Fedora.

Leave a Comment :, more...

OpenVSwitch

by David Kowis on May.20, 2010, under Linux

This is some interesting technology. Apparently it allows me to emulate a switch on my server such that I can get netflow information, and other such managed switch information, from my virtual machines on my xen box. I will have to build and implement this on my test xen box to see how difficult it’ll be to get it to behave.

I also like that it claims it can distribute across multiple hosts (‘claims’ because I haven’t verified it yet.) I wonder how difficult it will be to set up a switch that extends to my router, so I can just emulate my entire network’s switch in OpenVswitch. It’s certainly got some interesting potential.

There’s potential to get better information on the traffic happening in my network thanks to the netflows provided by this. Maybe it will be enough information to figure out why my traffic shaping doesn’t work well, and how I can improve it.

Leave a Comment :, , more...

WRT FAIL

by David Kowis on May.12, 2010, under Linux, Source Mage

I had posted previously about setting up a WRT54G-TM running OpenWRT to be the router for my network. I thought it would be the perfect router, low power consumption, low heat, no moving parts, and wifi included. Unfortunately it did not work well at all. My advanced traffic shaping configuration killed the poor thing. 200MHz is apparently insufficient hurtz to handle the largeĀ  number of interrupts for packet processing and marking. I was told it might be a driver issue, but I wasn’t aware of any other drivers that I could have loaded to offload those interrupts. So the system spent > 70% of it’s CPU time in System IRQ handling. When it was under heavy packet load, something the original router setup would’ve handled without batting an eye, it would drop connections and eventually die. It wouldn’t respond to pings, nor would it forward traffic adequately. NAT + Traffic shaping + bittorrents = DEATH. Not to mention that syslogd eventually threw the thing into a kernel panic. Oh, and the b43 driver also panicked the kernel soon after turning on the wifi.

So I’m back to the original setup, with an old (1998) left-over 2GB hard-drive, and a modified Source Mage install. It’s in good shape, with some tmpfs stuff for things that write to the disk in order to hopefully prolong the life of the disk. I took a clonezilla snapshot of it as well, so when the drive dies, I can throw in a new (also old, I have several 2 to 4 GB drives that are in the closet that still work) one, and the router will be back up in a few moments.

Whilst it was unfortunate that the router wasn’t a good fit for my particular use, perhaps I’ll find another use for it. Since there are two Serial ports trivially accessible on the device, perhaps I’ll get a GPS module and set it up in the car as a mobile automatic war-driving toy. I’ve found instructions to hook up an SD card to it as well, that would give it plenty of easy to replace storage.

It was an interesting experiment, and I’m somewhat sad it didn’t work out.

Leave a Comment :, more...

Archives

Hacker’s Diet

The Hacker's Diet Online