February 9, 2017 at 9:51 pm | Blog, Programming | No comment

Back in December, I bought the Netgear GS108E gigabit managed switch for my flat’s home network (£25 at the time of writing). It lives in a random cupboard along with my servers and internet router, and so far it has served me very well. However, it’s cheap. The web interface certainly shows off it’s cheapness with limited options and information. The switch also provides no SNMP data, which makes monitoring devices and traffic fairly difficult using tools like PRTG or Munin.

I needed a solution to see what devices were absorbing bandwidth in my flat. Having a horrible 3.5mbps internet connection (thanks BT for your insistence to not upgrade infrastructure in a busy growing residential area in a major city), one device can very quickly suck up bandwidth and it’s always difficult to pinpoint who’s guzzling data. I had set up the port connections so so my room was on port 4, wifi was on port 8 and the living room was on port 7, so I had some way of setting QoS port rules and throttle the ports, but I still had no way of easily monitoring the bandwidth consumption. The only bit of information the switch gives me through the GUI is bytes sent and received.

Hmm, I can use that information. PRTG has a sensor API and a python interpreter.

The switch provides a limited amount of port traffic information, but it’s useful enough!

The final result, I wrote a small python script to scrape this information from the switch and create a custom sensor for PRTG. The script authenticates with the web interface and stores the auth cookie for future use (the switch will only allow a certain number of active sessions at one time). The script then loads the port_statistics.html page allowing me to scrape the bytes sent and received. I load the page twice over a recorded time period, do some maths to convert the difference in bytes into a kbps value, and get a nice readable kbps value.

The script also creates a child class of CustomSensorResult (found in the PRTG paepy library). While the class is incredibly useful and sped up my development time by not having to worry about crafting a json response, it was missing the ability to define size and time units as documented in the PRTG API.

An example of the custom sensor information displayed in PRTG

Is it perfect, definitely not. While the script functions, it’s not the most elegantly written thing in the world and can be tidied up heavily. The switch is also not exactly fast to respond to requests, and during testing the script did timeout occasionally or give me really bizarre results, so caching data is certainly needed.  Debugging with PRTG is also a challenge, as I’ve not yet found a way of seeing any python error dumps within the GUI.

I’ve missed building little useful scripts like this. It was good fun to build this and develop my python knowledge (and get out my python book to figure out how to properly work with parent classes), and I certainly need to do this more often.

If you find this script useful with any compatible Netgear ProSafe GS switch, please star the git repository or drop me a tweet @mattyribbo. It’s always nice to know that someone found something I wrote handy.

February 9, 2017 at 9:51 pm | Blog, Programming | No comment

June 21, 2015 at 1:06 pm | Blog | No comment

A review is not something I do. For this phone, after using it as a cheap smartphone for Download Festival, I feel it’s worth giving my two cents on this device. So here we go – a review of the JIAKE F1 Android Phone, bought for £40 including postage off Ebay.

Jia-who?

JIAKE, or to use the full name, Shenzhen JIAKEDA technology co. LTD, is a Chinese phone manufacturer. At the time of writing, their website was not working, but there was a shop showing a selection of very similar looking Android phones, some looking very suspiciously similar to other manufacturer models. We’re expecting quality here*.

* We’re not expecting quality here. We’ve got quite low expectations.

What do I get for £40?

First, you get the mobile phone and a 2200mAh. It doesn’t feel terrible in the hand, the plastic back isn’t a horrible flat cheap plastic as say the Samsung Galaxy S3 has, so points on that one.

IMG_1674

It comes with some basic in-ear headphones (which I would not trust to give me a decent quality sound), an EU USB charger (thanks for the effort for not giving me a UK charger), a Micro-USB cable which seems solid enough, and for some bizaare reason, a case with Michael Jackson on it. The case makes handling the phone very uncomfortable and parts of the plastic want to cut into my hand.

IMG_1678

There’s also a small 8 page manual in very broken English. Here’s some examples. “Calculator. This feature allows you to mobile phone become a calculator. carry on some simple arithmetic.” “From computer to transfer music, photos and otehr files to your memory card, you must dfirst mobile phone memory card is set to U disk.”. It’s confusing, and again, I wasn’t expecting much.

The box is an interesting one. The front, of the box looks like it’s having an identity crisis. You see the phone, but you also note in the top left of the phone screen it says ‘iPhone’. Quality.

