Network Problem

May 12th, 2011 by andylockran 2 comments »

I’ve been having a really strange networking issue at the office for the past few months.  The reason I’m posting here, rather than in IRC or a Forum, is that it’s quite an interesting problem, and I’d quite like to post the solution.  I’ve contacted my Internet Provider, and unfortunately they don’t seem to be able to comprehend the problem, let alone work out a way of diagnosing it.

We have 8/9 devices sharing our internet connection in the office, across wireless and wired, which pass through our Debian Router, then through a cable modem to the Internet.  In order to make sure the problem was not with the router.  The same symptoms occurred with a direct connection to the cable modem.

The issues is as follows:

Our internet connection doesn’t appear to drop.  According to our ISP our modem has been connetced fine for the last 15 days, and they ‘can see no problem with our line.’  When downloading a large file (<100MB) or streaming Youtube videos, the connection just stops.  The video stops downloading or, in the case of the files, the connection just stops.  This is also evident when running large downloads through apt (such as do-release-upgrade) – during the file download sometimes it just stops downloading – yet on a cancel and restart it continues to download just fine.

I’d like to work out how I can get some documentary evidence of this connection hanging – what is the proper technical term for it – and hopefully find a way to reproduce the problem in a consistent manner.  I have OSX, Linux, and Windows machines all exhibiting the same behaviour – so I’m pretty sure it’s not a clientside bug.

If you can help me out, please let me know in the comments below.

Cheers! and Thanks in Advance.

FPTP versus AV

March 19th, 2011 by andylockran No comments »

I logged onto facebook earlier and a poll popped up on the right hand side – which sport could you not live without?

  • Football
  • Rugby
  • Cricket

I selected Rugby – and the following were the results:

  • Football – 73%
  • Rugby – 18%
  • Cricket – 9%

Of course, it was limited to the three sports, Rugby includes the League/Union split, and there are probably many other options.  I’d hypothesis though, that Cricket is the second favourite sport of Rugby Fans and Football fans.  Therefore moving the poll to an AV setup, rather than the FPTP that it is currently – would provide an interesting insight – and probably move cricket above Rugby – but not affect Football?

There’s only one way to find out – and that is to run the poll and get the stats for both answers.  I won’t delude myself and pretend I can get enough readers of this blog to vote in order to generate a fair sample – so instead can anyone devise a method of collecting this information that would get us a fair sample?

Andy

Tag Sri Lanka

February 23rd, 2011 by andylockran No comments »

It’s one of those posts that I’ve been hesitant to write for quite some time; mainly due to the fear of not having enough knowledge at the time of writing leading to an inability to do justice to the subject.

One of the guys who keeps my twitter feed turning over is Daren Forsyth (@DarenBBC), who is currently the Marketing and Communications Director for the Organisation Tag International Development(@tagdevelopment).   Their aim is to ‘design a better world,’ by using specialist people in specialist areas – by coordinating and funding that work.

Over the last few months, Daren has been tweeting about one such project based in Sri Lanka (@TAGSriLanka).  The aim of the project is to get used Android phones into the hands of Sri Lankans.  TAG are looking for donations of Android Phones, Solar Chargers, and also monetary donations, in order to develop the cellular network in the region.

Earlier today I can across a post on the TAG ID blog. Read it here. It discussed how through Art Therapy and Religion, communities can be rebuilt following 30 years of Civil War.  It should be of no surprise to see what aid givers can learn by giving people to tools to express themselves when there is a language barrier.

It’s interesting that the lack of electricity being a number one threat to the rural community – not because it’s seen as a convenience – but due to it’s role in elephant control.  When i visited the small village near Anaikatti in  Kerala, they had a problem with elephants trampling houses and destroying crops at night time, and whereas villages down the mountain had electricity to power their electric fence – they didn’t.

TAG Development will no doubt have similar problems to face in Sri Lanka, but the main reason for the post is to advertise their efforts to collect Android Phones in order to get them into the hands of the people of Sri Lanka.  As there are also a fair few programmer-types that read this blog, it may also be an idea to discuss possible uses for Android Handsets, and application ideas and development to suit the project.  If you have any thoughts, ideas and suggestions, please either comment on the blog below, or find @DarenBBC and @TagSriLanka on Twitter.

Electricity Development

February 23rd, 2011 by andylockran No comments »

