And then we went to the mother-in-law’s

Started off on the ima4 codec again. Managed to convince the iMac to convert a wav file to an aifc. That was still getting distortion, traced that to it using the step/sample hint on each block each time, when normally it doesn’t really need to. In the end I only used that for seeking. Worked fine in the end, decodes lovely. Now doing the encoder, which is straightforward except for the file format which contains a 10 byte encoded float just to complicate things. Will get that finished pretty quickly. Then I want to add an MP3 encoder and that’s about all codec work finished then except may be for Android.

Jamie actually walked the dog with me today, so same distance, but my arm didn’t feel like it was put through a mangle.

Went to BodyPump, no running afterwards as we then headed out to Alison’s as it was her birthday the other day.

Now back, about to hang up the washing and eat pizza. Fun days.

pfSense news, had a bounced mail today as it appears that it’s not sending out on the correct ip addresses, will need to investigate further. But defo next job is to pile it all into the cabinet.

Ha, got you, you bastard

Started out fixing a couple of mobile game issues then working on yet another bloody codec. This time IMA4 which has yet another file format, at least this one is RIFF based. Managed to get it decoding without too much stress.

So then on to the outstanding issue, the bloody UPS and powering down / up the server and the pfSense box. First thing I noticed was that when the pfSense box shut down, it magically woke again when the server deconfigured the network. Then another problem when the server was booting I couldn’t get the script to activate in the correct place to wait for the network to come up.

Anyway, the final solution….

pfSense box has it’s shutdown modified to trigger after 1 minute. This needed to be done in the package php script rather than the nut conf as it reruns it every reboot. That’s the only change required on the pfSense box. On the server the nut script is modified so that it pauses rather than shuts down the ups. Then a script is added to to init.d, this checks the shutdown flag, if set then it sends the wake on lan to the pfSense box and deletes the flag. It then starts a reboot on another bash shell set to 2 minutes, this stops the script jamming and also stops an issue with grub reporting a bad boot and stopping on the grub screen.

So it works like this: Power goes off, UPS goes critical, server then sends a remote shutdown to pfSense box. pfSense box then starts a shutdown delayed by 1 minute (to stop the reboot from the network deconfigure). Server then shuts everything down and just waits. Then either the UPS power runs out and everything shuts off or power is restored. Doesn’t matter either way, the server will reboot after a time out or after the power is restored. Server boots, power kill flag is set to script runs a wake on lan to pfSense box. pfSense box starts booting. Server starts a shutdown and reboot for 2 minutes. It then continues to boot and fails all over the place due to no network. Eventually gets to log in prompt. Then shutdown occurs and reboots. Server then boots normally as pfSense box is now up. Job done. Yes I am good.

Also went to gym, ran for 72 minutes and knocked up 1000 calories. I’m now going to drink wine, eat cheese and watch torture porn.

So the secret was gag

So started off finishing that damn mp4 library and finally finished it. Tidied up a couple of other bits then will hopefully move on to IMA4, which is yet another bloody file format.

Went to take the dog out and it pissed down before we got to the end of the street, so that delayed I had a salad sandwich instead. Did a bit more work then the dog finally got her walk in bright sunshine, so was worth the wait.

Did a home check for Hollyhedge for two kittens, then went to the gym and ran, not so long tonight I couldn’t really be arsed.

So came back to this boot problem. Earlier I did flash the bios to the latest but that made no difference. I tried fdisk and installing a new MBR (master boot record), but that failed. So out with the ‘ultimate boot CD’. Installed ‘gag’ boot manager in about 3 minutes and then it magically all booted without any of this PXE network crap. So shut it down and fired it up using WOL and it all booted fine. So that’s the end of that problem.

Then just as I was about to have dinner before midnight Jamie started moaning about wireless performance again. So I ended up digging out an old Wireless-N Netgear router and setting it up as an access point. To me the throughput is slower, but it does seem to be more reliable. I’ll upgrade the firmware on it and see how it compares. It is on a dedicated NIC. One thing that amuses me is that it’s a 300Mbps router yet only has 100Mbps network ports. I have enough routers to start my own shop, so should be able to find one that works reasonably well.

Finally got my salad.