IMG_1671

The back is no better. It’s a direct copy of the back of a Samsung Note phone.

IMG_1673

The phone

Specs wise, it’s nothing to write home about. Dual Core 1.2Ghz, 512MB RAM, 854×480 TFT screen, basic WiFi GPS, nothing special. The phone has Dual SIM though, which was useful at a festival when EE would decide to muck up and I’d have to rely on GiffGaff being solid.

Screen wasn’t fantastic. Looking at it straight on, it’s not terrible, but the viewing angles is naff.IMG_1681

Phone calls were OK. The sound quality was poor, but just about OK to hear what the other party was saying. The other side was able to hear me properly, so not a terrible experience. Switching between SIM cards was painless, more thanks to Android.

The Dual SIM side of things is pretty solid, but once again that’s more thanks to the Android OS being able to handle that well. 3G worked fine on both SIM cards, calling and texting between the two was simple.

Sending text messages and emails and using the on screen keyboard was OK. You were given by default a custom keyboard, but switching to the default Android keyboard was painless, and worked fine. Swiftkey didn’t want to respond at all on the phone.

Now, trying to do anything else on the phone, like use the Facebook or Twitter apps, BBC News, Spotify, anything, the phone ends up getting overloaded very quickly. Apps will grind to a halt, or will just close randomly. Try using something memory intensive like Chrome, ha! Good luck. 512MB of RAM on that phone is just too little! You cannot do anything useful.

I tried to use a memory optimiser (Du Speed Booster is my personal choice). It helped, but when running no apps and you’re at the home screen, you only have 16% of memory remaining, you’re not going to be able to do much.

Listening to music. Wow the headphone jack is awful! The maximum volume out of that jack is poor, the audio is distorted, I didn’t think it could be that bad. Thankfully, during Download I was able to hook up my bluetooth speakers, which apart from when the phone ran out of memory and crashed, worked fine.

Camera, I would like to point out that it was advertised as a 5.0MP camera, and on the back the phone says ‘HD’.

 

IMG_1675

Somehow, I don’t think so.

IMG_20150621_123658

Overall verdict

It was an end to a mean. I needed a smartphone for a music festival with wifi, which I wouldn’t have cared much for if it had got nicked. It served that purpose. Using it for a week, it wasn’t terrible but wasn’t a great experience. Using it as a full time phone, no. Not a chance.

June 21, 2015 at 1:06 pm | Blog | No comment

January 3, 2015 at 8:35 pm | Rant | No comment

amazonlogistics

If anyone has ordered stuff through Amazon and have had to deal with a disgrace of a courier service on a constant basis, then you have my deepest sympathies. If you’ve not, let me explain how utterly crap they are by sharing my previous experiences.

April last year, I ordered a pair of vans shoes. Amazon Logistics were tasked to deliver the item to my workplace. They make the delivery the next day at a reasonable time, but not to the right place. Instead of my office, they managed to deliver it and other campus deliveries to one of the on-campus accommodation offices instead. Apparently the delivery driver just dumped a pile of parcels and walked off. I end up going in the next day to collect the parcel, but it’s disappeared, lost in my university’s internal mail system. Two calls to Amazon customer services and they send me a new pair out, nearly two weeks later. You could blame my university’s mail system for losing the parcel completely, but it was the pure laziness of a Logistics driver who caused the problems. Both me and the University complained about this.

October last year, I ordered two WD Red hard drives. Amazon Logistics were the courier of choice once again, ordered Wednesday, out for delivery on Thursday to my work place. They thought delivering at 6pm to an office was a smart idea (You would have thought a parcel labelled “University of the West of England” would have given it away), but they didn’t even attempt to ring the bell at the door or look inside to see that there were still people working. They attempt again on Friday but just plain failed to turn up. After another heated phone call to Amazon customer support, they offered me an extra month of Prime and then delivered to my home address, but they weren’t willing to deliver until Monday. So much for using the weekend to set everything up.

This week, my housemate Dave used my Amazon account to order a smoothie maker. Simple enough, dispatch Friday and be here today (Saturday). Amazon Logistics were once again selected to make some sort of attempt at a delivery. At the same time I had some cheap speakers and a HDMI cable also dispatched on the same day. At 12:32pm, DPD arrive with my speakers. At 8pm today, I still have nothing from Amazon Logistics. I ring them up and give them a piece of my mind once again, demanding they mark on my account in capitals “DO NOT USE AMAZON LOGISTICS”.

