Setting up a DRAC card using Debian

Today I was faced with the problem of setting the IP address of a DRAC (dedicated Dell Remote Access Card, which are super by the way, and a lot lot quicker than Sun’s effort) in a Dell server that was powered on, running something production on the Debian OS, and I had no physical access to the server, so no rebooting for configuration was possible.

Now, if you have an idea of what IP address is on that card already you can talk to it remotely which isn’t a problem. The problem was, I had no idea what the IP address was currently set it to and it wasn’t DHCP. Even so, I had no copy of the racadm command, the Dell tool to control the card. (omconfig is available on Debian now which is nice, but omconfig bmc is a deprecated command and indicates to use racadm!)

Let me tell you how to set the IP address with just a simple install of Debian and little effort. (I’m sure this on the internet somewhere but I had difficulties finding it. I expect my Google-fu was weak today.)

Install IPMItool from apt:

apt-get install ipmitool

Load the IPMI driver into /dev/ so we can talk to the card:

/usr/share/ipmitool/ipmi.init.basic

You can now print the current config of the card:

ipmitool lan print 1

Set the new IP address up, if you want to configure it manually:

ipmitool lan set 1 ipaddr 172.0.0.10
ipmitool lan set 1 netmask 255.255.255.0
ipmitool lan set 1 defgw ipaddr 172.0.0.1
ipmitool lan set 1 ipsrc static

Or set it to DHCP if you want:

ipmitool lan set 1 ipsrc dhcp

Check your settings:

ipmitool lan print 1

Reboot the DRAC; You may not have to do this, I did (and/or I’m impatient)

ipmitool mc reset cold

Within a minute the card should be up and responding to ping. Hurrah!

Note: I tried these on a DRAC4 card, and whilst it looked like it was accepting my instructions, it seems it was infact completely ignoring me. I had to configure this one manually in the BIOS. These commands work fine on a DRAC5 though.

Finding a Web Browser for constant page reloading

One of the things I have done whilst working at Last.fm is create a simple system whereby critical monitoring is displayed on screens that we have hanging from the ceiling. There is one in each corner of the room, and opposite monitors display the same thing (e.g. two monitors display our key Cacti graphs, and two display Nagios monitoring output, so everyone in the room can see it). This is achieved through a simple dual output graphics card, and a couple of two-way monitor splitters (and a lot of cable!)

The software itself is simple: The data is displaying using some PHP scripts written by myself specifically for output on these 22″ screens, and are hosted on our servers, so all that is required to display them is a web browser.You can see these two pages in action here (Naglite2) and here (CactiView)

Very simple, or so you would think. The problem is, with the nature of this data, it needs to be refreshed constantly. The graphs are in a rotation controlled by a Javascript frame that changes to a new URL every 20 seconds, and the services/host up/down notification screen updates with a meta refresh every 5 seconds. Again, sounds pretty simple. Here are my findings:

Initial Configuration – Ubuntu Linux with Firefox 3

Being my browser of choice anyway, I set everything up in Firefox to start with. We figured Linux desktop would be more stable for hosting this rather than Windows. F11 to fullscreen mode on both the monitors, and off it goes. We didn’t notice it too much at the time, but it’s pretty annoying the way it deals with the refreshing of the images.. It clears the page, and loads the images one by one, leading to a noticable flashing of the screen every time it reloads the page. Not only that, it was the worst browser we used, leading to 90% RAM usage (on a 2gb machine) after just a day. At this point, not only did it become very sluggish, but it would stop displaying the graphs randomly, and eventually ending up in severe corruption of all the images, mixing them together in an interesting fashion. Connecting via VNC every day and restarting Firefox became a bit of a chore, so we decided to give up and try something else.

Second configuration – Ubuntu Linux with Opera

Straight away Opera was performing much better than Firefox. It seemed to almost pre-load the images for the next set of graphs before it refreshed the page, leading to no flickring of the screen, just seamless re-loading of the page. It also managed a week before showing any signs of slowing down, but after that point the graphs started disappearing again. Opera had suffered the same fate as Firefox… Using all the memory available on the machine.

We also had another little problem.. We have the time printed in the bottom right of the screen (as text rather than an image) and even by forcing cache control headers, Opera was caching the pages. The clock would move between 5-10 minutes as each graph appeared. I discovered that Opera has some advanced preferences that lets you disable the cache completely. Whilst this fixed the problem with the clock, it meant that it then only survived 2-3 days before exhausting the memory usage. We put up with this for a number of months, before deciding to move on.

Hello Webkit

