Everything is Broken

One Line Guitar Tuner

March 16th, 2010 admin

Every now and then I come across something which makes me marvel at the flexibility of Linux. This is one of these things.

I play guitar, and I’d previously written a small script to act as a guitar tuner. I generated some .ogg files of the correct pitch and then wrote a script to loop through them in sequence. “Pretty good”, I thought, “Clever Me.”

Then a few days ago I came across this little gem of a script.

for n in E2 A2 D3 G3 B3 E4;do play -n synth 4 pluck $n repeat 2;done

That’s it. Sheer brilliance. Of course you’ll need to install the sox package first.

Posted in General IT, Linux | No Comments »

Counting files in subdirectories.

February 23rd, 2009 admin

ze countOK, it sounds simple, and it probably is if you’re sitting at your desktop with Gnome or KDE fired up. However if you’re looking on a server half way across the world, using the command line its not so easy.

There are a number of tools which are useful in finding out things about your filesystem. ls, du, df are three of them, but sometimes they just don’t give you the information you need. In my case I’m backing up a server to a remote location. The script was timing out becase I was trying to back up too many files at once, so I needed to find the number of files in each subdirectory.

Read the rest of this entry »

Posted in General IT, Linux | No Comments »

Linux Memory Usage Summary Script

November 20th, 2008 admin

I was having trouble with a webserver this week, which I’d just set up for a client. When it went live, it seemed OK initially, but when we left it overnight it curled up its toes and died. It was so dead that I couldn’t even ssh in to reboot it, so we had to do a remote reboot. Crunch.

Anyway, on getting it back up, I poked around in the logs and found that it was running out of memory, which it really shouldn’t do given that it was a fairly low load on the webserver, and only apache, mysql and php were running on it. I looked around the Interwebs and found an excellent resource called Troubleshooting Memory Usage, which gave me some pointers about how to rein in apache and stop it from eating up memory so quickly. Thanks!

Anyway on the page was a script for summarising memory usage, which I thought was a good idea, so i grabbed that one and adapted it to my own purposes. I thought I’d make the results available here, so feel free to grab it and adapt it to your own needs. Read the rest of this entry »

Posted in General IT, Linux | No Comments »

PrimeTime Linux

August 5th, 2008 admin

I’ve been thinking of setting up a company to set people up with Open Source workplaces, and every year that goes past makes me think that the time is almost here.

There are a number of factors which are conspiring to make Linux a viable alternative:

  • The fact that Linux, via distributions such as Ubuntu, Mandriva, Suse et al, are now easy enough to install and intuitive enough for the Everyday User. I set my girlfriend up with an account on a spare laptop and just let her play. Soon enough she was asking for it on her laptop as well.
  • OpenOffice. Enough said. Hardly anyone uses the full feature set of Word, so why do we slavishly upgrade every time a new version comes out? Well actually we don’t … Read the rest of this entry »

Posted in General IT, Life, Linux | 1 Comment »

Trust Scanner Success

June 13th, 2008 admin

My girlfriend turned up this morning with her scanner, a Trust Flat Scan USB 19200. Its an old model from around 5-6 years ago, and she’d lost the driver disk. This was clearly a challenge for Linux …

I plugged the thing in (its a USB scanner, which pulls all its power from the USB bus) and the light went on. However the scanner application which comes with both PCLinuxOS and Ubuntu wouldn’t start up. Time for some investigation. I got a root terminal shell and tried poking around

lsusb showed that the scanner was recognised. Read the rest of this entry »

Posted in Linux | 2 Comments »

Ubuntu 7.10 to PCLinuxOS 2008

June 2nd, 2008 admin

I started a new project at a client’s office a month or so ago. On the first day I turned up, and managed to work for about an hour, before my laptop died. Somewhat embarassing. I tried for about an hour to resuscitate it, but couldn’t get it to boot at all: it just died and froze before the KDE login screen. It seemed to be some sort of graphical mishap, and no amount of fiddling with xorg.conf from rescue mode would fix it.

I excused myself, went back home and after some more fiddling, decided to backup and re-install. Having made this decision I was looking through my pile of install CDs, and I came across PCLinuxOS 2008, which I’d downloaded a few weeks previously, and I’d been meaning to try out. “So why not try it out on this laptop?” said the evil part of my brain — the same part which forces me to spend time on Facebook instead of working.

Read the rest of this entry »

Posted in General IT, Linux | 24 Comments »

More Power

April 9th, 2008 admin

We’re getting into summer in the Philippines, and I was just worrying how hot my Thinkpad R51e was running. Its 32 degrees in the room, and my CPU is running at a consistent 73 degrees, according to

cat /proc/acpi/thermal_zone/THM0/temperature

which seems a bit unhealthy. My motherboard fried itself twice last year, and I figure that might have had something to do with it.

Anyway, I started casting around for things to reduce the power consumption, and found this powertop utility, apparently developed by Intel. (http://www.lesswatts.org/projects/powertop/) You can download it and install it from the site, but I just did a quick

sudo apt-get install powertop

and that seemed to work pretty well. When you run it (with sudo powertop), it reports all the things that are keeping your CPU awake and suggests a few things you can do to consume less power. Even better it will make these changes for you, if you press the appropriate letter on the keyboard.

Posted in Linux | No Comments »

Big Switch 6: Virtually there.

February 23rd, 2008 admin

OK a quick recap from my last post, where I realised that then next step was going to take some explaining … A week or so went by without incident and it was time to consider the final stage: moving Windows to a virtual machine and getting rid of the old Windows partition. Here are the main stages.

  1. Make a windows install CD from the install files on the windows partition (Thinkpads don’t have an install CD, they use an Install partition)
  2. Install vmware on Ubuntu and make a Windows Virtual Machine.
  3. Delete the old Windows and IBM Install partitions
  4. Re-arrange the remaining partitions to suit the new arrangement. Read the rest of this entry »

Posted in General IT, Linux | No Comments »

  • Recent Posts

    • ClamAV reporting Outdated version
    • Adventures in unbricking a router
    • One Line Guitar Tuner
    • Captcha Madness
    • Ubuntu upgrade 9.04 to 9.10
  • Sing for your supper

  • Static

    • About
    • Privacy Policy
  • Tags

    apathy apple calendar chkconfig collanos cross-platform eee evolution firmware google grub hotspot id card lightning Linux Mandriva notebook partitioning pclinuxos pclinuxos 2008 Philippines power management re-install sane scanner scheduleworld script Security slow sysv-rc-conf thinkpad thunderbird trust ubuntu ultraportable usb virtualisation vmware vpn wifi wireless workspace sharing xsane yahoo zombie
  • Blogroll

    • Datalude
    • Digital Life
    • Engage the World
  • Archives

    • May 2010
    • April 2010
    • March 2010
    • November 2009
    • October 2009
    • June 2009
    • May 2009
    • April 2009
    • February 2009
    • January 2009
    • November 2008
    • October 2008
    • September 2008
    • August 2008
    • July 2008
    • June 2008
    • April 2008
    • March 2008
    • February 2008

Everything is Broken runs on WordPress. Theme by Bob. All content Copyright © Datalude 2008+.

Bad Behavior has blocked 17 access attempts in the last 7 days.