I’ve not even mentioned the several times Logistics have sent out next day deliveries, only for them to not bother the day they’re due for delivery and end up delivering two or three days later than asked. What am I paying Prime for Amazon if they can’t be bothered to give me next day delivery.

There’s also the countless times Amazon Logistics have been tasked in delivering stuff ordered by my workplace, and fail to deliver on time or deliver at all.

Amazon Logistics are hopeless. They’re an abomination, disorganised, unaccountable and useless. They make Yodel look good (Yodel make the deliveries on time, just always to the wrong address it seems). Amazon Logistics needs to be shaken up and reorganised, or just cease to exist. Use other couriers like DPD. They are fantastic, always appear when they say they will. Why can’t you do that Amazon. Explain?! Even Royal Mail is a better substitute.

If you want more bed-time reading of how poor Amazon Logistics are, here’s a whole forum thread of complaints on Amazon’s own forums.

January 3, 2015 at 8:35 pm | Rant | No comment

July 6, 2014 at 3:42 pm | Blog | No comment

Back in October, I was involved with a different kind of charity fundraising event – a 25 hour gaming marathon. The event, ‘Ctrl Alt Donate’, was run by one of my trusted friends Tig to raise money for Bristol Children’s Royal Hospital. Last Friday, £700 worth of toys and games were donated to the Hospital, a fantastic result!

Pile of gifts donated from funds generated by Ctrl Alt Donate

Pile of gifts donated from funds generated by Ctrl Alt Donate

If I rewind the clock days before the event on November 2nd 2013, I can remember me frantically trying to sort out internet access for the event. You’d think getting an internet connection was trivial but there’s a whole load of red tape to jump through with the university’s IT systems, making sure that computers were secure, security considerations, and so on and so on. It also didn’t help that there was an IT maintenance and shutdown weekend. It was looking unlikely to be able to get the provision, but days before the event, a breakthrough occurred, we had internet!

To see the toys finally appearing and being donated on Friday was a nice feeling, and to get a mention from Tig in the press release was really kind of him and I thank him for that.

But then this post on our Facebook group was made by Tig:

We need to do more for the hospital. What we’ve managed to do is huge but I had no idea just how much help they need. The quote that hurt me the most today was “what we do is still seen by many as being a luxury, rather than a key part of a child’s treatment”

What the event did was fantastic and raised a lot of money, there’s no doubt. However after hearing what Tig experienced on Friday, I think that just spurs the next Ctrl Alt Donate to be even bigger! Roll on Saturday 25 October.

July 6, 2014 at 3:42 pm | Blog | No comment

December 11, 2012 at 10:26 pm | Blog | No comment

In root on my dedi, I’m normally well behaved. Then I slipped up. Though a normal set of circumstances, I end up deleting *everything* in /usr/bin (the unix equivalent of deleting all executables in system32).

All I was doing was upgrading transmission on my server. To make this happen I needed to delete the old bin files off my server. Found them in /usr/bin, but instead of rm transmission-* I ended up doing rm *. Then you wonder why nothing works, oh wait I just deleted every core unix application on my dedicated server of course nothing will work.

So yeah, stupid me. How did I get out of this situation. Thankfully I know people running Arch x64, got in contact with him, he sent me his /usr/bin folder. Then just to make sure, found a script online to reinstall every single package. All 600 of them (apart from arch key manager, that rubbish always hangs when updating).

Disaster averted, lesson learnt, I’m an idiot.

December 11, 2012 at 10:26 pm | Blog | No comment

October 6, 2012 at 12:33 pm | Programming | No comment

This is a munin plugin for displaying icecast2 listener statistics.
Icecast2 Munin example

In short, Hub Radio needed some way of getting listener figures recorded, and development of a custom stats panel is slow to say the least. So I decided to get a graph on Munin up and running. In the Munin plugin repository there was an old icecast2 plugin, unfortunately out-dated and broken. So… I fixed it and got it working.

This plugin will record global listeners, number of mount points, and individual mount point figures.

https://github.com/mattyribbo/icecast2-munin

Have fun.

October 6, 2012 at 12:33 pm | Programming | No comment

May 14, 2012 at 7:41 pm | Blog | No comment

Don’t ask. I still don’t know why.

May 14, 2012 at 7:41 pm | Blog | No comment

Next Page »