At this point, Russ and I thought it was about time we gave a Webkit based browser a shot. Konquerer seemed a good choice.. We installed kubuntu-desktop, and got Konquerer running, but had trouble getting it in a proper full screen mode. Eventually we managed to hide the tab bar, but the status bar was still there. Although we found some hacks to remove it, we wanted to try something in particular, which ended up with a radical change…

Current configuration – Windows XP and Google Chrome

We really wanted to give Google Chrome (Chromium) a go on Linux, but unfortunately it’s not quite at it’s prime yet… More than anything, we couldn’t get the pages to load at all because the HTTP Auth dialog has yet to be coded. (it simply doesn’t appear. As a side note, using the user:password@ url notation makes it crash!)

After a quick hour of installation, drivers and updates, we had the screens back up and running with XP and Chromium. The nice points so far have been:

  • Turning the two different pages we use into their own Apps using the Google Gears “Create application shortcut” menu option. Now we have a single icon to click to open one window, and another for the other.
  • Separate processes – Now we can monitor which tab is using the RAM, and just restartthe offending process if it becomes a problem
  • The biggest win by far – It leaks very little memory. So far after using it for a week, the process running the text only Nagios view has not used any more RAM than it did when we started it (35mb). The Cacti graphs screen, reloading graphs 24/7 for a week every 20 seconds has used just 80mb (40mb when it started). The reason for this is obvious; if you watch the usage, it loads the page, the memory increases by 5mb. After a few secnods, it drops by 5mb again. So there is a small memory leak somewhere but it seems Chrome is cleaning up after itself almost immediately, something which the other 2 browsers failed miserably at.

The overall functionality of the system is much the same.. I have compiled a couple of exe’s so that one switches off the displays and one turns them back on again (This combined with Task Scheduler means we save the planet whilst we’re not at work!) and VNC server functions actually better on Windows than on Linux (for some reason the secondary monitor displayed as a black screen on Linux, so you could control but not see it).

Downsides

The only downside of the Google Chrome based solution is: Webkit doesn’t support “text-decoration: blink”! In the image linked above, you can see we use the text CRITICAL for a service that is broken, and DOWN for a host that is having an issue. These used to blink, which was a nice touch to draw your eye to the issue. This is about the only valid use of “text-decoration: blink” I can think of, but unfortunately the webkit developers have chosen not to support it. Any support on this ticket would be appreciated!

We’re currently using the bleeding edge dev version, simply because it was the only version that had F11 Full screen mode in. This works very well, and it’s also very stable for a bleeding edge release (although obviously we aren’t using it like a regular browser).

Fin

If you’re after a browser that can handle sitting there all day and night happily refreshing a page, and you don’t mind running Windows (for now, anyway) then it seems Google Chrome may be your best bet. I will continue to evaluate it’s performance and maybe one day we can find something even better.

Any comments are welcome and we’re still open to suggestions, although I’m pretty happy I won’t have to restart Chrome for a few months if this trend continues!

Really stop Vista from waking you up in the middle of the night

I posted something a little while back about my troubles with getting Vista to stop waking up randomly in the middle of the night.

Enough was enough, so I decided to go for a clean install to see if that fixed it and a number of other problems I had. And what do you know, it STILL woke up randomly, and the wake cause was still “unknown”. Extremely frustrating considering it was a completely new installation.

I dug around a little more and in the end had to settle for this handy tip: If your computer keeps waking up (and it might be my motherboard/OS combination it appears, it looks like an Asus thing…) run these commands and it will completely disable ACPI wakeup:

1. powercfg -setacvalueindex scheme_current sub_sleep bd3b718a-0680-4d9d-8ab2-e1d2b4ac806d 0
2. powercfg -setdcvalueindex scheme_current sub_sleep bd3b718a-0680-4d9d-8ab2-e1d2b4ac806d 0
3. powercfg -setactive scheme_current

This way, whether on AC or on DC, the Vista will refuse to wake up if the motherboard sends a call asking for it. This is good if you get random wakeups, but it does of course mean that if there is a legimate reason that your computer should wake itself (e.g., Windows Media Center waking to record a program) it will no longer do it. However, you can re-enable it if you need this functionality for, say, a day or two, by simply swapping the 0’s for 1’s in the above commands. For me, it’s far more attractive to have a sound night sleep without your machine coming out of sleep for no reason!

Ever think your Dell XPS M1330 is a bit whiney?

After a few CPU overheating issues (note: I love my M1330, would recommend to anyone.) this evening I happen to notice my laptop has a particularly loud whine. Not sure if it was ever that bad, I had heard it before but thought nothing of it. A quick Google found this gem:

Start> Control Panel> Device manager>

– Click on the Bluetooth radio’s node (the plus sign)
– right click on “Dell Truemobile 355 Bluetooth + EDR”
– Go to properties
– Click the Power Management tab
– UNCHECK: Allow the computer to turn off this device to save power.

The second I clicked OK, the whining stopped. Fantastic stuff! Perhaps this is because I have Bluetooth on constantly or something, and Windows and the BIOS are trying to fight to turn it on or off. I have no idea, but it worked.

Stop Vista Waking Up (and me up!) in the middle of the night

This has been driving me insane for a while. I thought it was MCE. I swore at MCE every time my computer buzzed into life in my room. It’s not very quiet, and it can do it so stealthily… It’ll turn itself back off so most mornings I won’t even realise it’s done it.

I only caught on because sometimes I catch it in its dirty act, and last night it actually managed to cause a BSOD so wehn I came to turn it on it had actually shut itself down, sigh.

I decided to investigate again and found this handy tip hidden away on a blog type thing:

It’s Windows Update. That sneaky little bugger. Especially useless since the wakeup event in the event viewer is handily marked as being caused by… “Unknown”. To stop this:

It is possible to disable this behavior in the group policy editor (run gpedit.msc). It’s under: Computer Configuration | Administrative Templates | Windows Components | Windows Update and the setting is called: “Enabling Windows Update Power Management to automatically wake up the system to install scheduled updates.”

I will let you know if this doesn’t fix my problem but I’m looking forward to not being woken up tonight…

EDIT: Yeah, it didn’t work. I actually caught it one night, turned the screen on just in time to see “Configuring Updates…” and then “Shutting down” at which point it turned off my machine! Funny considering the day before I’d turned off updates completly AND stopped and disabled the Windows Update service.

Last night i decided to install some updates, to see if that fixed it; after 2 hours of waiting, some installed, most failed, and it still woke up at 5am despite me turning updates back off again.

Anyone have any clues?!

EDIT 2: I’ve found a workaround, see this post: http://laurie.denness.net/blog/?p=59

Homemade Sausage and Bean Melts

Today, Rosie and I woke up and wandered to the local Greggs for some lunch. The “Sausage and Bean melt” being our favourite we, of course, were hugely disappointed when there was none left! at 1:30pm! (I may be over emphasising just how upset we were but still.)

So we thought hey how hard can it be to make some of our own?!

We went to Tescos and purchased a simple selection of items:

1x Pre rolled Jus-roll puff pastry
1x Heinz Baked Beans with Sausages
1x Tesco Pre Grated Cheddar Cheese

Came to about £2.50.

The process was very simple. Unroll the pastry, cut into 4 (this leaves you with some nice rectangles you can fold over) and then spoon on some beans and sausages, a little heap of cheese and then fold over. We then sealed the edges using a fork, to make a sealed package.*

* Note: Whenever I say “we” i actually meant Rosie. She’s good at this kind of thing.

A good 20 minutes later, they’d risen, smelt amazing and they tasted even better. Screw you Greggs! We don’t need your stinkin’ produce.

See the pictures, step by step at Flickr

The finished product:

Sausage and Bean Melt - Rosie and Laurie Style
Sausage and Bean Melt - Rosie and Laurie Style

Fruit Pastilles

I recently went into Tesco’s and saw Fruit Pastilles… It’d been a long while since I’d had those, and I was never allowed sweets or chocolate much as a child, and at 30p I thought it was a bargin. I also happened to be quite ill with manflu at this point, so was hoping they would cheer me up. So imagine my dismay when most of the sweets were the lemon or lime flavours! Eugh! Okay I like these, but come on, nothing can beat blackberry or strawberry! (If you follow my boring ramblings on Twitter you’d already know this far)…

So I decided, you know, this is the internet age, and after having my second packet with the majority of lemon and lime, I complained. The Nestle website made it very easy to do so, and even limited you to a silly number of characters so you couldn’t rant for ages. I didn’t really expect any response, let alone an interesting one but I arrived at my parents place this evening to find a letter from Nestle, woohoo! “Blah blah blah, very sorry, we know people have favourites so we try and evenly distribute, some must’ve slipped through, blah blah” but the best bit, a cheque for £2! Woohoo! Do you know how many packets I could buy for £2?! 6.6! 😀

Hopefully with over 6 packets, I should finally be able to enjoy lots of non crappy flavours! Thanks Nestle!

Last.fm Beta – Yay!

So we launched a super exciting new beta today.. It’s not very finished, and it’s going to get a lot better, but I’m very excited and here are some quick reasons why.

  1. Activity feeds. For me, I can remember what I shouted, who i added as my friend, what forum posts I made, and more. For my friends, the same, and I can see what’s going on with them. For any other resource: interesting stuff that people have done. Simple but so effectively because its live.
  2. Live updating charts. This makes me happy, because the charts look more like Audioscrobbler ones, and not only that they update every single damn play. Yay!  Every single play means something new to look at!
  3. Notifications. Easy way to see shoutbox posts and other stuff, other than checking my email.
  4. On the fly recommendations. Again, live updating goodness. No need to explain that!
  5. Library. Big, shiny, pretty view of everything you ever played. And finally you can delete that stuff you thought “jesus, why did I play that”? Apparently I listened to 50 cent! I never realised!
  6. Loved Tracks. They’re finally useful! Remember those tracks you loved but you never remembered because we didn’t have them streamable.
  7. The design. I wasn’t sure about it at first, but I think it’s looking pretty nice. Much more up to date than it was before, but it’s got a little way to go.

There are tonnes more awesome stuff going on, and more stuff to be tweaked, improved on, and cool stuff to be added, we’re not done yet! But it’s 11:30 and I’m not exactly sober. Goodnight!

Automatic Bluetooth Sync for Windows Mobile 6

My housemate dragged out his old Windows Mobile 2003 PocketPC and got it all hooked up for ActiveSync to our corporate mail server, and whilst doing it he found this awesome hack that lets you assign a single button to a) connect the bluetooth port and b) start an ActiveSync.

Handy, I thought, since at the moment with my Vista laptop and Windows Mobile 6 device you have to open the ActiveSync application and then right menu then “Connect using Bluetooth…”

I failed on the first step, however, when if you go to Menu in ActiveSync on WM6, then connections, you can only choose to automatically connect to “`USB”, not Bluetooth. D’oh! So the “replog.exe” hack kinda worked.. It was triggering ActiveSync but it wasn’t really sure what do. I tried editing the registry key (HKEY_CURRENT_USER\ControlPanel\Comm) to “`BlueToothActiveSync” which is how it worked on WM2003 to no avail.

After some Googling I found HKEY_CURRENT_USER\Comm\Rasbook.. A list of all your connections. And in there, voila, the name of my laptop. Windows Mobile 6 obviously handles it slightly differently and allows many different Bluetooth AS connections. I gave it a shot, and changed HKCU\ControlPanel\Comm\Cnct to the name of my laptop, and voila! It started the Bluetooth port, and then start the ActiveSync. The only thing is doesn’t do is disconnect again, which it does on WM2003, but no matter; it’s not too bad hitting the disconnect button 🙂

On a completly seperate note, I wish the rain would go away. I don’t like getting soaked walking to and from work! 🙁

IRC and BES and You

I got this wonderful Blackberry device courtesy of work, since I’m on call and people want emails answering quickly etc, etc.

The miracle of BIM and Google Talk is fantastic.. lots of ways to talk to my fellow operations coworkers, but there was something missing. We use good old IRC at Last.fm to communicate, so when something goes a bit wrong its nice to be able to jump in and see what’s gone on (or whether no one is fixing anything and its up to you..!)

On a first search there was plenty of good IRC clients around. Unfortunately I couldn’t get any to work… They just said disconnected from server. Using MidpSSH I telnet’d to the server and got a connection refused.. Then I changed the connection method to “TCP” and it worked fine. Great! But no such option exists in any IRC client (Mobilirc is the best one at the moment it seems).

So, the BES won’t forward the traffic, the BES isn’t even managed by us, and both apps are open source. Let’s delve into the code!

else if ( spec.blackberryConnType == SessionSpec.BLACKBERRY_CONN_TYPE_DEVICESIDE ) {
conn.append(“;deviceside=true”);

References to “deviceside”… basically it proxies via the BES, so that’s deviceside=false, which is the default if not specified. Funnily enough. Mobilirc doesn’t specifiy this, so I jump in and add the line, so it now looks like this:

connector = (StreamConnection) Connector.open(“socket://” + host + “:” + port + “;deviceside=true”, Connector.READ_WRITE);

After a couple of hours of trying to get the Blackberry Development Environment working for me, I managed to get a .jar, .jad, .alx, .cod, and using javaload, got it on my device and SUCCESS! IRC running, backgrounded, highlights, always on. Hurrah!

I don’t know if this affects anyone, or if anyone else really cares, but if you do, let me know and I’ll send you the stuff. At least we’re happy now 😉 and I’m happy that I still vaguely understand Java! 😀