Tag Archives for tech

Monitoring Bigpond Broadband usage with mrtg (Windows)

[update 23/7/2004: TristanK has added to the script to remove the requirement for lynx. A thousand thanks.]



Bigpond Broadband* is a cable/adsl ISP in Australia. As with almost all Australian ISPs, they provide a limit on the number of megabytes that a user may download in a month. In order to help a user monitor their usage and avoid paying astonishingly high excess usage charges (currently $0.15 per Mb) Bigpond provide a service known as the ‘Usage Meter’. Although unreliable, the Usage Meter is the best available way for a Bigpond user to monitor their quota usage, as it takes into account the ‘unmetered’ traffic (to some Bigpond internal services). Client side monitoring will not reflect the numbers that go onto a user’s bill.


Recently Bigpond has released some client-side tools to allow a user to tell at a glance what their current metered usage is. These take the form of an Internet Explorer toolbar or a small applet in the system tray. Although not incredibly useful themselves they introduced something useful - a usage meter XML feed. With this we can create our own client, and that is what this article is about.


I have developed a way to use free tools to create graphs of your Bigpond usage over time, such as the sample image below, of a week’s usage:




What you will need:


  • Perl - I use Activestate Activeperl. This is a free, quality-assured perl distribution. Perl is a scripting language.
  • mrtg - the Multi Router Traffic Grapher. Originally a tool for monitoring network links, its usage has been expanded by the community to be a multi-purpose monitoring tool.
  • FireDaemon or srvany - Both of these tools allow you to run programs as Windows services, FireDaemon is a commercial product with a free version, and srvany is part of the Windows 2000 Resource Kit (and also the NT4 Resource Kit - maybe 2003 as well?).
  • Windows Script - although you probably already have this installed, you can get the latest version from here.
  • This script - this is the script that I wrote (remove the “.txt“ when you save it).
  • This CFG file snippet - add this to your current CFG file.
  • A web server such as IIS or Apache (not required).

I will not go into installing ActivePerl and mrtg, this is covered extensively elsewhere. I am assuming that you are now at the point where you have mrtg running and have produced some graphs.


Add the CFG snippet to the end of your mrtg CFG file - making sure that you edit the line


Target[bpausage]: `cscript //nologo bpausage.vbs`

