Pic: Chris
Pic: m4tik

Monday, 30 January 2012

Chris' Better Jam Cams

No one likes to get stuck in a traffic jam.  Much less one that could be avoided.  Even more annoying is the 'jam out of the blue' on what is usually a clear piece of road...

Short of pulling an 'Italian Job 1969' (original and best!!) and driving through shopping arcades, up on roofs, across weirs etc what can you do to avoid such jams?

Luckily we can spot traffic issues for ourselves from the comfort of our own homes using the excellent UK Highways Agency / BBC Jam Cameras site.

That said however, there is just one slight annoyance with this site; namely you can only view one camera at a time.

This is where Chris' Jam Cams page comes in!  OH YES!


An all in one dashboard showing all the Jam Cams you are interested in, plus a frame detailing traffic conditions in your area.  Whats more, you too can follow what I've done here and create your very own Jam Cams page.  Dead easy.

So how is it done? It is really quite easy.  What follows looks a minefield but it isn't all that complex.  I promise.

The golden rule here is SIMPLICITY: I want to be able to do all of this using just one html file.  Whilst I am positive that there are cleverer ways of achieving the same results,  I'm purely after something dead simple to write, understand and maintain as and when required (in other words, please don't laugh at my html code!!)

Grab Your Copy
First step, grab a copy of Chris' Jam Cams from Github:

Chris' Jam Cams - Original.  Should work in any browser on any platform 
Chris' Jam Cams Mobile - Includes a couple of layout tweaks to make it easier for mobile viewing

Cut and paste a copy into a text editor of your choice.  (Notepad on Windows is just fine).

Traffic Images
First step is to define your images. Dead simple, just make sure each image has a unique id.  For example, I've used the motorway and junction number.  You need one img statement per traffic image.
img border="0" height="261" width="320" src="#" id="M20J7" alt="M20 J7"
Now for the picture handling.  Load up the BBC Travel News page and select the area you are interested in.

Next, click on the "Traffic Jam Cameras" button, just above the map.

Lastly find a motorway junction camera that you are interested in right-click the link and choose "Copy Link Location" (firefox) or "Copy Shortcut" (IE).  Open a text editor (eg notepad) and paste the text in.

You should have a piece of text that looks something like this:
http://www.bbc.co.uk/travelnews/kent/trafficcameras/highwaysagency
/16588?epoch=1234567890&enabled=1&asset=16588.jpg
From this you are only interested in two pieces of information:
  1. The region (kent in the example above)
  2. The camera asset number (16588 in the example above)
Enter the region and camera asset number into the 'document.getElementById' statement towards the bottom of the Jam Cams html page (I suggest copying, pasting and editing the example given in the github file):
script type="text/javascript"
var d1 = new Date(); 
var eptime = parseInt(d1.getTime()/1000);

document.getElementById('M20J7').src="http://www.bbc.co.uk/travelnews
/kent/trafficcameras/highwaysagency/16588/image?epoch="+eptime+
"&enabled=1&cachebuster="+eptime;

document.write("Page Last Refreshed: "+d1);
/script
Lastly update the img id to match the id you chose earlier ('M20J7' in the example above).
Save your Jam Cams page and test.

Traffic News
The travel news is pulled from BBC mobile site using a simple iframe:
iframe height=750 width=600 align=right src="http://www.bbc.co.uk
/mobile/travelnews/search/process/page/1/filter/road/q/kent"
Replace 'Kent' in the src tag as required.  (Suggest using the Traffic Images region found above)

Jam Cams Mobile
As mentioned above, this file is a slightly tweaked version of Chris Jam Cams.htm that hopefully renders slightly better on smaller screens.  Update with your own Jam Cams in the same as the non-mobile version:


DO NOT USE THIS WHILST DRIVING!
(Goes without saying really)

Job done.  I usually save the htm file on my desktop.

