Archive

Archive for the ‘linux’ Category

Linux software updates

August 6th, 2010 bumpkin No comments

I’ve been posting recently about my problems with Windows and touting Linux. One of the main benefits of Linux is that updates are centrally controlled so that you get updates to the base operating system(Linux) and all the applications as well. This is in contrast to Windows which has one mechanism for keeping Windows itself up to date and applications such as web browsers and email clients are left to fend for themselves.
.
Once a week or so Linux automatically notifies me that updates are ready to install – like it did this morning. In this screenshot you can see updates to the very core of the OS – the kernel and a software development application – Eclipse. Press the button …. done.

Linux Ubuntu Update Manager

Linux Ubuntu Update Manager

PDF Download    Send article as PDF to
Categories: Windows sucks, linux Tags:

Before you switch to Linux

July 30th, 2010 bumpkin 2 comments

Linux

Image courtesy of Metin Seven, Seven's Heaven

The topic of switching to Linux came up via comments on a recent post. Coincidentally I saw this article this morning titled “Warning: Five Things to Know Before Switching to Linux”.
.
I basically agree with most of the article’s tenets except for some nits with the section “5. Technical Skills Required”:

Linux requires a higher level of computer knowledge to make things work. That isn’t to say that ordinary users can’t use Linux, but to perform more advanced functions–such as setting up peripherals that aren’t plug-and-play or installing non-packaged software–you’ll need those higher level technical skills. Setting up Linux workstations is relatively simple, but Linux server services require a very skilled technical person to enable and configure them. If you’re the type that likes to tinker with computers, to learn new things, and to celebrate a victory when you’re successful, then Linux is for you.