to reflect the full path of the script, if necessary. The next thing you will need to do is edit the script (bpausage.vbs). There are two (or five, if you use proxy authentication) things that you will need to change in the section marked “Edit Here“ your Bigpond username, and your Bigpond password (and your proxy URL, username and password. Because your username and password are stored in clear text, please do not place this file somewhere that Bad People can get to it. The actual internet connection it makes to the Usage Meter is via SSL so you are pretty safe there.


The current plan that I am on allows for 5GB of usage per month, so I have tweaked scale of the graph to be relevant to me, showing a scale from 0-6 GB. Yuo might be on a different plan, so here is how you make the graph relevant to yuo. It is these lines that affect the scale:


YTics[bpausage]: 6

MaxBytes[bpausage]: 6000
AbsMax[bpausage]: 6000

The YTics value is how many vertical sections are in the graph. The MaxBytes and AbsMax values should be set to the number of GB in your plan times 1000 (Bigpond count a gigabyte as 1000 megabytes).


The way that the whole thing works is this:


  1. when mrtg does its 5 minutely run, it starts the script bpausage.vbs
  2. the script connects to the Usage Meter and logs on as you
  3. the usage meter returns XML data about your usage
  4. the script processes the XML and outputs it in a format mrtg can understand
  5. mrtg processes the data and updates the relevant graphs

The output graph shows two values - the total usage (both downloads and uploads) in solid orange, and the upload usage as a blue line. Look at the sample above to get the idea. While you look, notice the little dips around Monday/Tuesday. These are evidence of the increasingly frequent cable outages in my area. If you are not like me and are only online from time-to-time, the graphs will give you an idea of how long you spend online.


I would like to thank this project for giving me a head start, as it does basically the same thing for a *nix environment.


I hope that this article is helpful to you. Feel free to comment below, and if you find an error or make an improvement then I would love to find out about it.


*Bigpond Broadband a.k.a. Bigpond Advanced, Bigpond Cable, BPA, BPC, BCP.

Popularity: 9% [?]

i just realised

.text? Surely this is not the dominating blogging engine out there?

Popularity: 2% [?]

OMFG! Google is down!

I cannot get to google. Tristan cannot get to google. I cannot get there from home, from work, or from an anonymous proxy in the US.



Has there been some kind of war?


[Update 11:44] microsoft.com and yahoo.com also seem to be affected, all three are up and down like a yoyo. I am off to make sure all my servers are patched.

Popularity: 3% [?]

Orkut crazy

I have only been on Orkut for less than two days and I am already addicted. It is fun to build up a network and surf the people. The novelty is certainly a factor, I imagine things will slow down once I stop adding people that I know, but I am still enjoying it. I understand that the concept of a social networking site is nothing new, but this is the first time I have cared to join one. I think that this is because the site is invitation only. It is hard* to get in. So it has value, the other sites did not.

Orkut is very slow.

If I know you and you want me to invite you to Orkut, add a comment.

[Update 5 June] Orkut have made some infrastructure changes overnight and now it is fast

Popularity: 2% [?]

Firefox

I have been using Mozilla Firefox as my secondary browser for the last few weeks, and I am impressed. I use Avant Browser most of the time, but I am noticing that I am gradually increasing my use of Firefox. I chose Avant over Internet Explorer because it has tabbed browsing and cool middle mouse button stuff. Firefox has all of the features that made me choose Avant, except it does not use IE to render the page (as Avant does). This is a dual-edged sword. Firefox has PNG transparency and all the fancy standards-compliance stuff. IE lacks this but, in reality, whatever IE supports is the standard since everyone uses IE.

I can see that Firefox will replace Avant as my main browser, but for the time being I must also use IE. Basically, the only things that keep me using IE are the toolbar support and DHTML Edit Control (for writing blog entries).

Popularity: 2% [?]

Enjoy® DialUp

Due to the Issues mentioned in a previous post, we do not have a high-speed connection in the Melbourne office at the moment, and this is where I am. We are currently making do with a dialup connection, which basically limits us to email and the most basic of services. I have had to set exchange to reject all emails with attachments just so that we can survive.

I have not used dialup since I first got a cable modem in January 1999. O.M.F.G. It is so unbelievably slow. It is no wonder that your Average Joe’s life is not dominated by the internet when he is limited to dialup speeds.

Enjoy Dialup!

Popularity: 2% [?]

It DID happen

So here I am in Melbourne. Once again there are problems that might prevent me from going home. Once again this is because of Telstra.

Our Melbourne branch is in the process of moving offices, which means that new phone lines need to be installed before the move, and one of the analog lines needs to be activated for ADSL. Luckily this was all organised weeks in advance so that the time there would be no problems. Sigh.

I found out on Tuesday that Telstra had supposedly never received the application for ADSL from my chosen ISP, it had magically disappeared. I asked the ISP to re-submit the application and kept pestering them repeatedly until I got escalated. At least the analog phone lines were ready, once the line is provisioned for ADSL it will be plug and go. I delayed my flight for a day so that I wouldn’t be wasting any time. I arrived in Melbourne at around 8:15PM on Wednesday night.

This morning I called the ISP call centre to check on the status of my application. It had been escalated and was being provisioned, it should be working by Friday. But there was a problem with my other application, the new one I had made on Tuesday. It was going to be denied by Telstra. The kind lady at the end of the phone explained to me that you can only have one ADSL service per phone number, so I shouldn’t have applied twice. I re-explained the situation. She was very helpful and called Telstra to chase up for me, calling back within 5 minutes. I may very well get to go home after all.

I arrived at the new office this morning ready to get things going. I had anticipated Telstra ADSL shenanigans so opened a dial-up account Just In Case. I went to plug the modem into the wall, but there were no analog outlets. I checked the patch panel. None. The frame. None. Sigh. The cabling contractor explained that although Telstra had installed the lines through to the building’s MDF, they did not have dial tone (only side tone, whatever that is). Icy hands grabbed my heart. If there is no dial tone, then the line might not be activated, if the line isn’t activated, they might not provision for ADSL. Such a familiar feeling.

I called the Telco who logged a fault with Telstra, they tested the lines remotely and found a problem, they would respond within 8 hours. I could feel my weekend slipping away from me.

A Telstra tech arrived within two hours. He checked everything and found that the cabling to the MDF was fine, he found dial tone. Someone had connected it in the last 2 hours. I called the cabler and he will supposedly be here by 3:30. So maybe I will get analog by the end of today and at least have dial up. BTW I am in an Internet café now downloading drivers and firmware.

I will update through comments.

Popularity: 2% [?]

It is happening again. I just know it.

Tonight I fly to Melbourne for 2 days. It won’t be two days. It never is. If I am back in a week it will be a miracle. Telstra is involved.

I wish that Telstra was a person, so that I could murder them.

Popularity: 2% [?]

I have decided

That I have Asperger’s Syndrome.

Popularity: 2% [?]

Tips for linux developers

I bought my first linux cd in 1997, it was Yggdrasil linux. It was very exciting, a free UNIX that I could install on my own PC! What possibilities!

Since then I have installed a few different flavours of linux, enjoying the challenge of trying to get it working before going back to good old usable Windows.

This week, while troubleshooting my brother’s computer problem, I thought I’d try the Knoppix linux distribution that has just come out. This is a linux that comes on a bootable CD and does not require a hard disk, the whole operating system loads from the CD. It started as advertised, even the Realtek NIC was correctly identified and configured.

My suggestion to the developers of linux: find a way so that when you click on an icon, the thing written under the icon happens. I think that this would make linux much more usable.

Popularity: 2% [?]