freeBSD PXE wake on lan, arse

Ok, so I spent the bulk of the day stripping crap out of that MP4 file lib again. Fixed up a couple of mobile issues.

Walked dog, went to gym, ran lots.

So, back to UPS plan, set up a remote client, enabled in firewall, installed NUT on pfSense box and set it up to connect to server. Surprisingly worked first time. Next task was the wake on lan, installed etherwake, a few bios twiddles and boom, powered up the machine. So I thought I was home and dry, except it was sat on the boot screen, trying to boot from the bloody network. I thought this was a problem with the Intel NIC cards that have PXE boot built in, so installed some Intel prog on a USB stick and disabled the flash on the Intel NIC’s. Then it still tried to boot from PXE. Turns out that this appears to be part of the freeBSD loader. So it now looks like I need to replace the loader. Oh the joyous fun. One step closer, three steps back.

On to bowel news, things returning to normal, only about three times today. So hopefully crack the boot problem tomorrow….

Nut driving me nuts

So the day started waiting for the rain to stop. It didn’t. So I waited for Lisa to turn up then took the dog out then, thankfully the rain held off.

Moved on to lunch, salad sandwich, why break a tradition even if it is a bank holiday.

Then moved on to NUT and configuring UPS scripts. To be fair I didn’t really have any issue with NUT itself, just the Belkin driver. There is a modified driver that I just completely failed to get working under Ubuntu. In the end I went for the USB driver as well it’s just a bit more modern. The problem with the Belkin UPS is that it doesn’t support a soft shutdown, in other words if the mains fails and the UPS goes critical and shuts the server down then when the mains comes back up, bugger all happens, the UPS stays shut down. The only way round it is to get the server to the point just before halt, then just sit there and wait. If the mains comes back on, wait for a maximum of about 20 minutes then perform a reboot. If the UPS fails then the server just shuts off. Now, if the mains comes back up the UPS does the decent thing and powers everything up. Now this is all jolly except for one fly in the ointment. If the UPS monitor has remotely shut down the pfSense box on a critical, if the mains is reapplied before the battery is exhausted then the server will reboot but the pfSense box will remain shut down. I think the solution here is wake on lan, one for another night.

Yesterday I probably ate too much and appeared to put on 4 pound by this morning, but today I’m about 1000 calories under (after running 51 minutes this afternoon) and been nothing but shitting all day. I feel backed up like the Severn Tunnel. So lets see how long it takes to drop those 4 pounds again.

I was manly and dug garden then did BBQ – ugg

Ok, so got up perhaps a little later than I should have done. Took the dog for a two hour walk where she was mainly a pain in the ass barking at everything. I then cam back and cleared up the dog shit and the mass apple fall of the week. Proceeded to eat two slices of toast (no cheese), then continued my great gardening quest. Three and a half hours later the front hedge is now no more and it’s all flattened and seeded. I worked bloody hard on that garden. The back garden now contains half a ton of soil that I will need to slowly move into the green bin over the coming weeks. I also removed the old dog loo (she never used it anyway) and filled that in with some of the soil.

I then did the manly thing of doing the BBQ. None of this gas shit, this is charcoal and man who makes fire territory. Successfully downed two burgers and a couple of sausages together with some of Levi Root’s famous sauce. I’m now as they say somewhat knackered and about to have a bath and collapse, in the knowledge that I’ve done something constructive that didn’t involve Ubuntu or pfSense. I’m not sure eating an entire jar of pickled onions was a wise move though.

I am the king of the scripts

Strange day. Got up late as usual as it was a Saturday. Walked the dog in bright sunshine. Then met up with Jamie to do the shopping as he was finishing early. I then had lunch and went back to bed. Then resurrected around 6 (what happened in the meantime I’ll leave as an exercise to the reader).

I then went to B&Q and did very manly things like buy grass seed and top soil. I’ve then been piddling with pfSense again. Installed the new wireless PCI card, which won’t actually fit into the case until I take a hacksaw to it, but it appears to at least be working fine.

I’ve then spent the rest of the evening adding a startup and shutdown script in the correct place in Ubuntu to control the UPS, the scripts are working correctly even if the UPS driver doesn’t seem to be. But that’s going to require more testing I thing.

