Archive

Archive for September, 2007

traffic measurement

12 September 2007 Michiel Leave a comment

I mentioned a while ago that I was still looking for a decent way to measure the amount of traffic that passes over my interface. The problem is mostly due to the fact that my ISP refuses for some reason to measure over a proper 24 hour period (hie 00:00:00 - 23:59:59), instead they have opted to measure the bandwidth, from 09:00:00 - 08:59:59. [1]

As you can imagine this gives somewhat a problem because 99% of all the programs will not adhere to that or will not allow you to change the measurement period. Now for a while I have been wanting to do something like that. It tends to give me chronic headaches when you are trying to do something and have to calculate bandwidth over three different sets of times.

Sounds like teh fun huh :) I used to use knemo for this, but all of a sudden, knemo started to flake out on me and to deliver outrageous results (something among the lines of 106GB over 24 hours and then a 49GB over 2 hours .. which somehow seems outside the norm of possibilities of bog standard 802.11.

So that was becoming rather useless. The second problem with knemo is, is that it only works from within KDE. So dropping X and working purely from CLI, makes it stop monitoring how much traffic passes the interface.

But thanks to the guys in ‘chucks, who took the output of vnstat and poured it into readable chunks, I finally managed to rewrite the above statement to something approaching normal bash_code :)

The result now, looks like this: [2]

[michiel@hades]:[~]$ vdstat
Report Generated on: Wed Sep 12 11:40:57 BST 2007
Received = 71 MB ((73440 kB)
Transmitted = 9 MB (9730 kB)
+----------------------------------+
Data usage = 81 MB (83170 kB)
Measured over a period of 3 hour(s)

So I am rather happy with that. It probably could do with some minor code cleanup in my case, as well as writing the daily results to a logfile somewhere.

But at least it is much easier for me now to keep a decent track on how much bandwidth I am actually using/spilling ;)

[1] – No I have no idea why. It seems you need a NATO clearance higher than my current one to know

[2] – Sourcecode available from here.

Loss of service

5 September 2007 Michiel 6 comments

Well, a week after my initial post that I had some minor hardware failures and my subsequently unimpressed mood seem to have failed in that weeks offering of random goatlings and virgins to $DEITY.

Result: major hardware failure across the board.

1) Whitestar .. our main and server-ish box died spectacularly. Considering this box does DHCP, NFS, local Slackware-12.0/-current mirror and much other goodness. *poof*

2) My freecycle Ubuntu box just proofed how much suckiness it really was and refused to boot up at all.

3) Kethry’s box at that time decided to fail her main harddrive.

Needless to say, there was much unhappiness not to mention I think I enriched the neighbourhood in the more colourful aspects of both the English and Dutch language.

Anyway after sitting down with kethry we had a bit of a talk about the possibilities of purchasing new hardware, which thankfully was possible due to her receiving some extra birthday money (note: must return money. need to rob some kids of their cider money ;) )

Anyway thanks to andarius who was rather (read: extremely) helpful and patient dealing with my absolute noobness on hardware building. However: after a day of debating and looking at the various options I decided to go for a “budget-build” of a new computer, but one that actually will keep me going for the next while. I think I have not done all that badly for about £ 250,- (roughly USD$ 505,- / CAD$ 531 / € 370,- / 4,724,582.69 IDR (well if I missed any other country see xe.com))

The specs are pretty much as following:

Result: A nice and exceedingly fast box, that rather outpaces my previous box. For now that box is running Slackware 12.0 .. in due time I’m looking forward to give Slamd64 a run :) Even though it was pretty stressful at times, I am somewhat happy that I have done it. [2] It was all in all a pretty uhm “interesting” learning experience.

So after being a week offline[3], I need to rebuild this box and keths as well. We’ve also switched away from the Babylon5 naming scheme and gone for a more classical Greek naming scheme. Her box is now named Persephone (or perhaps rather .. her)and mine Hades.

[1] – This had to be replaced as one of the memory sticks turned to be bad. Luckily after explaining the tests I had done (ie swapping memory sticks around and kernel compiles etc), they quickly swapped it around.

[2] – Andarius – a big thank you for your patience and insights :D

[3] – Most annoyingly, the loads of emails and rss/blogs I have to catch up with.

Categories: Hardware, Linux, geek