Tag: computers

  • For Anyone Who’s Sad Enough To Be Interested…

    There appears to be a bug in phpsysinfo on FreeBSD 8.1, where it formats the network interfaces section wrong, due to a change in how netstat operates; it seems they’ve changed the amount of columns and spacing with “netstat -nibd”, which is how phpsysinfo gets its networking info. I thought at first it was just me breaking shit, but after searching around on several other peoples phpsysinfo pages, it seems to be a common issue.

    It took me a while to find the issue, but I’ve fixed it through trial and error, for anyone who’s interested, the fix is here:

    phpsysinfo/includes/os/class.FreeBSD.inc.php:

    function network () {
    $netstat = execute_program('netstat', '-nibd | grep Link');
    $lines = split("\n", $netstat);
    $results = array();
    for ($i = 0, $max = sizeof($lines); $i < $max; $i++) {
    $ar_buf = preg_split("/\s+/", $lines[$i]);
    if (!empty($ar_buf[0])) {
    $results[$ar_buf[0]] = array();if (strlen($ar_buf[3]) < 15) {
    $results[$ar_buf[0]]['rx_bytes'] = $ar_buf[6];
    $results[$ar_buf[0]]['rx_packets'] = $ar_buf[3];
    $results[$ar_buf[0]]['rx_errs'] = $ar_buf[4];
    $results[$ar_buf[0]]['rx_drop'] = $ar_buf[11];$results[$ar_buf[0]]['tx_bytes'] = $ar_buf[9];
    $results[$ar_buf[0]]['tx_packets'] = $ar_buf[7];
    $results[$ar_buf[0]]['tx_errs'] = $ar_buf[8];
    $results[$ar_buf[0]]['tx_drop'] = $ar_buf[11];

    $results[$ar_buf[0]]['errs'] = $ar_buf[4] + $ar_buf[8];
    $results[$ar_buf[0]]['drop'] = $ar_buf[11];
    } else {
    $results[$ar_buf[0]]['rx_bytes'] = $ar_buf[7];
    $results[$ar_buf[0]]['rx_packets'] = $ar_buf[4];
    $results[$ar_buf[0]]['rx_errs'] = $ar_buf[5];
    $results[$ar_buf[0]]['rx_drop'] = $ar_buf[12];

    $results[$ar_buf[0]]['tx_bytes'] = $ar_buf[10];
    $results[$ar_buf[0]]['tx_packets'] = $ar_buf[8];
    $results[$ar_buf[0]]['tx_errs'] = $ar_buf[9];
    $results[$ar_buf[0]]['tx_drop'] = $ar_buf[12];

    $results[$ar_buf[0]]['errs'] = $ar_buf[5] + $ar_buf[9];
    $results[$ar_buf[0]]['drop'] = $ar_buf[12];
    }
    }
    }
    return $results;
    }

    That might not fix it for everyone, but it seems to have done the trick for me.

  • Even more useless electrics…ish.

    So laying around I have one of my old laptops; a Thinkpad T23. Now I’d added wireless to this like 4 years ago using a mini-pci card, only cause I was using some shitty antennas, the signal was shite. Even in the same room as the AP I was getting pretty much no signal.

    So in my boredom a few weeks back I decided to start my genius plan to improve this. Many, many years ago (like at least 10) I’d used a similar solution to fix my shitty TV reception. The solution was to  extend the antennas using kitchen foil. This sounds rather… Wile E Coyote, but it worked pretty well back then. So I thought, why can’t it work here?

    I took apart the screen of the laptop, to reveal the shitty antennas that I’d installed all those years ago:

    These I think were never intended to be LCD antennas, as I had to bend them into place, I’m pretty sure they were keyboard mounted ones.

    So I cut them off just at the end of the wire, and then proceeded to try and solder the foil onto the end. This took absolutely ages, as I’m pretty sure you can’t solder aluminium using tin solder, but whatever, it worked eventually:

    Now after I’d done this it was getting pretty late, so I shoved the whole thing onto my side and went to bed. It sat here for probably 2 months until a couple of weeks ago when I got a new bed, and had to empty my room of shit to get the damn thing in. I decided to actually put it together properly instead of leaving it. After much shouting to get the damn wire to follow the path *I* wanted, it turned out pretty well (I fucked with the levels so you can see:

    After spending years trying to get the damn LCD back into place without breaking it, I booted the thing up..only to realise it had a failed attempt at a FreeBSD compile on it which just kernel panic’d. (I still never figured out what I did, but whatever). Again, I threw it onto the side and went onto other things.

    This week, I finally decided I should actually see how my work went. I went upstairs and plugged in my backup disc to cookiemonster, then came down and booted up Symantec Ghost, restored an image I had; which turned out to be like 4 years old as well, which was pretty interesting. Turns out my hack has worked incredibly well:

    That was taken the other side of my house to the AP, whereas before I’d get barely one bar in the same room, not bad, I’ll think you’ll agree.

  • Even More Uselessness

    So in addition to my rampant addiction to using space, I now have an addiction to overkill hardware. I present my latest purchase, a 2u dual Opteron server:

    My old fileserver had been showing signs of age for a while (the mobo+cpu was bought in early 2005 IIRC), so I started looking for a new solution. I spotted it on eBay for silly money, so after much deliberation, I bought it, along with a new boot HDD, pci SATA card, 1u pci-x riser and many caddies for my backup drives. Once I’d waited over a week for these things to arrive (well, everything was next day/with the server aside from the 1u riser, that took ages to come :|), I could begin configuring, installing and what have you.

    Now one of the principal uses of old cookiemonster (for some reason I’ve always called my server cookiemonster, long story to that), was to stream media to my xbox and my brothers PS3. This was done using much hacking of Server 2003 so that it had uPnP installed and WMP11. This had been fairly easily done with 32 bit windows, as it was easy to hack the files out of XP. However, with new cookiemonster I kinda wanted to use  64bit OS. I pretty much ruled out Server 2008 from the beginning due to the cost, and the fact I’m NOT fucking with OS cracks for a main machine. So I “found” a copy of 64bit Windows 2003, and fired up VMWare and got to work. After about 50 incarnations of a 2003 VM, using various methods, files from both 64bit and 32bit XP, many WMP installs and even some shit from WHS. I could never get the damn thing to work. So to cut a long story short, I ended up using 32bit windows anyway, although in the process I did discover a very easy way to get Windows 2003 to play nice with uPnP. Using part of the hotfix files that WHS installs was the key as it installed everything very nicely.

    So after nliting said file and some Silicon Image 3114 drivers into an ISO, I did one more final VMWare test, and it seemed I was all set. It did actually work, which I was amazed at, but what the hey.

    Now I actually have the thing up and running, albeit with a loooot of installing and configuring still to do, but at least I can now access all my shit, and my xbox is happy.

    For the boring/techy minded kiddies out there, here are obligatory pics.


    Everything finally done


    My nigger rig’d HDD cage for the boot HDD 😀


    Backup drives in their new caddies. Mmm, 3250GB 😀


    Shitty desk area where cookiemonster lives


    The aftermath of taking old cookiemonster. My bedroom is still pretty much like this.

    Also, I’ve now gained another useless desktop machine that was old cookiemonster, despite its hardware slowly dieing:

    And as if the new server wasn’t enough, I’m already eyeing up my upgrade options, ECC DDR is pretty cheap nowadays, and I’ve found a pair of Opteron 275s for a good price (4 cores ftw :D).