If you have supported hardware I would maintain that setting up a Linux workstation is far easier than a Windows one. How many of you have installed Windows? I’d guess not many. If you have you’d know that after the install of the base operating system you don’t have much. You have to install drivers for every piece of hardware you have – printers, cameras, web cams, mp3 players, etc, etc – with many of the installs requiring a reboot. You don’t have any photo editing, music editing, or office suite. You have little more than a web browser(Internet Explorer), a simple text editor(Notepad), and a music/video player(Windows Media Player). When you install Linux – everything is there when you’re done. Install, one reboot, and you have a tremendous wealth of open source applications:

  • Office suites
  • Web browsers
  • Audio editors
  • Video editors
  • Software development tools(compilers, programming editors, IDE’s
  • Music players/management tools
  • IM clients
  • Internet telephony progrmas
  • Image editors
  • Photo management tools
  • The list goes on and on and on and on

It is very true that if your hardware is not supported out of the box, it can be difficult or impossible to make it work with Linux. If it is supported however, it will be as easy or easier to get it working than Windows. It is also true that if you are setting up a server, you will need some technical chops or a lot of perseverence – but setting up a server under Windows is no picnic either.
.
I think the article had a slightly more negative tone than I would have liked but I think it sums up moving to Linux nicely:


If you want stay with the familiar and comfortable pitfalls that you’re accustomed to, use Windows. Or, to really dumb down your computing environment, you can pay the extra money for Apple products. You can also choose to suffer a little pain, make a few exceptions, use Linux to power your desktops and servers and experience a new level of computing freedom.

Linux for kids
Once configured – Linux is easy to use. Here is an article titled “10 reasons why your kids should be using Linux”.

PDF Printer    Send article as PDF to
Categories: linux Tags:

Google and Sun

April 15th, 2010 bumpkin 15 comments

This CNET article discusses the decline and failure of Sun and success of Google based on this central idea:


It’s not as if Schwartz didn’t have the winning vision for the software industry: he largely shared Schmidt’s/Google’s vision of a mobile future with the cloud/Internet connecting all of the nodes.
.
Vision, however, is nothing without execution, and execution is accelerated or hampered by a company’s legacy. For Sun, this was exacerbated by its failure to ride the x86+Linux train.


I would disagree with this. I think Sun’s failure goes back further and gave birth to the child that ended up killing it – Linux.
.
Back when I was a just starting off in software engineering, our product line ran on Apollo’s DomainOS – a great operating system. It was dying out and we were porting to Sun’s Solaris operating system. I was new to Unix and soon developed an appreciation for this complex and powerful environment. Wanting to learn more, I started looking for a version of Unix to run on my home PC – so I could hack on it to my heart’s content without worrying about messing up one my company’s $15K workstations. First stop was Solaris x86 – a version of Solaris that could run on a home PC. As I recall, it was something like $300. Someone told me about Linux and I ordered a CD from TransAmeritech LinuxWare. It was cheap – certainly less thatn $50 and maybe down around $10 or $20 dollars.
.
After a minimum of fuss, I had it installed and I can still remember the first time my home PC booted up with it’s very own Unix-like system … Linux. I’ve been hooked ever since. It came with a compiler, several desktop environments, editors, games, and applications galore. In many ways it was far more usable as a desktop than my $15K Solaris machine. Sure the same applications were availabe but you had to download, compile, and install them yourself.
.
In 1991 when university student Linux Torvalds wanted a unix for his PC, he wrote Linux. Me and millions of other Unix users embraced it because of Sun’s failure to make a free version of Solaris available to home users. The opensource nature of Linux fostered a huge ecosystem that led to rapid development and better distributions and applications. Meanwhile Sun plodded along with their off-again on-again relationship with Solaris x86. Eventually Sun saw the light. They opensourced Solaris and started shipping GNU stalwarts like Perl and Gnome with the operating system — but it was too little to late. Us early Linux adopters were now sitting on top of a mature and totally free powerhouse. It ran on cheap hardware and we were in position to influence our companies to adopt Linux internally. I was one of people pushing to migrate a move to Linux within my company – which we did leaving Solaris behind.
.
That’s my story. Sun didn’t fail because they didn’t embrace Linux on x86 – they failed because they tried to keep all their technological marbles – creating an environment that encouraged Linux to thrive. Me and millions of others never would have touched Linux if Sun had a free or cheap version of Solaris or SunOS for our PC’s. It’s too bad. Sun hardware and OS are rock solid and crazy scalable. The company has been a good opensource citizen(OpenOffice, Mysql), innovative(Java, NFS, ZFX, Dtrace) and I’m sad to see them go.

Create PDF    Send article as PDF to
Categories: linux Tags:

Convert wav to mp3 with Linux

March 28th, 2010 bumpkin No comments

So I’m converting my wav recordings of last night’s gig to mp3. Here’s a simple bash command line to convert all wav files in a the current directory to 192k MP3 files. The power of the command line on Linux and Unix-like systems is phenomenal. GUI’s are great but some things are so much quicker and easier on the command line.

 for f in *.wav
> do
> new=`echo $f | sed s/wav/mp3/`
> lame -b 192 "$f"  MP3/"$f"
> done
Converting wav to mp3

Terminal showing wav to mp3 conversion

PDF Printer    Send article as PDF to
Categories: linux Tags:

Linux Mint 8 on Dell D600

February 8th, 2010 bumpkin No comments

Linux Mint 8 - Helena

Linux Mint 8 Helena menu and welcome screeen

I’ve been playing around with several Linux distributions on my old Dell D600 laptop. Initially I threw Ubuntu 9.1(Karmic Koala) on it but had problems with the desktop freezing every time I started up an application. I got around that by putting on some alternate desktop environments that I’d been wanting to play around with including XFCE, Fluxbox, and IceWM. Shortly after getting it installed, the disk died so I figured I’d try out some other Ubuntu related distributions. I tried Kubuntu – a KDE based(versus Gnome) based distro. I tried out my old favorite Mepis Linux and last but not least Linux Mint 8 Helena. There are great reviews of Linux Mint out there. This is not one of them. This post is to help others with freezing issues related to Dell D600 laptops and Ubuntu-based distributions.
.
Linux Mint is also Ubuntu based but includes proprietary codecs and a highly customized theme that looks very different from Ubuntu. With Linux being an open source operating system, most distrubutions do not include any proprietary software. Most users will expend some effort to get support for playing mp3, windows media files, quicktime, and encrypted dvds. Mint includes all that.
.
My install had the same problems as most of the Ubuntu 9.1 based distros I’ve been trying lately – it froze. This freezing issue seems to be related to Compiz and probably the X driver for the laptop’s video card – an ATI Mobility Radeon 9000. Selecting the OEM install got me through the installation problem – but still had the freezing issue when starting all or most applications. That was solved by right clicking on the desktop and setting the desktop effects to “none”. You lose some of the spiffy effects on the desktop but actually get a more responsive desktop. The D600 is getting a little long in the tooth and doesn’t have the horsepower for overly flashy desktop effects.
.
Linux Mint has an interesting looking desktop – quite different from the Ubuntu and Redhat based distributions I usually run. My first impression is very positive – it is an attractive environment and feels very responsive. It will be getting a good workout here at home – particularly with the kids. They’ll be using it when the main computer (Windows XP) is occupied. My 8 year old was using it last night to watch a Star Wars/Clone Wars episode he missed and to browse for Star Wars Legos on Amazon. So much for Linux being too difficult to use.

PDF Creator    Send article as PDF to
Categories: linux Tags:

The oom-killer

May 31st, 2008 bumpkin 2 comments

This post is pure geek. You’ve been warned.


I came across an interesting gotcha in Linux 2.6 kernels that I’ve never seen before despite the fact that I’ve been running 2.6 kernels for a number of years.

It’s called the oom-killer. Bwahahaha…

I came across this when my virtual machine died while running a build. The /var/log/messages log showed:

May 30 00:02:33 localhost kernel: oom-killer: gfp_mask=0xd0May 30 00:02:36 localhost kernel: cpu 0 hot: low 32, high 96, batch 16May 30 00:02:36 localhost kernel: cpu 0 cold: low 0, high 32, batch 16May 30 00:02:36 localhost kernel: cpu 1 hot: low 32, high 96, batch 16May 30 00:02:36 localhost kernel: cpu 1 cold: low 0, high 32, batch 16May 30 00:02:36 localhost kernel: May 30 00:02:36 localhost kernel: Free pages:       35932kB (19712kB HighMem)May 30 00:02:39 localhost kernel: HighMem free:19712kB min:512kB low:1024kB high:1536kB active:1002148kB                                   inactive:1422792kB present:2488324kB pages_scanned:0                                   all_unreclaimable? noMay 30 00:02:39 localhost kernel: protections[]: 0 0 0May 30 00:02:40 localhost kernel: DMA: 1*4kB 3*8kB 4*16kB 2*32kB 3*64kB 3*128kB 2*256kB 0*512kB 1*1024kB                                   1*2048kB 2*4096kB = 12508kBMay 30 00:02:43 localhost kernel: Free swap:       4176688kBMay 30 00:02:44 localhost kernel: 851457 pages of RAMMay 30 00:02:44 localhost kernel: 622081 pages of HIGHMEMMay 30 00:02:44 localhost kernel: 8252 reserved pagesMay 30 00:02:44 localhost kernel: 748042 pages sharedMay 30 00:02:44 localhost kernel: 2173 pages swap cachedMay 30 00:02:44 localhost kernel: Out of Memory: Killed process 4300 (vmware-vmx

The oom-killer is the Out Of Memory killer and is described here:

By default, the Linux kernel is configured to never say no when application processes ask for more memory. The assumption is that the applications will not actually use all the memory they ask for–this is called overcommitting memory. Hotels and airlines do the same thing when accepting bookings: the assumption is that not everybody who makes a booking will actually turn up to take their room/flight.

However, every now and then, the assumption is wrong–you have an overbooking, and somebody has to get bumped. When Linux runs out of memory, it starts killing processes in order to free some up. Of course, the processes are chosen according to a heuristic (which is a technical term meaning “you can’t please everyone”), and so invariably the kernel is going to kill something you consider important, thereby leading to much wailing and gnashing of teeth.

There are a number of ways of stopping this:

  • Check for low memory exhaustion

    # egrep 'High|Low' /proc/meminfo

    # free -lm

    When low memory is exhausted, it doesn’t matter how much high memory is
    available, the oom-killer will begin whacking processes to keep the
    server alive.

  • upgrade to 64-bit linux(not an option for most)
  • If limited to 32-bit Linux, the best solution is to run the hugemem kernel. This kernel splits low/high memory differently, and in most cases should provide enough low memory to map high memory. In most cases this is an easy fix – simply install the hugemem kernel RPM & reboot.
  • If running the 32-bit hugemem kernel isn’t an option either, you can try setting /proc/sys/vm/lower_zone_protection to a value of 250 or more. This will cause the kernel to try to be more aggressive in defending the low zone from allocating memory that could potentially be allocated in the high memory zone. As far as I know, this option isn’t available until the 2.6.x kernel. Some experimentation to find the best setting for your environment will probably be necessary. You can check & set this value on the fly via:
        # cat /proc/sys/vm/lower_zone_protection    # echo "250" > /proc/sys/vm/lower_zone_protection

    To set this option on boot, add the following to /etc/sysctl.conf:

        vm.lower_zone_protection = 250
  • As a last-ditch effort, you can disable the oom-killer. This option can cause the server to hang, so use it with extreme caution (and at your own risk)!
        Check status of oom-killer:    # cat /proc/sys/vm/oom-kill
    
        Turn oom-killer off/on:    # echo "0" > /proc/sys/vm/oom-kill    # echo "1" > /proc/sys/vm/oom-kill
    
        To make this change take effect at boot time, add the following to /etc/sysctl.conf:    vm.oom-kill = 0

PDF Creator    Send article as PDF to
Categories: linux Tags: