I created a brief installation instruction for bubba here.
After moving to a house a few years back we ended up in a situation where ADSL was the only option (aside of mobile broadband, which is not really a realistic option if you plan to do a fair amount of computer work from home) available to us. However, the nearest phone station turned out to be close to 4 kilometers away, which according to the broadband provider is a lot, maybe even approaching the distance where ADSL is usable.
Except that they failed to mention this when we informed them about the move from hyper-connected downtown to the suburb we now live in…
After well over a year of poor broadband speeds I got them (the ISP in question is Glocalnet, subsidiary of Telenor, btw) to acknowledge the problem, and even give us a refund for the months we’ve been paying for a 24 Mbit service, even though actual speed never gets above 5 Mbit.
Fast forwarding a couple of years, we’ve been paying less per month than before, but the quality of the ADSL connection is still poor, with the connection yoyo-ing several times per day. A couple of weeks back I finally had it and told them to fix the problem or stop charging us for a service they can’t deliver. A few days later an SMS arrived stating “your technical problem has been resolved” .
So, to the point of this blog post. How can I monitor they have actually fixed the problem and now provide a stable broadband service to us?
I ended up using a two-tiered approach:
1. External monitoring service
Using a free, third party server monitoring service to ensure there is connectivity from Internet to my home network. As the broadband outages we had experienced were typically quite short (on the order of a few minutes each), I needed a service that would ping a suitable computer in my home network at frequent intervals. Turns out there are many good free monitoring services (moni.tor.us etc), but they all (?) offer 20 or 30 minutes as shortest ping interval.
I finally found Pingdom, which offer you a free account from which you can monitor ONE server, with a shortest ping interval of 1 minute. Perfect. Their web site is slick and no-nonsense, they even have a very efficient and easy-to-use iPhone app. Great.
Only caveat is that you need an always-on computer at home, in order for Pingdom to have something to check connectivity to. Assuming that’s in place, you get stats like the following:
2. Ping from internal network to Internet
In order to minimize the number of false positives I decided to also check connectivity from the home network to a suitable site on the Internet. Once again, this assumes there is an always-turned-on computer in your home network. I use a Linux virtual machine that is always running anyway, looking after various other stuff.
A small script pings www.google.com once every minute and outputs the result into a text file. If Pingdom indicate a broadband connectivity outage, I can then go into the text file to verify that this was really the case (ruling out problems with Pingdom’s servers/service). The script looks like the following, paths might need some editing in other environments.
echo —————————– >> /home/goran/pinglog_google.txt
date >> /home/goran/pinglog_google.txt
ping -D -c 2 www.google.com >> /home/goran/pinglog_google.txt
Add to this a crontab (run crontab -e) entry for running the above once every minute:
# ping Google once every minute to make sure broadband connection is up
*/1 * * * * /home/goran/ping_google.sh
…and that’s about it. Keeping fingers crossed I won’t have to use this data against the ISP – nonetheless good to have it, just in case.
There are various replacements for the traditional screen command in Linux, Byobu and tmux being two good ones. Byobu is good, but after trying tmux on various Linux machines I really wanted it also on the bubba2.
As tmux doesn’t seems to be in the bubba2 or etch repositories, the next option is to build it from source. Below follow some ideas for doing this.
Note: you may need to install/upgrade gcc and other tools to complete the steps below, if you have a standard, out-of-the-box bubba2 system.
- Switch to su and create a directory for source & resulting binaries
- Compile proper libevent version
tmux needs a more recent version of libevent than installed as part of bubba2 standard setup. First remove current libevent, then compile the new one:
apt-get remove libevent1
tar xvf libevent-1.4.14b-stable.tar
- Register the new libevent
Edit /etc/ld.so.conf.d/powerpc-linux-gnu.conf, e.g. by “vim /etc/ld.so.conf.d/powerpc-linux-gnu.conf”, add the line “/usr/local/lib/” (no quotes) at the end.
- Reload the new libevent
Simply run “ldconfig”.
- Compile and install tmux
tar xvf http://downloads.sourceforge.net/project/tmux/tmux/tmux-1.5/tmux-1.5.tar
- Configure tmux and start using it
First, exit from superuser mode by typing “exit”. Then, you probably want to customize tmux, try googling “tmux config file” or similar for samples. I currently use the following:# Make it use C-a, similar to screen..
set -g prefix C-a
bind-key C-a last-window
# key bindings for splitting
bind | split-window -h
bind h split-window -h
bind – split-window -v
bind v split-window -v# Reload key
bind r source-file ~/.tmux.conf#set -g default-terminal “screen-256color”
set -g default-terminal “xterm”
set -g history-limit 4096
# Terminal emulator window title
set -g set-titles on
set -g set-titles-string ‘#S:#I.#P #W’# THEME
set -g status-bg black
set -g status-fg white
set -g status-interval 60
set -g status-left-length 30
set -g status-left ‘#[fg=green](#S) #(whoami)@#H#[default]’
# set -g status-right ‘#[fg=yellow]#(cut -d ” ” -f 1-3 /proc/loadavg)#[default] #[fg=blue]%H:%M#[default]’
set -g status-right-length 75
set -g status-right ‘#[fg=red]Up #(uptime | cut -f 4-5 -d ” ” | cut -f 1 -d “,”) #[fg=black]#[fg=yellow]#(cut -d ” ” -f 1-4 /proc/loadavg) #[fg=cyan,bold]%Y-%m-%d %H:%M:%
- Start using tmux
“tmux” starts tmux. Now you can create new windows/panes, and kill the sessions whenever you want. When you reconnect to the bubba2 over ssh, just type tmux attach and you can continue where you left off.
A few days ago I decided to install WinXP on my Intel based iMac, using Boot Camp.
Boot Camp assistant worked great, it created a new Boot Camp partition on the hard drive just as planned with a 32 GB partition. Popping in a Dell WinXP SP2 CD (from a now long gone computer) as instructed, but when prompted to select where to install XP the Boot Camp partition was gone. In fact, so was the OSX partition…
The weird thing was that the XP installer suggested I should install it to a 131 GByte partition on the disk – where did it get that from?
Luckily I have a nightly Carbon Copy Cloner job scheduled for the iMac, so restoring the OSX disk was pretty straightforward (even though it took some 5-6 hours to restore 500 GB of data).
Tried the same procedure twice more. Once with the same result, and once I the OSX partition was actually intact. But XP still suggested I’d install it to the non-existing 131 GB partition.
Fourth time I tried another XP disc, and this time also slipstreamed it with SP3 using nLite (awesome product!). And now it worked flawlessly.
After doing some research it seems that some people are having trouble using Dell XP CDs with Boot Camp. Not sure why, but using that other, generic XP CD made the problem disappear. Or if it was the SP3 slipstreaming – either way it now works. I guess you could argue that the Dell CD was intended to be used with Dell machines only, and in this case that turns out to be true.. Anyway, with the problems sorted out, dual booting works great!
Long overdue, here is the final chapter in the warranty story going on with Dell.
They indeed repaired the laptop – at least in part. The graphics now works as it should, but the computer is still unstable and hangs way too often to be useful, even with fresh installations of Vista. Loosing work because the computer hangs at random times (several times per hour) just isn’t an option… No idea what’s causing it – feels like it may be poor thermal design/overheating. But that’s just a guess.
Nice of Dell to repair the broken GPU, but too bad they didn’t make the laptop usable again.
Turns out Dell’s tech support wasn’t the way to go.
After being told the laptop was 2 months out of warranty I had a chat with the sales guy who sold us the laptop two years ago. Friday last week he promised to look into the case and get back by Tuesday this week latest. That he did, with the good news that Dell would repair the laptop without cost to me.
Now that’s good support! Let’s just hope that is the end of the story.
Been using a Dell XPS M1330 at work from December 2007 until last fall (October 2009). It worked well until it in September 2009 started to act suspiciously, crashing from time to time. Problems escalating and in October it died. The symptoms were thin verticals colored lines that successively grew more intensive until the screen was all white.
Called Dell support who said “sorry – you had a one-year warranty – it expired in December 2008”. Frustrated with a month of crashing Vista I upgraded to a MacBook Pro (great machine btw). The Dell laptop found a resting place in a drawer.
I’ve kept the laptop in good order, not banged it around too much, always upgraded with latest BIOS and Vista updates etc.
You would think that’s the end of the story… Not so.
A few days ago I stumbled upon a forum post where people were upset about Dell’s poor attitude towards users having problems with their GPUs in certain Dell laptop models. Turns out their problems were the same as I experienced on my M1330 (which has a 128 MB NVIDIA GeForce 8400M GS). Also seems Dell has been aware of the problems for quite some time, but not issued a recall or even a warning to customers who had bought the affected models.
Btw, a way of testing whether it’s the GPU or display that’s causing the problem is to hold down the “D” key while pressing the power button. The display should now cycle between various solid colors (red, green, blue etc) before continuing to boot in graphical mode (which will fail if the GPU is broken). But if you see the solid colors ok, your display is fine.
So is this an isolated problem for Dell only? Of course not:
Dell has acknowledged there are issues with the Nvidia GPU and offer a 12 month extended warranty to cover for those affected.
Same thing for Sony, their take is to offer a good and relevant extended warranty: “Sony is offering to repair yours for free within four years of the purchase date, irrespective of warranty status. ”
Apple finally is not immune either, but they also offer a good extended warranty: “If the NVIDIA graphics processor in your MacBook Pro has failed, or fails within three years of the original date of purchase, a repair will be done free of charge, even if your MacBook Pro is out of warranty.”
Here is where I am starting to get really upset.
I was told by Dell support in October that the laptop was out of warranty and they wouldn’t repair it. They told me nothing of extended warranty to cover for defective GPUs.
Six months later (=now) I find out that I was in fact eligible for the extended warranty back in Octobert, but now Dell tells me it’s too late – “You are two months past the warranty period”.
When ordering the needed hardware new possibilities came to mind, as they so often do when you are browsing catalogs of companies selling cool gadgets…
The first version of the 1-wire network will look something like this, possibly with some of the sensors furthest away from the server installed at a later time. Some of these sensors are after all pretty expensive (just the humidity sensor, HIH-4000-001, got it from Digikey, that is attached to the DS2438 AD converter cost around €20). Getting the all the cables in place have also turned out to be a bit tricky, the tubing in the walls back in –65 just weren’t made with cat-6 networks, phone lines and 1-wire networks in mind…
The Linux server will run either temploggerd and owfs (if I can get it to work on the small Bubba Linux server that I am using, so far it compiles ok but doesn’t seem to respond properly to the sensors), or thermd.
I verified thermd runs (it does work as expected but it takes 15-20 seconds or so to update the graphs) on the Bubba server as long as you install the perl runtimes and quite a few Perl packages, but as owfs offers a better client-server approach it would be the preferred solution.
So, having moved from a flat to a house a couple of months back it was time to do some actual work on a home monitoring system.
First task: to find a good source for the needed 1-wire sensors and other electronics and hardware.
Some digging around, comparing a lot of prices resulted in the matrix below.
I then ended up buying my 1-wire products and components from Homechip and Hobby-boards, with some additional components from Electrokit.
Please note that prices and other aspects of the stores are expected to change, the data below represent a snapshot as of August 2009. They should in any case provide some starting points for your own 1-wire online shopping adventures.
|Homechip||UK||Good prices and fast, affordable delivery across Europe, they don’t have quite the selection of 1-wire products as for example Hobby-Boards or DigiKey (who are outstanding when it comes to components).
But with Homechip offering the core component I needed while also being European the first batch of 1-wire sensors were bought from them. Might try other providers later.A good thing about Homechip is that they carry the T-sense (made by IButtonLink) at an affordable price. VERY convenient temperature sensor! Ok, a bit more expensive than buying the components, but oh so convenient..
Low shipping costs also to rest of Europe outside of UK.
|Hobby-Boards||US||Nice store with some assembled and ready-to-go 1-wire sensor modules, such as the 8 channel relay board or the nice little DS2423-based dual counter(Note: Homechip carries a similar counter).A GREAT thing about Hobby-Boards is that they offer both schematics and PCB layout for free on their web! This gives some very good inspiration for those of us who like to build things from scratch but have spent the last fifteen years doing other things than designing electronic circuits.Reasonable prices but longer/more expensive shipping if you are in Europe.|
|Embedded Data Systems||US||This company among other things makes the HA7Net, which is an Ethernet equipped 1-wire master controller with some real intelligence in it. It contains a web server, upgradable firmware, various tools for reading/writing/maintaining a 1-wire network. The HA7Net also has three 1-wire ports, making it dead simple to create a star-formed 1-wire network.The HA7Net acts as the 1-wire centre point in my network, it is then read by various other software on the internal TCP/IP network.|
|Temperatur.nu||Sweden||temperatur.nu contains both temperatures across Sweden updated by people’s personal computer connected weather stations, as well as an online shop and a good forum for Swedes interested in home and weather monitoring systems. Quite a few good 1-wire related threads in the forums.The store has a fair number of components as well as pre-assembled sensor modules. Prices are a bit high compared to for example Homechip but if you are in Sweden and need fast delivery it may be worth it.
The store also has various home automation products, such as radio controlled 220V switches.
|IbuttonLink||US||Makers of some good 1-wire products, such as the LinkUSB 1-wire interface, which can be used instead of the standard DS9490R from Maxim. They also make the very convenient T-Sense temperature sensor, but as this is available from HomeChip at the same or even better price (given the current USD to EUR exchange rate), I’ve got my T-Sensors from Homechip.|
|1.wire shop||Germany||Expensive German online store|
|Fuchs Shop||Germany||Expensive German online store|
|SparkFun||US||GREAT company with a fantastic amount of cool gadgets and electronics kits in the store, usually with very affordable prices. If you like fiddling around with electronics and microcontrollers you’ll love SparkFun. SparkFun offer free schematics for many of their kits, they also have good tutorials and forums. Great site!|
|Giant retailer of electronics components. More than 1900 employees, more than 450.000 products in stock. If you need an electronics component, Digikey is likely to have it, and at a good price. Based in US means longer delivery and higher shipping costs though.
Edit: Turns out Digikey has a great international service as well! For their Swedish customers they even offer free shipping on orders of more than €65, which is pretty easy to reach when looking through their catalog…
|Electrokit||Sweden||Probably Sweden’s best online store for electronics components and Arduino microcontrollers. Good prices, very affordable shipping costs.|
|Lawicel-shop||Sweden||Sells various embedded systems products, including Arduino boards. Seem to be more expensive than Electrokit.|
|Maplin||UK||Sells all sorts of electronics and components. Might be worth considering for UK people.|
|Energibutiken||Sweden||Online store with a small but fairly good selection of products relating to energy monitoring. They among other things have an interesting data logger for those who don’t want to be bothered by running a server for their 1-wire projects.|
I regularly use 3-4 different computers, from time to time also guest operating systems running in virtual machines. For years I have been thinking it would be great if you could bring your current Firefox status with you to a different computer, for example between a Mac and PC.
After recently actually looking into this topic I found the new Mozilla Weave Firefox extension. It is in beta and have some bugs, but is very promising even in its current state. However, it doesn’t sync sessions.
I recently also started using the nice Dropbox service for file syncing. Dropbox has both Windows and Mac clients and works fully transparently: any file you put in the dedicated Dropbox folder on your local computer is automatically synced to the Dropbox service and from there propagated out to your other computers where you have Dropbox installed and running. As you get 2 GB of free storage that is more than plenty for storing session information.
Only thing missing now is to find where Firefox’ sessions files are stored. As I am using the excellent Session Manager Firefox extension, a quick look in the Advanced tab of its options dialog revealed that you can indeed specify where Session Manager’s session files should be stored. Change this to your local Dropbox folder and you are set! As soon as you save a session in Session Manager it will be almost instantly available on your other computers. To use them on these other computers you use the “Load session…” command in Session Manager’s menu, which in turn is found in Firefox’ Tools menu.
Have been using this setup for some weeks now, works flawlessly.