Updated: psmisc, gw6c and gjay

Time away from work and its been either raining or hot. So I’ve updated and released some software.  It always seems to happen there is a lot of Free Software development during the breaks.

psmisc got a bunch of updates, including a new program called prtstat which formats the stat file in the procfs for a pid in (hopefully) a nice way.  No sooner had I released the latest update when a bug report came in. It seems fuser -m -k is a little too happy about killing itself. The fix is in the CVS but anoying I missed that.

Next up was the Debian gw6c package. I was asked why it didn’t get moved from unstable to testing.  The problem is that while Linux has iproute, kfreebsd does not so the lack of a dependency was stopping it transitioning.  To make matters worse the freebsd template was missing from their package.  After some deb-substvars evilness to fix the dependencies and some dh_install overrides in the debian/rules file it should all be happy when its finished.

Finally, I miss having good random playlists. I’m too lazy to make them myself so I use some random thing which often gives me rubbish.  A program called Gjay used to be in the Debian archive but got removed, mainly because the upstream stopped supporting it.  I can write C (the programming language its written in) and I wanted to use it, so I fixed it.  My version is 64-bit clean, so it works on my amd64 and it works with audacious not the old xmms which is great.  More importantly, it compiles, it runs and it even works properly.
I’m just wondering if I want to release it out to the wider world or not.

Why clocks don't work in PNG

One of the good things, or perhaps the worst thing (it depends on where
and when) about my job is I travel a bit.  One of the more interesting
places (again in both good and bad ways) was Port Moresby,
Papua New Guinea. Lots of stuff doesn’t work too well over there. It’s
hard to get experience maintenance staff, its hard to get the right
parts over there and probably the hardest part is paying for it. 

I
was always surprised the clocks never work right. They are either
horribly fast or slow.  At first I thought the hotel had just not set
it right, so I set it to the right time. But the next morning it was
out again. What the hell was going on?

Most alarm clocks work
off the power. In both Australia and PNG this is 50Hz, so the clock
rectifies the AC power coming in to get 50 pulses a second. Count 50
pulses and you have a second, do this 60 times and tick over a minute.

We
take for granted that the frquency of power is right on 50Hz, but
talking with the students who were doing power engineering it is
actually quite hard to do. It’s like having a car with the same revs no
matter if you are going up or down a hill.

Anyhow, if you need
to wake up the right time in PNG, use the alarm clock on your phone.
Otherwise you may be jumping out of bed at 5am thinking you are running
late, then wondering where the sun went.

Changing Sites

While I originally had a blog site on Avogato, I just didnt seem to use it much.  I needed some place that I could put some writing that wasn’t quite up to a new whole page with the associated heavy work to format it but it had to go somewhere.

So I’ll try to put those middle entries into this place.

Now all I got to work out is how to link the thing to Planet Debian and I’ll be set.

Connecting to Internode IPv6 on Debian

If you are running Debian and are connected to the internet by Australian ISP Internode you can connect to their tunnel broker. This page describes how to do it with a few simple steps.

For more information about what Internode is doing with IPv6, have a quick look at the Internode IPv6 page. That page will give you some basic overall view of how the system is setup. Don’t use the instructions they give you. While they do work, its a lot more complicated their way.

##Information to collect

Before you start, you will need to know the following information:

* Your internode username and password, this is the same details that you put in your ADSL modem to connect to the ISP.
* Decide if you just want the Debian computer using IPv6 in “host mode” or you want everyone on your LAN to route through this computer in “router mode”.

##Installation
You will first need the gateway client program, which is found in the Debian package [gogoc](http://packages.debian.org/gogoc). If you are running in “router mode” you will also need to install
[radvd](http://packages.debian.org/radvd). Both of these packages are in the Debian main distribution so you can download them the normal way you get your Debian packages.

Edit the gogoc configuration file */etc/gogoc/gogoc.conf* to suit your situation, the important lines are:

userid=MY_USERNAME
passwd=MY_PASSWORD
server=sixgw.internode.on.net
auth_method=any
host_type=MY_HOST_TYPE

For MY_HOST_TYPE, use “host” or “router” depending if you want just this computer or everyone on your LAN to have IPv6 respectively.

##Starting gogoc for the first time
When you first start gogoc it will try to make a secured connection to the tunnel broker. The problem is that it needs to check the key you get is ok. This means that the first time you run gogoc you need to do it on the command line, like this:

server# invoke-rc.d gw6c stop
Stopping Gateway6 Client: gw6c.
server# gw6c
sixgw.internode.on.net is an unknown host, do you want to add its key?? (Y/N)
server# killall gw6c
server# invoke-rc.d gw6c start
Starting Gateway6 Client : gw6c.

The server key is now stored in */var/lib/gogoc/gogockeys.pub* and the program will start automatically with no further key problems.

##Checking its working
There are a few ways of checking your configuration is working:

* **pgrep gw6c** returns the pid of the program
* Use ifconfig program on interface tun0 or (if you are in router mode) eth0 should show inet6 addresses starting with 2001:44b8:: prefix which belongs to Internode.
* Browse to and watch the bouncing Google words.
* ifconfig output should look something like the following:

server$ /sbin/ifconfig  | egrep '(Link|inet6)'
eth0    Link encap:Ethernet  HWaddr 12:34:56:78:9a:bc
     inet6 addr: 2001:44b8:42:22::1/64 Scope:Global
     inet6 addr: fe80::234:56ff:fe78:9abc/64 Scope:Link
lo    Link encap:Local Loopback
     inet6 addr: ::1/128 Scope:Host
tun   Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
     inet6 addr: 2001:44b8:41::43/128 Scope:Global