Awasu
Sunday 15th May 2016 7:24 PM [General]

Those of you who have been here for a while might remember that I used to run a music bar in Thailand a while back. One night, I was doing my one-man show, when a guy in a cowboy hat wandered in and sat down to listen. During the break, I went over and had a chat with him, and found out that, he too, was a musician.

I didn't know it at the time, but he was David LaMotte, and is one of the bigger names in the U.S. folk scene. He was in town to give a show at one of the universities, and was staying at a hotel around the corner.

We got on pretty well, one beer led to another, and we somehow ended up with him performing a special show at the bar, and it was definitely one of the most memorable shows we ever had. I did a lot of recording at the bar, and while this show[1]There is also video available here, although the video quality is less than stellar 😐 was one of the earlier ones I did, and so the sound engineering is less sophisticated than if I did it again today, it's not bad and (hopefully) catches the warmth of his performance. Folk is not something that I'm really into, but his songs are very accessible, and have a warmth and honesty that's quite amazing.

He has been on a musical hiatus for the past ten years, instead doing things like helping build and fund schools in Guatemala, travelling the world, speaking on how each of us can effect change, and helping select Nobel Peace Prize candidates (!)

However, the time has come and he's back in the studio, putting down a new CD in what sounds like a fascinating project, with a menagerie of musicians from every continent.

Being the cynical, grumpy old fart I am these days, it's not often I see someone who I would call inspirational, but this guy is definitely one of them. Check out his music, then put a few dineros in his jar to help make the CD happen. I have.

   [ + ]

1. There is also video available here, although the video quality is less than stellar 😐
Saturday 12th March 2016 4:22 PM [Tutorial]

A while back, I posted a massive tutorial on how to set up a NAS file server on a Banana Pi, and it was so much fun, I've written another even massiver one on how to set up an internet gateway on a Banana Pi.

A gateway lets you isolate computers in your home network from the internet. To reach the internet, a computer has to through the gateway, which means that if you put a firewall or virus checker or ad-blocker here, all your computers will benefit from them.

As before, this series of tutorials will walk you through the whole process of setting up a gateway, including a lot of not-essential-but-nice-to-have stuff. We start off by setting up a bare-bones gateway:

Once this is up and running, we then take a look at installing some useful extra services:

These days, a firewall is pretty much a necessity, and it's quite eye-opening to watch the logs and see the constant stream of attacks, as people try to break into your computer. And even if you run an ad-blocker like uBlock or AdBlock, a DNS-based ad-blocker can be run along-side it, without affecting browser performance at all[1]Browser plugins tend to slow the browser down noticeably, and can use huge amounts of memory..

   [ + ]

1. Browser plugins tend to slow the browser down noticeably, and can use huge amounts of memory.
Friday 4th March 2016 2:50 PM [Awasu News]

Awasu 3.0.3 has been released here. This is a enhancements and bug fixes releases, and while the change list is relatively short, there's been a great deal of work making Awasu run faster and more smoothly, which should make a noticeable difference.

Have fun, and as always, more Awasu goodness will be forthcoming shortly...

Sunday 6th December 2015 11:11 PM [Awasu News]

Continuing on from the first alpha, this second alpha release adds more optimizations and make-Awasu-run-faster changes.

The change list is relatively short, but the changes involved were extensive and needed a lot of testing. In particular, the way channel summary pages are generated has been completely revamped, and is much smoother and snappier now. Some of you have been sending me crash reports from earlier versions of Awasu, and they've all been the same thing - a problem in how the channel summary pages were generated - so since this code has been replaced, this crash should no longer happen [1]This is, of course, not to say that I haven't introduced another crashing bug, but that's another issue 😐 .

   [ + ]

1. This is, of course, not to say that I haven't introduced another crashing bug, but that's another issue 😐
Sunday 25th October 2015 2:43 AM [Tutorial]

