Dan’s View

2010/03/01

ShoutCast Stream Meta script

Filed under: Geek,Programming — Tags: , — dan @ 10:00

Using the following python script you can pull the meta info from a playing stream. The headers variable will contain the Radio Name and other things, and the meta’s returned will include the currently playing track.

source

Example output:
dan@x ~/ $ ./get_icy_name.py
{'headers': {'icy-genre': 'Techno Drum and Bass', 'icy-notice2': 'SHOUTcast Distributed Network Audio Server/Linux v1.9.93atdn
', 'icy-pub': '1', 'icy-br': '128', 'icy-name': 'Bassdrive - Worldwide Drum and Bass Radio', 'content-type': 'audio/mpeg', 'icy-metaint': '24576'}, 'metas': {'StreamTitle': 'G-Shock Radio Feb 25th 2010 - hosted by Kasio', 'StreamUrl': ''}}
dan@x ~/ $

2009/05/05

Wasted BogoMIPS

Filed under: Geek,linux,work — Tags: , , , — dan @ 14:15

So last week I screwed up in a royal fashion. I caused 1 core on 12,000 servers to be running at 100% with a zombie process. In conversation with a friend he asked “So how many BogoMIPS were you wasting?”, of course I had to find out.

So I grepped out the first core on each box’es BogoMIPS value and summed it up.

Per second: 61099300 BogoMIPS

If you take that figure and multiply it up for 12 hours.

Total: 2639489760000 Million Instructions

For more information on BogoMIPS please see this nice FAQ.

2009/04/21

whois?

Filed under: Geek — Tags: , — dan @ 20:11

“If your ISP has registered with the appropriate databases, our servers are updated on a regular basis so you will have to wait until the next refresh to gain access.”

Would you interpret that to mean they are using whois lookups on IP addresses/blocks to check its location for limiting content to certain contries?

2009/04/09

Unbuffered patch for aircrack-ng

Filed under: Geek,WIFI,linux — Tags: , — dan @ 18:42

If like me you like to pipe things around in the shell then when I looked at aircrack-ng I wanted to script using it. Therefore I wrote a simple patch for the current version that disables buffering to allow the stdout/err to act like they are writing to a log file so good for timely greping around in a bash script. Once I have my WEP scripts polished I will post them up. :)

You can find the patch here.

Use ssh ControlMaster to improve speed of connection time

Filed under: Geek,Server,linux — Tags: , — dan @ 18:02

I often work on many machines and end up with multiple sessions to each. Therefore I finally got around to checking out the ControlMaster and ControlPath configuration of ssh. I added the following to my ~/.ssh/config which is for a virtual machine I use on my laptop, so no network issues in play.

Host vm
 Hostname 192.168.100.101
 User dan
 ControlMaster auto
 ControlPath /Users/dan/.ssh/master-vm

Then in a terminal I ran the following, twice. Once on its own then with an ssh session running in another terminal.

for X in `seq 1 5`; do time ssh vm "pwd; uptime; hostname;" >/dev/null; done;

Without avg.: 0.268s
With avg.: 0.035s

I think that is quite impressive.

For the raw terminal output, please see here.

Update

Of course you can do this dynamically.

Host *
   ControlMaster auto
   ControlPath ~/.ssh/master-%r@%h:%p

Then each socket will be used only when the user, host and port are the same.

2009/02/25

iplayer-dl Centos 5 RPMs

Filed under: Centos,Geek — Tags: , , — dan @ 00:24

So I am setting up something to automatically download iPlayer episodes and needed to install iplayer-dl onto a Centos 5 machine. I don’t like installing stuff on a host without using package management therefore I have created a RPM for it.

You can find the SPEC, RPM and SRPM here.

2009/02/13

Migrations…

Filed under: Geek,Hardware,Server,linux — Tags: , , — dan @ 13:15

Well would be apart from hosing the box within 3 hours.

Once Xen is up an running, mini boxes will be doing it all.

Update: An image I took a while back.

Chinatown Lanterns Jan 2009

Chinatown Lanterns Jan 2009

2009/01/15

Testing UserFly

Filed under: Geek — Tags: , , — dan @ 12:52

I have added userfly to my blog, let’s see how it works.

2008/11/12

eee PC 901 – 2.6.27 – Working eth0

Filed under: Geek,Gentoo,Hardware — Tags: , , , — dan @ 16:52

So I did some more searching and came accross a patch for 2.6.26 that I have modified to work with 2.6.27.

Original: http://people.redhat.com/csnook/atl2/atlx/atl2-2.6.26-4.patch.bz2

Patched: http://github.com/DanBUK/gentoo-eeepc/tree/master/kernel/atl2-2.6.26-4.patch

Gentoo – eee PC 901 – Kernel Configuration 2.6.27

Filed under: Geek,Gentoo,Hardware — Tags: , , , — dan @ 14:18

So I said I would do it and here is is. The current and as I update it kernel configuration for the eee PC 901.

I currently have NOT got the ethernet or bluetooth working, I actually havn’t even started to get the bluetooth working, but ethernet doesn’t seem to want to work. If anyone has any ideas, then hit me up!

http://github.com/DanBUK/gentoo-eeepc/tree/master/kernel/config-2.6.27-gentoo

Older Posts »

Powered by WordPress