Jam Cam images copyright? OK:
Highways Agency Traffic Cameras Standard Terms and Conditions
Reproduction for Private Use
The traffic images are Crown Copyright protected and may be reproduced free of charge in any format or medium as long as it is for non-commercial research, private study - subject to the material being reproduced accurately and not used in a misleading context.
No problems there then.

As I say, The golden rule here is SIMPLICITY: all done using just one html file.

Enjoy.

- Chris

Monday, 23 January 2012

Access VM Consoles From Linux

So you want to access the consoles of your VMware virtual machines, yet your chosen administration client is running Linux?

No problem.

Sure VMware provide the vSphere 5 Web Client, that can be used from a Linux client (or Mac or whatever) however to use this you have to install the vSphere 5 Web Client Server on your Virtual Center server in order to be able to use the client.

Not all vSphere implementations need or run a Virtual Center server - let alone a dedicated web client server.

Here is how is how to access your VMware VM consoles from a Linux client using the VMware Remote Console Plug-in application, and how to create a launcher so the application runs happily, even under Gnome 3.

  • In your home folder create a new folder called vmware and navigate to it:
mkdir ~/vmware
cd ~/vmware
  • Grab the VMware remote client from here: vmware-vmrc-linux-x86 (21.3Mb, from my dropbox account) [see below for alternatives] and download it into the vmware created above.
  •  
  • Extract the downloaded zip. Use the following command:
unzip vmware-vmrc-linux-x86.zip
  • Navigate to the plugins folder created by unziping the downloaded file:
cd plugins
  • Create and edit a new file called vmware-vmrc2.  Use the following command:
gedit vmware-vmrc2
  • Paste the following into vmware-vmrc2 and change the $PATH_TO_VMRC variable (currently "/home/chris/vmware/plugins") so it points to the folder plugins you've extracted earlier:
#!/bin/bash

# Please define this variable with the path to the plugins folder
PATH_TO_VMRC="/home/chris/vmware/plugins"

export VMWARE_USE_SHIPPED_GTK=yes
cd $PATH_TO_VMRC
./vmware-vmrc > /dev/null 2>&1 &
cd - > /dev/null 2>&1
  • Change the text highlighted in blue to match the location of your vmware folder created in step 1.
  • Save and close the file and then change it to be executable:
sudo chmod +x vmware-vmrc2
  • Launch the VMware remote client using the following command:
./vmware-vmrc2
You should be presented with the following (after accepting any security prompts):


Enter the details of your VMware ESX / ESXi server  and hit connect.

Job done!

I especially like the VM menu the client provides upon successful connection.  Something like this:


Pick a VM and go for it:


Grab your own install
Alternatively if you do have access to a Virtual Center server, you can grab the file from "C:\Program Files\VMware\Infrastructure\tomcat\webapps\ui\plugin" Also available in this folder are 64bit Linux and Windows versions of the remote client.

The file linked to in the process above is a v3.0.0 build-418557 client with the extension renamed from .xpi to .zip to stop Firefox trying to install rather than download.  As .xpi files are .zip files in disguise, the process above will remain the same.

If you don't have access to a Virtual Center server and you don't want to use the client linked to above, a third place to grab the client is here: https://github.com/vmware/rvc/downloads

Thanks should goto Joel Bastos for this workaround, originally posted here

- Chris

Thursday, 19 January 2012

Disable IE Enhanced Security

Another one to file in the "Yes, done that before, but I can't remember how" pile. Probably because it is so easy to do has some bearing on not being able to remember how...  Anyway, here is how to disable Internet Explorer Enhanced Security Configuration (aka IE ESC) on Windows 2003 and 2008 Servers.

Yes I know, IE ESC is a security feature there to protect the user and it should never be disabled etc etc etc. However most of the time it is 'a right royal PITA'.  So here goes then.


Windows 2003
Control Panel, Add or Remove Programs, Add/Remove Windows Components:


Disable or enable as you please.

Windows 2008 / Windows 2008R2
Run the following:
servermanager.msc
Check current status and / or make the required changes here:


On clicking Configure IE ESC:


Disable or enable as you please.

So there you have it.  One less pain to deal with.

-

Monday, 16 January 2012

Build it Again

Lego.

Hate it when stepping barefoot on a stray piece left hanging around or love it for keeping the kids quiet for hours... and hours.

What other toy gives you the freedom to design and build absolutely anything your heart desires?

Car? No problem.  Aeroplane? No problem.  Rocket to the moon? No problem.  Luna delta spaceship? Again, no problem.

Until a couple of years ago, a box of my childhood Lego resided in the attic, unplayed with but by no means forgotten.  I prefer to think of it "on hiatus", to be played with again at some point in the future.  That is until one day I retrieved it from the attic and introduced my youngest son to the world of Lego.  Could he be trusted?  Would it all disappear up the vacuum cleaner?

At the time I remember him almost saying, "hmm what is this pile of blocks for?  Where do the batteries go?  What you mean you have to build something?"

Of course after buying him some new sets and helping him build those he got the idea.  The big box of Lego from the attic were suddenly additional cars / houses / spaceships / whatever just waiting to be built.

So here we are a couple of years later and he is well onto Lego Techninc, and we are both still having a great time our Lego building.  For example, last weekend we spent just over 6 (yes SIX) hours* building this:


Here is it in full animated glory.  Winch, motorised tilting / lowering flatbed and wheel lift:


During the build the question "Daddy do you still have the instructions for any of your Lego?" was asked.  Unfortunately no I didn't... not any more.  I used to have build instuctions for houses, cars, trucks and space Lego - lots of space Lego (very popular in the 1980's!)

I still have the parts, but the knowledge to rebuild has long since passed.

Of course, me being me; some days later being presented with a empty Google search box (other search engines are available) and having forgotten what I was originally going to look for, I punched in "Lego instructions".  I was amazed when the results came back.

It turns out there are several simply excellent Lego instruction library sites out there, providing scanned instruction manuals for download.  That was it.  An hour spent in the quest to find all those long lost build instructions for as much of my Lego from the attic as I could.

By way of saying thank you to some of those library sites, here is a (by no means an exhaustive or ordered) list of the sites that have provided the Lego instructions from my childhood so that my sons may also enjoy building my Lego again:
  • Worldbricks.com - PDF downloadable instructions. Sometimes a bit slow, but well worth the wait. 
  •  
  • Letsbuilditagain.com - Online instructions.  Find your set and hit the blue arrow to view the instructions.
  •  
  • Brickfactory.info - Online instructions. More of a basic site, however still plenty there!
  •  
  • Brickset.com - No instructions, however good listing of newer sets, links to purchase sets on ebay and set barcodes (scan with Android barcode scanner to get best prices? ;))
  •  
  • Official Lego Site (direct link to instructions portal) - PDF downloadable instructions.  Of course, no list would be complete without mentioning this site!
  •  
  • Official Lego Technic Site (direct link to instructions portal) - PDF downloadable instructions.  As above, except for Lego Technic

If you don't own any Lego sets with perhaps some of the more specific pieces, then no need to worry.  These sites are still a great source of inspiration.  Look for the 1960 / 1970 / early 1980's instructions.   Some, if not most, of the realy early sets are made up of the more standard square brick variety meaning that anyone should be able to build them using whatever parts they have.

That should keep your little ones quiet for a while.  Perhaps you too.  Welcome to the world of Lego.... again!

- Chris

 *6 hours to build a flatbed truck?  Have a look at the three instruction booklets for yourself!

Wednesday, 11 January 2012

Sky HD: Highlight HD Programmes

So you have got a High Definition Television.  You have also taken the plunge and gone for a Sky HD box (other HD solutions are available).  You have even connected the two together using a propper HDMI cable and you have configured the two to use HD across the board.

So you sit down to watch some nice HD TV.

You spot your chosen TV channel's little 'HD' logo in the top corner, so you know that you are watching a HD channel. 

Final question; how do you know that the TV programme you are watching on your nice HD setup was actually filmed in HD?  Sure you could confirm by simply looking at the picture* but can you be 100% sure every time that the TV station isn't simply upscaling a standard definition programme?

If you are a Sky HD customer, then the fix is simple.  Configure your HD box to highlight programmes originating in HD in the TV Guide, like this:


Here is how to configure your Sky HD box to do the same.  All actions are done via the remote control.

1.  Whilst watching Sky HD, press Services button:


2.  Press Blue down navigation button, to highlight centre bar.

3.  Press Blue right navigation button to scroll to the CUSTOMISE option:


4.   Press Blue down navigation button, to select Highlight Programmes Originated in HD option.

5.  Press Blue right navigation button to enable the option (set it to ON):


6.  Press Green button to save changes.

7. Press Backup button to exit.

Job done.  Now you know that you are watching HD!

*Re spotting a HD picture: Hmm OK, how do I put this politely?
Here goes:  In my very limited experience, through a very small straw pole of asking friends etc, I have noticed that female of the human species rarely notices (or even cares?) that they are watching a TV show in HD.

Just stating what I have noticed, nothing more!  Please don't shoot the messenger!

Perhaps this article from 2006 helps to redress the balance: Why Women Don't Care About HDTV?

- Chris

Monday, 9 January 2012

New and Improved What The Mark IV!



Happy new year.  No your eyes do no deceive you, it is all change on the only blog that counts (TM).  Now it counts even more!!!

Hopefully you'll find the new site easier to navigate and find your favorite content.

As with all changes of this type, I'm sure are still some bugs to work out, so stay tuned and we will get this 'Cosworth powered Mini of a blog' up and running smoothly in no time.

Stay tuned and as always, have fun.

- Chris

Saturday, 24 December 2011

Raspberry Pi - A £16 Linux PC!



A credit card sized computer being developed by a UK based charitable foundation that is hoped will promote the education of computer science at school level and beyond.

The idea is simple - develop, manufacture and distribute an ultra-low-cost computer, for use in teaching computer programming to children.

That said, the computer can be used for many of the things that a desktop PC is, like spreadsheets, word-processing, games and high-definition video playback.


The name of this computer is the Raspberry PI:


OK, so what is the idea here?  What are they trying to achieve?  Games developer David Braben explains to BBC's Rory Cellan-Jones, holding an early alpha model, back in May 2011:
 

Here is a basic layout, detailing the features on board:


As can be seen from the above, the RasPi will be shipped in two variants:

  • Model A = 128MB RAM on board, no Ethernet = $25 / £16
  • Model B = 256MB RAM on board, 10/100 UTP Ethernet port = $35 / £22

So what do you get for your money?  Well, quite a lot actually:

  • 700MHz ARM11 Processor - The same processor as found in many mobile phones (including my ZTE Blade!)
  • 1080p full HD video output - via HDMI connector
  • Composite connector - for direct connection to a TV
  • Dual USB2 ports - for keyboard, mouse, etc
  • SD/MMC/SDIO memory card slot - for operating system etc etc

Talking of operating systems, it is envisaged that Debian Linux, Fedora Linux and ArchLinux will be supported from the start.  Other Linux distributions maybe supported later.

So what does it run like?  Have a watch for yourself:



Not to shabby at all!

As a father of an 11 year old son who is nuts on anything computer related (wonder where he gets that from? hehehe) I can certainly expect to see at least one of these winging their way to Kent!

What's even better is that there are already RasPi based coding tutorials on youtube, such as Liam Frasier's Raspberry Pi Tutorials channel.

So when is it going to be available?  By the looks of it very soon.  At the time of writing this (24 Dec 2011), the beta boards are currently undergoing testing and with all going well, the first first production run will be early in 2012.

Keep an eye on the Raspberry Pi Blog and on the official Raspberry PI Twitter feed for updates.

Excellent stuff!

- Chris