Just a quick follow up on my recent epic tome on setting up a Banana Pi as a file server. I mentioned that I configured my disks to use the ext3 file system, and while it's generally fine, it does have one weakness: it is very slow deleting large files[1]Since I use my NAS for back ups, some of my files are well over 100GB.. Even worse, it locks up the file system, impacting other activity and causing stalls, which kinda sucks if you're watching a movie at the time :(

depesz took a very detailed look at the problem and some possible solutions, the TL;DR being that it's better to progressively shrink the file until it's all gone rather than asking the operating system to delete it as a file.

For the benefit of anyone having problems with this, here's a script that I wrote that implements this idea:

#!/bin/bash

# parse the command-line arguments
if [ $# -lt 1 ] ; then
    echo "$(basename $0) file1 file2 file3 ..."
    echo "  Delete file(s) slowly."
    exit 1
fi

chunk_size=100000000
for fname in "$@"; do
    # check if we were given a directory
    if [ -d "$fname" ]; then
        # yup - process each file, then remove the directory
        #echo "Deleting directory: $fname"
        find "$fname" -type f -exec $(readlink -e "$0") \{\} \;
        rm -rf "$fname" 
        continue
    fi
    # check if we were given a file
    if [ ! -f "$fname" ]; then
        # nope - ignore it
        continue ;
    fi
    # yup - delete the file slowly
    #echo "Deleting file: $fname"
    while true; do
        # get the current size of the file
        fsize=$(ls -l "$fname" | cut -d' ' -f 5)    
        if [ $fsize -lt $chunk_size ] ; then
            # the file is small enough to just delete
            #echo "- Deleting file."
            rm -f "$fname"
            break
        fi
        # truncate the file, then loop back
        #echo "- Truncating file: $fsize"
        truncate -c -s -$chunk_size "$fname" || exit
        sleep 0.25
    done
done

Pass in a list of files and/or directories and it will slow-delete them. It will take longer to run, but will have far less impact on the rest of the system.

Nothing to do with Awasu, but hopefully someone out there in Internet-land will find it useful... :)

   [ + ]

1. Since I use my NAS for back ups, some of my files are well over 100GB.
Thursday 8th October 2015 1:56 AM [Awasu News]

Awasu, of course, uses an embedded Internet Explorer browser to show web content, but it's always bugged me that rendering never seemed to be quite the same as a standalone browser.

I've finally figured out what was going on :jig: [1]Although to be honest, it should've twigged a long time ago. I guess sometimes I'm just a bit slow... :roll: - while all the documentation says that installed version of IE will be used, what they invariably forget to tell you is that it's in IE7 compatibility mode :bigshock:

My usual :wall: emoticon is clearly totally inadequate at this point, I need a little yellow man blowing his brains out with a shotgun, or something like that 👿

I'll include a fix for this in the next release, but fortunately, the temporary fix for this is straight-forward: just download and run this file[2]It adds an entry to the Registry saying that awasu.exe should run IE11 for embedded browsers.. If you want test it, open the forums (from within Awasu) and check that the navbar across the top is displayed correctly. Sites using HTML5 and all that other new-fangled frippery should also work a bit better now. Sigh...

/taka toddles off to find a new smilies pack to install... :bah:

   [ + ]

1. Although to be honest, it should've twigged a long time ago. I guess sometimes I'm just a bit slow... :roll:
2. It adds an entry to the Registry saying that awasu.exe should run IE11 for embedded browsers.
Monday 5th October 2015 12:39 AM [Tutorial]

I've been a big fan of NAS's for many years, that is, a small file server that sits on my network and serves up music, movies, provides space for backups, etc. In the past, I've had Synology and QNAP units, and while they were both nice, they were both were relatively expensive, loaded with features I never used. They also both only lasted a few years, and rebuilding a NAS with 5-6 TB of data is a painfully long process :(

So for the next one, the plan was to grab an old laptop, load it up with FreeNAS, and then just hang a few disks off it. If and when the laptop dies, I can just set up a new one and the external disks, with all the data on them, should just plug straight in.

However, this is a bit of clunky solution, so when the Raspberry Pi came out, I got very interested in the idea of using that. Unfortunately, the rPi has one big drawback that makes it unsuitable for use as a file server: it only has 10/100 Mbps ethernet. All the computers on my network have gigabit ethernet, and since I'm moving 100's of GB's of data every night for backups, my file server also needs to have gigabit ethernet.

Enter the Banana Pi. Released in late 2014 by LeMaker in China, it's slightly more expensive but significantly more powerful, notably with gigabit ethernet and a SATA port. Add in a case, and I'll be able to build my own future-proof NAS for well under a hundred bucks, plus the cost of the disks.

There are quite a few tutorials floating around that explain how to set up a Banana Pi as a NAS, but they invariably only talk about how to set up the factory image of Open Media Vault[1]This is the successor to FreeNAS, written by one of the FreeNAS guys, that runs on Linux instead of FreeBSD. (which is relatively easy to do), but this series of tutorials will also talk about the many things you need to do after that to get a usable system.

   [ + ]

1. This is the successor to FreeNAS, written by one of the FreeNAS guys, that runs on Linux instead of FreeBSD.
Thursday 1st October 2015 5:29 PM [Awasu News]

It's been an arduous slog to get this release finished, but Awasu 3.0.3.alpha1 is finally done, and it has probably one of the shortest change lists you're ever likely to see:

  • Made Awasu run faster :)

Core components of Awasu's underlying feed engine are running a whopping 3-5 times faster, so you should see Awasu running noticeably quicker. I've also done a lot of work making sure that things work in non-English environments.

These changes affected nearly every file in Awasu's source code, and I was trawling through some code that hadn't been touched in literally 20 years :bigshock: There was some seriously freaky stuff in there - they don't call it code spelunking for nothing :roll: One consequence of this is that some things may have been broken, so please keep an eye out for any weirdness.

Monday 6th July 2015 9:14 AM [Awasu News,Tutorial]

A while back, I posted a tutorial that showed how easy it is to extend Awasu through the use of plugins and channel hooks, and continuing on from that, here's another series that shows how you can control your Awasu via its API.

Whether you just want to find out what state your channels or reports are in, or if you want to programmatically create, update and delete them, the Python and PHP libraries available make it a breeze.

Have a play with them, hope you find them useful and, as always, feel free to ask questions in the forums.

Wednesday 22nd April 2015 12:49 AM [Awasu News]

Work on the next release of Awasu has been well underway for a while now, as the optimizing juggernaut plows onwards and upwards :) Part of doing this kind of work is to do before-and-after performance tests, to see how much better the new version is running, and I figured that since I was doing it already, I might as well do some tests on Awasu Server as well.

I've always known that Awasu Server runs much faster and more smoothly than the desktop version, but this is the first time I've collected hard data on how it performs, and the results are, well, impressive :jig:

You can check out the full report here, but to the right is the money shot: Awasu Server updates around 67% more channels per hour than Awasu Pro.

If that's not insanely awesome, I don't know what is ::-):

Awasu Server is in private beta, but if you have lots of channels [1]For example, some of our clients are running tens of thousands of channels., if you want to monitor huge amounts of information, then this is definitely the way to go.

And not only can Awasu bring in this amount of information at high-speed, it can also do something with it all, whether it be forward the information onto a database, or send out emails, or generate reports.

Drop us a line if you'd like to know more...

   [ + ]

1. For example, some of our clients are running tens of thousands of channels.