In Kerala, I visted a village high up in the mountains that was disconnected from the main electricity grid. It was, however, connected to a smaller local grid. This grid though was smaller and suffered loss of power most days, and rarely lasted the whole summer.  This is mainly due to Kerala’s reliance on hydro-electric power, and with smaller monsoon rains, coupled with population increase draining the reservoirs faster, the situation is unlikely to improve without developing other means of electricity generation.



View Larger Map

The really ironic thing about it all, is that Kerala State are introducing new methods.  They’ve erected massive wind turbines across the local landscape, and one right next to the village.  The unfortunate thing about this, is that in order for the electricity harvested by the wind farm to be useful to the local community, it would require a substation.  This substation is situated a few miles away down the valley, and the electricity produced by this turbine allegedly isn’t connected to the same grid that the village are on.

Charter for Compassion

February 22nd, 2011 by andylockran No comments »



Some videos like this can miss the point, but I thought this one was worth sharing.

FreePBX & Asterisk Queue ‘Nuance’

February 11th, 2011 by andylockran 4 comments »

I’ve recently been playing with FreePBX and Asterisk and have upgraded my Gentoo setup to:

  • Asterisk 1.6.2.16.1
  • FreePBX Core 2.8.1.0
  • FreePBX Framework 2.8.1.0

  • We have a slight nuance with the way we initially setup FreePBX. In order to split users/physical devices, I set up all users starting at 1000, and physical devices at 5000. My personal extension is 1013. I manage my follow-me via the Web Interface, which I set to my deskphone, 5108. I also set the follow-me on 1013 to my mobile on 07777777777# (not my actual number).

    This has worked well for about 4 years, enabling us to add more phones and more locations. However, today I hit a new problem.

    At around lunchtime, my boss called to say people that call up our number are getting our IVR, (where they can either enter an extension, or are forwarded to a queue) and are simply being put into the queue (5200) and it’s ringing out. I attempted a call and looking at the verbose logs that is exactly what was happening.

    With some help from the #freepbx IRC channel (especially [TK]D-Fender), I was advised to run ‘queue show 5200′. This showed all our user extensions as (unavailable) – which they were, as they are all forwarded on to follow-me.

    comms*CLI> queue show 5200
    5200 has 0 calls (max unlimited) in 'ringall' strategy (0s holdtime, 0s talktime), W:0, C:0, A:17, SL:0.0% within 60s
       Members:
          Trevor (Local/1004@from-queue/n) (Unavailable) has taken no calls yet
          Michael (Local/1001@from-queue/n) (Unavailable) has taken no calls yet
          Bob (Local/1012@from-queue/n) (Unavailable) has taken no calls yet
          Carlos (Local/1002@from-queue/n) (Unavailable) has taken no calls yet
          Andy (Local/1013@from-queue/n) (Unavailable) has taken no calls yet
          Steve (Local/1007@from-queue/n) (Unavailable) has taken no calls yet
       No Callers
    

    It was pointed out to me that because they were unavailable, they would not receive the calls. That makes some kind of sense. In reality they’re permanently disconnected SIP devices, which simply forward on to their follow me.

    At this juncture, I should point out that there is an option in the Queue Management page in FreePBX called ‘Agent Restrictions’, which specifies the following:

    When set to ‘Call as Dialed’ the queue will call an extension just as if the queue were another user. Any Follow-Me or Call Forward states active on the extension will result in the queue call following these call paths. This behavior has been the standard queue behavior on past FreePBX versions.
    When set to ‘No Follow-Me or Call Forward’, all agents that are extensions on the system will be limited to ringing their extensions only. Follow-Me and Call Forward settings will be ignored. Any other agent will be called as dialed. This behavior is similar to how extensions are dialed in ringgroups.
    When set to ‘Extensions Only’ the queue will dial Extensions as described for ‘No Follow-Me or Call Forward’. Any other number entered for an agent that is NOT a valid extension will be ignored. No error checking is provided when entering a static agent or when logging on as a dynamic agent, the call will simply be blocked when the queue tries to call it. For dynamic agents, see the ‘Agent Regex Filter’ to provide some validation.

    I therefore expected the extensions there to adhere to the follow-me. This was not the case.

    The next step was to add a physical device to the list of SIP extensions in the queue, one that would show up as available. I added my deskphone extension (5108) and it showed up in the queue as the following:

    APL-DESK (Local/5108@from-queue/n) (Not in use) has taken no calls yet
    

    So I now dialed the queue and expected just extension 5108 to ring, but to my surprise now every extension listed in the queue now rang their follow me. It was as if adding a physical extension to the queue ‘bumped’ asterisk into respecting the follow-me of the (unavailable extensions). True enough I then removed 5108 from the queue only to return to the same behaviour as before – no phones ringing.

    What confuses me is that if the phone is marked as (unavailable) and therefore that is the reason why it doesn’t ring, then why when only one phone in the queue is marked as (not in use) does it then ‘make’ asterisk respect the follow-me of the (unavailable) extensions?

    Please let me know your thoughts

    Business Planning & Strategy (Wolfram Alpha)

    January 21st, 2011 by andylockran No comments »

    I’ve recently diversified into preparing for a new role with my current employer. I’ve really enjoyed my time here so far; it’s coming up to 5 years this June, and up until these last few months I’ve really felt as though I was stretching myself – both learning new things and working pretty hard.

    So this new challenge is a bit of excitement for me, it’s something a little bit different and challenging. I’m still in the preliminary stages at the moment, where we work out whether or not the ideas and strategies I’m coming up with have potential, or if I’m in way too deep.

    One of the most interesting exercises I’ve done so far is the creation of a business plan. Now, having watched Dragon’s Den (and studied a BA in Business), I’ve got a fair idea of what makes a good business plan. Interestingly, outside of the hypothetical scenarios we’d discussed at University, I’d not actually completed one.

    The bit I’ve enjoyed the most so far is the market analysis. It’s incredible to find that only ~2% of the UKs output (GDP) is created by the IT sector. Another ~2% is generated by the telco industry. Finance counts for 10% of GDP, and industrial output is up at 23%. Thanks Wolfram Alpha!

    The interesting thing though is that nearly 45% of British GDP is described as Misc. I don’t know what makes that up, that’s what Misc means to an end user accessing the data. Can anyone fill in the blanks?

    The other interesting analysis was that of the North West. 1 in 8 legal professionals work up here. 130,000 people are employed in finance/insurance, there are 3,000 individual accountancies and the market for Management Consultancy has grown from £6.3bn in 1998 to £14.05bn in 2006.

    It’s all interesting facts, but going back to Wolfram Alpha – if you can provide tips on how to get more out of it I’d love to hear it.

    ipv6 enabled.

    January 10th, 2011 by andylockran No comments »

    I’ve now moved my Registrar to gandi.net, and setup my own nameservers with bitfolk providing my secondary ones.  As of now I consider myself ipv6 friendly.  Let me know if you spot anything which is ipv6 unfriendly, and I’ll try and fix it!

    Petrol Prices

    January 10th, 2011 by andylockran 1 comment »

    I was recently conversing about the increase in petrol prices, and lamenting the fact that the generation before me had it so much better. With prices now heading over £1.30/litre, the % increase since I began driving in 2003 (when petrol was 80p/litre) seems extremely high.

    I thought it would be a sensible idea to trawl the internet for hard statistics, and after failing to get the data I needed from Wolfram Alpha, I did a quick google and found http://www.speedlimit.org.uk/petrolprices.html, which contained the table below:

    Petrol Prices 1983-2010

    Year Price per Litre (p) Price per Gallon (£) Retail
    Prices
    Index
    Petrol Price
    in constant terms
    (1983=100)
    5-year
    % increase ¶
    1983 36.7 1.670 83.1 100.0
    1984 38.7 1.759 87.5 100.0
    1985 42.8 1.946 92.8 104.3
    1986 38.2 1.737 96.7 89.4
    1987 37.8 1.719 100.6 85.0
    1988 34.7 1.578 104.1 75.4 -5.5
    1989 38.4 1.746 112.3 77.4 -0.7
    1990 40.2 1.828 121.4 74.9 -6.1
    1991 39.5 1.796 131.4 68.0 3.4
    1992 40.3 1.832 136.7 66.7 6.6
    1993 45.9 2.087 139.3 74.6 32.3
    1994 48.9 2.223 133.1 77.6 27.3
    1995 50.9 2.314 147.5 78.1 26.6
    1996 52.9 2.405 151.5 79.0 33.9
    1997 57.9 2.632 155.4 84.3 43.7
    1998 60.9 2.769 160.8 85.7 32.7
    1999 61.9 2.814 164.1 85.3 26.6
    2000 76.9 3.496 168.4 103.3 51.1
    2001 77.9 3.541 173.1 101.8 47.2
    2002 69.9 3.178 174.5 90.6 20.7
    2003 77.9 3.541 179.9 98.0 27.9
    2004 77.9 3.541 184.6 95.5 25.8
    2005 79.9 3.632 190.5 95.0 3.9
    2006 88.9 4.041 195.0 103.2 14.1
    2007 87.9 3.996 204.4 97.4 25.6
    2008 103.9 4.723 212.1 110.9 33.4
    2009 89.9 4.087 211.3 96.2 15.4
    2010 111.9 5.087 220.7 114.8 40.1

    ¶ Note: this column represents the % increase over 5 years in the non inflation adjusted petrol price.

    (Last updated April 2010)

    Using the index column (where 1983=100) I worked out the following graph:

    I’d need to do more analysis before I work out exactly what this means. Though it clearly shows the price of petrol increasing, because we’re around the ’100′ index, in real-terms we’re no worse off than we were in 1983 (though the trend would suggest we’re going to be worse of pretty soon) – and is the RPI the best value to make the calculations against?

    I’d be interested to hear if anyone can shed more light on these statistics. Please leave your comments below.

    Coalition

    December 10th, 2010 by andylockran 5 comments »

    One of the things I like to publish the least are my politicial leanings. Not because I’m ashamed of them, but because I’ve yet to reach ‘political maturity,’ that is, the firm believe that what I believe is the right and only course of action. I agree and disagree with policies from all the main political parties, and like most view the UK’s political system with a healthy dose of cynicism.

    I can’t get into facts and figures on this blog, for that is not my expertise, and I wouldn’t want to waste your time in reading my analysis when there are far better analysts out there. All I seek to share is my opinion.

    My view of the HoC and HoP probably doesn’t fit with what the system has become, and not having studied it, I’m sure that I’m making assumptions and observations that are incorrect. Please either bear with me or point out my mistakes.

    Here are my assumptions:

  • The House of Commons exists so that the citizens of the country can elect their representatives to think up and create laws for the good of the citizens.
  • The House of Lords is make up of ‘experts’ to pass valued opinion on issues passed to their chamber.
  • Parliament is both of these
  • The ‘Government’ is not the Party with the majority, but the process of voting on these laws. You can be an opposition party, but if you have a vote which will affect the passing of laws in this country then you are in Government.
  • The Party Political System is essentially a veneer over Parliament which allows like-minded individuals to campaign together and make communication easier.
  • Coalition government are for when this veneer is broken and parties have to team up together to create a stable Government.
  • A stable Government is when Parliament is able to cooperate and sensibly predict the outcome of votes. There’s no mileage in a Government when the voting is not consistent as there needs to be a general consensus on the best ‘path’ for the lifetime of their tenure.

  • Therefore, where we stand at the moment is a Coalition Government where the Liberal Democrat and Conservative parties have had to alter their core policies in order to promote a stable Government that can operate for the length of their tenure. Unfortunately for the Lib Dems, this has meant having to concede on matters of principal, such as tuition fees.

    The bashing the LibDems have got in the press I believe to be very unfair. Had they ended up forming the LibLab Coalition, then there would have been many other matters on which they would have had to concede – and tuition fees would appear to have still been one of them.

    Had there not been a Coalition, we would have either struggled along with an unstable Government (not a good message to send out to the markets who want a solid political ‘path’ to chart their forecasting against) or another vote. If we’d have had another vote, then I should imagine due to the swing to the right after 12 years of Labour government, we would have ended up with either a very small Tory/Labour Majority (with the Liberals squeezed out by votes choosing either Lab/Con). This would have lost the Liberal voice completely – so by acting has he did, Nick Clegg was able to ensure the Liberals had influence. I doubt very much that the Liberals would have built on their progress in a second vote.

    So that’s where I believe us to be now. I’m not in agreement with the policies of the current Government, but don’t like to constantly hear the complaints against the LibDems. They’re having to partner with a party who they’ve got less synergy with than the party they’re opposing.

    As for the tuition fees debate, there’s a much larger topic that is outside the scope of this article; I’ll hopefully have that one written soon.

    Comments and ideas appreciated.

    Addendum

  • The Civil Service – the people who really do all the policy implementation and work behind the scenes. The government are there to try and influence them, but essentially they are the centre of gravity that the Government has to try to push to the left or the right.