Monday, 19 December 2011

vSphere VM Clone Problems + Fixes


Just recently a colleague of mine had some fun and games completing what should have been a simple clone of Windows 2008 R2 64bit VMware virtual machine.

We managed to get to the bottom of the issues and get the clones completed, so for future info and help of others here are the issues and resolutions to those issues encountered.






autochk program not found - skipping AUTOCHECK and STOP: c000021a BSOD

Clone VM created successfully, however upon first boot of the VM, the following were seen:



According to VMware KB Article 2004505 this is caused by the entry:

disk.EnableUUID = "TRUE"
in the source VM's virtual machine configuration (vmx) file.  Download, edit and upload the vmx with the following setting:

disk.EnableUUID = "FALSE"
See the VMware KB article for further details around editing virtual machine vmx files.



Windows could not finish configuring the system...

Again, clone VM created successfully, however upon first boot of the VM, the following was seen:


According to the Microsoft KB Article KB981542 this issue occurs if the original operating system contains a registry key that is larger than 8 kilobytes (KB).

The resolution being to install a patch on the source VM. 

Unfortunately the patch is not available on the MS website, however it is available here:

After overcoming both those issues, the VM clones completed and booted successfully and what should have been a quick and easy job was done.

Thanks should go to Alan for highlighting the issues and persevering with the fixes.... both of them!

- Chris

Thursday, 15 December 2011

Find HBA WWNs from ESXi Console


 A question this comes up quite a bit:  How can I find the World Wide Names (WWNs) of the fibre channel Host Bus Adapters (HBAs) my ESXi server from the console?

Sure you can use the VMware VI client to gather the required info, but what happens if you do not or have network connectivity to your ESXi yet? 

The WWN information is very often needed to for the zoning configuration on the fibre channel switches to ensure that the ESXi server can only access the Storage Array Network (SAN) disks it is supposed to access.




Here is how to find the HBA WWNs:

First log on to your ESXi console:
Now select Troubleshooting Options:

Then select Enable Local Tech Support:

Now press ALT F1 to enter local ESXi console:

Login using root credentials:

At the # prompt enter: cd /proc/scsi and ls to list the SCSI adaptors fitted in your ESXi:


You are looking for qlaxxxx for QLogic HBAs or lpfc for Emulex HBAs.  As you can see from the screenshots, my ESXi has QLogic adapters fitted (qla2xxx).

Next, cd qla2xxx (or cd lpfc for emulex) and then list (ls) adaptors:


As you can see I have adaptors fitted at 5 and 6.  Your numbers may (and quite likely will) be different.  The last step is to list each of the adaptors found, using the cat x |more ("x" being one of the numbers listed) command:
 You are looking for the Host Device Name and the SCSI Device Information:
 

OK.  To get the full WWN address, simply note down the node and port hex ID's from the SCSI Device Information, and separate each pair with colons ":" to make your full HBA WWN.  In my case, from the screenshots above, my HBA WWN would be:

WWN of vmhba2 = 20:00:00:1b:32:8a:f3:42 21:00:00:1b:32:8a:f3:42

Repeat for the last command (cat x |more) for all the other HBA's in your ESXi (so in my case I would run the command cat 6 |more to find the SCSI device information for my other HBA.

When finished type exit to return to the ESXi tech support console login and ALT F2 to switch back to the standard ESXi console.

Don't forget to login, select Troubleshooting Options and Disable Local Tech Support when completely finished!

- Chris

Tuesday, 8 November 2011

Beta 1 What The Android Released


Yes that's right the What The.....? Android application has just gone Beta!

To mark this momentous occasion (remember developing in Java is completely new to me!), I have given the app it's very own page on this here blog.  The page has the reasons for development, links to the change log, source code and (more importantly) the apk file itself.

Use the What The Android link in the links bar above or click here to have a look at the What The Android page.

If you fancy being an early adopter / beta tester, then feel free.  Please post any feedback in comments below.

- Chris
 

Older Posts