Did the accounts. Now about to have a shower and cook the dinner. Tomorrow I did have the oppertunity of going out to dinner in the afternoon, but I think this is going to be my last day I can actually get on with the front garden and get the grass seed down. So I’m going to be very dull and do manly gardening tasks. In the evening providing it’s not pissing down we will be having a BBQ though (yes, sad, just the 3 of us and one of them chases her own tail).

So, Nut and pfSense where are we currently at

Ok, so pfSense now appears to be stable, even on the development trunk if I don’t run the wireless USB dongle. Looking at the kernel panics it was always coming from the ‘run’ driver, so after removing it all looks good. I’ve ordered this new PCI wireless card that should work with another driver so will see how that one pans out.

Nut wise, well that all appears to be working, I just need to do something sensible with the messages and sort out the start up and shutdown scripts, then do a lot of testing with it.

Server wise, everything else seems very stable. No issues overall which is very good. There are still a couple of odd firewall port issues to sort out, but nothing major. So it is all finally getting there. I think the next job will be to test out the UPS stuff then move the server into the network cabinet. I’ll leave the pfSense box out for now until I fit the wireless card and do more soak testing on it.

Work wise, been stripping back that MP4 lib some more. Bit of a tedious task, but has to be done. Did a couple of minor mobile game changes.

Went to gym, did Body Pump, then ran for 50 minutes. That must mean I can have at least one glass of wine and may be a few beers…

Anyway, must be wine o’clock and bath time. Oh and all the other Friday night shit like hanging up washing, emptying the dishwasher and doing the washing up. All the stuff Jamie doesn’t do. He did surprise me last week though, he managed to change the loo roll without any outside assistance.

My Nut’s are emailing me

So I spent the bulk of the day pissing about with PS3 compiler issues on VC2010. In between I added one small addition to a mobile game. I did manage to look at NUT again though and worked out the script problem, it needed it’s group changing to ‘nut’ then it was able to send mail from nut@root without any problem. I now need to write a script to actually do something useful, including shutting the bloody server down. Due to it being a Belkin UPS there are a couple of oddities to do with ‘what happens if’ type scenarios, like if the power is restored during a shut down. There are some scripts to handle this, but I’m not sure how far I want to take it, it’s hardly NASA and isn’t exactly mission critical. I think in 15 years we’ve had about 20 power cuts and in that time the UPS has always outlasted the cut.

Still having fun with pfSense, it reboot another half a dozen times. Looking at the kernel panics it appears to be the wireless driver. So I’ve yanked the dongle out and ordered a PCI card from ebay which should use a different driver. In the meantime I’ve connected up the old router to use as an access point. I’ve also gone back on to the development versions of pfSense as there still seems to be a bit of an issue with pppoe not reconnecting properly. I’ve added a link up/down to one of the scripts to try and shift this. I’ve done a few tests and so far it’s been fine. But yet another thing to keep and eye on.

Went to gym, only ran for half hour. Now it’s salad time and torture porn night, so I may get a glass of wine in, what a naughty boy.

Going nuts and avoiding cheese

So today I was finishing off this damn AAC codec and finally got it all working. So now it supports both ‘main’ and ‘low complexity’ objects and encodes them nicely. One oddity with AAC is that there is a single frame offset at the beginning, which means the encoder runs for a while before it outputs anything. Then at the end of it you have to call the encode multiple times to get it to spew all the data back out again. It also means that if you skip while decoding there is a discrepancy between the length it thinks it is and the length it actually is, that one I’m going to forget about.

I’m now in the process of tidying it all up. But almost done.

Then off to the gym and ran far too much, 49 minutes and 739 calories. Came back to moaning about wireless connectivity. I tried a few things but it’s working fine on my devices.

I then started play with NUT. This is the linux UPS handler thingy. I’m trying to get it to mail me when the power fails and its a pain in the ass to configure. There’s also another odd problem I’m now having, if the ethernet modem goes down and comes back up again, the pfSense box tries to log in to the modem dhcp address and not the wan ip. Oh the joys.

And yes, I’m craving cheese, been almost a week now. 3AM again, piddling about to much as normal.