Archive

Archive for the ‘Am a Geek’ Category

Ubuntu 9.04 bug with networking directory creation « RimuHosting Blog

September 10th, 2009 Glenn Comments off

Ubuntu 9.04 bug with networking directory creation « RimuHosting Blog.

I ran ifup and got the following errors
root@charon ~ # ifup eth0
ifup: failed to open statefile /var/run/network/ifstate: No such file or directory
… so i checked and /var/run/network did not exist… This link had a bit more technical information. They said look for  the following files and remove them.
/etc/udev/rules.d/85-ifupdown.rules
/lib/udev/rules.d/85-ifupdown.rules

A good solution to a tricky issue after an major upgrade.

While I am a big fan of Ubuntu and I use it regularly on my desktop, its fair to say that I prefer not to use it for server installations. The same things goes for Fedora. Actually just don’t use Fedora :) . Silly bugs like those above are one of the reasons.

If I had to make a recommendation, it would be for Debian stable or CentOS/RHEL. Both are reasonably easy to use, with great community support. And I find they have a much more more consistent toolchain so that things are less likely to break and are better testing before getting into production systems. Keeping in mind this is for a server.

Mind you, no distro is 100% perfect, and some needs will differ. All YMMV and IMHO :)

Understanding the “free” command in Linux

July 1st, 2009 Glenn Comments off

Free is a command line interface (CLI) tool available on most Linux and Unix based systems. From the man page

… displays the total amount of free and used physical and swap memory in the system, as well as the buffers used by the kernel.”

Running free, you get output similar to the following (by default the numbers are in kilobytes)…

:~$ free
             total     used     free   shared    buffers     cached
Mem:       3992680  3033116   959564        0     272632    1754476
-/+ buffers/cache:  1006008  2986672
Swap:       979924        0   979924

The numbers are essentially counters representing how the RAM on your Linux system is allocated in bytes. By itself the above is not very readable, but the command comes with a few handy options to make it easier. You can pass it the ‘-m’ parameter to translates the counters to MB, the ‘b’ option does the same in bytes.

:~$ free -m
             total     used     free   shared    buffers     cached
Mem:          3899     2963      935        0        266       1713
-/+ buffers/cache:      984     2914
Swap:          956        0      956

The first line shows overall usage of the total memory usage on your system. Including any file-system and other caches reserved by the kernel. Since RAM is faster the OS will always try to take advantage of that resource by using it to its fullest. But in practice most of that can be released quite quickly for applications that need more space.

So how can we see how much memory us really being used by the applications on your server? The ‘-/+ buffers’ line shows how much of the actual RAM is in use by applications while the last line shows how much of your slower disk based virtual memory is in use.

Sometimes a PC will start to run relatively slowly, for example when it is running a busy web server. By checking free you will likely see the used column of the last two lines starting to approach the total value. Which is bad for performance and you run the risk of the kernel killing low priority processes to release memory for new tasks.

There are lots of great guides available about optimising memory usage, especially in a server environment. One that I have found handy is on the Rimuhosting.com site. There is also an incredibly extensive but more general page at Linux Troubleshooting with some handy tips. Lots more can be found on Google.

Upgrade old ubuntu releases

June 30th, 2009 Glenn Comments off

To upgrade in place for releases that are no longer officially supported please see…
http://www.nzlinux.com/2009/06/upgrading-older-releases-of-ubuntu-when-support-ends/

Depending on the installation it might be substantially faster to do a clean reinstall and migrate your content from backups. YMMV.

If you are already on one of the LTS releases then there should be a safe upgrade path available per https://help.ubuntu.com/community/UpgradeNotes

Categories: Am a Geek, Linux Tags: , , , , , ,

Using a GIT repository

May 20th, 2009 Glenn Comments off

So you want to use a revision control system and you picked git? Cool :) . Assuming you are setting a service up from scratch, check out the following… Read more…

Canonical and RedMonk release survey on Ubuntu Server Usage

February 5th, 2009 Glenn Comments off

Canonical and analyst firm RedMonk released findings of a survey sent to thousands of Ubuntu Server users. It was developed with the Ubuntu community and was completed by almost 7,000 respondents. The companies says the survey confirmed that Ubuntu was being widely used in the most common workloads (web, print, file, database and mail servers) and that it is considered mission critical by most respondents.

via Canonical and RedMonk release survey on Ubuntu Server Usage.

You can grab the review results directly from here

Update: I found an interesting comparision betweem Ubuntu and Windows performance. The author plainly states they are a Linux proponent, but tries to give a fair comparision.

How I first got into Linux

February 5th, 2009 Glenn Comments off

A friend asked me today how I first got into Linux. Which got me thinking, since it’s a bit of a way back in the mists of time, and I couldn’t quite recall :) .

The process started about when Windows XP came out I think. My PC then was a lively 486DX33.  I believe that was time I started using Fedora (perhaps before the Core release even).

From there after occasional use I moved to Gentoo, about the 2004 release. Which was great for a bit until I noticed I was spending 98% of my time not just building and installing but fixing issues in order to have a functional system as well.

Once I started attending tech I had little time to muck about with that, so I moved on to Ubuntu. Since the tech I was attending was a Windows shop I spent a lot less time working with linux than I would have otherwise.

Since graduating from there I managed to get a paying job working with Linux and all the fun staff that goes with it. which is so awesome I still have to pinch myself almost every day even after a year working there :) . And primarily I have stuck with the Ubuntu distro. Rather I should say Kubuntu since KDE is so the best UI for linux about! Even the Father of Linux thinks so!

Blessed be…

Categories: Am a Geek, Linux Tags: , , , , ,

Programming Texts/Tutorials

January 29th, 2009 Glenn Comments off

Programming Texts/Tutorials. is a very interesting and comprehensive list of prgramming aids

Categories: Am a Geek Tags: , , ,

Morris Puzzle

January 12th, 2009 Glenn Comments off

I came across this puzzle recently, and I thought it would be fun to share.

The question is…

1 11 21 1211 111221 … What’s the next number?

I wont spoil the surprise in this post, see if you can work it out, then follow one of the links I’ve provided to learn all about it :)

The Neuroti-Kart!

April 4th, 2008 Glenn Comments off

Categories: Am a Geek Tags: , , , ,

GPL v3 and Free Software Foundation vs GPL v2 and Linus Torvalds

June 19th, 2007 Glenn Comments off

In response to a discussion of this kerneltrap thread on the New Zealand linux users group mailing list, I wrote the following. More updates as the thread matures…

Indeed the Free software Foundation seem to argue the main point of difference is that situations such as Tivoisation should not happen, and that in order to gain the influence they need for v3, want the linux kernel to come under the v3 umbrella. Linus on the other hand disagrees somewhat violently with this ethic and protests that software and hardware should not necessarily be tied by the same licensing agreement, indeed this severely restricts some of the key advantages companies see in contributing to the linux kernel.

To me, the issue of hardware and IP is increasingly important when we see so many companies starting to litigate just to stay afloat. The patent laws were never designed to be a complete protection for even the smallest ideas. By using open standards some companies are finding their licensing burden to be significantly reduced. But in order for such open standards to exist and continue to exist, we need a new approach to sharing ideas. I suggest that social bookmarking/publication sites[1] might be the beginning of a sharing/knowledge environment that encourages such an approach.

What this might mean for the v3 licence is that if companies [have] opened their hardware technology to competitors, then the remaining place they can make money is in service offerings, by enforcing some kind of lock in (private keys etc) for the sake of consistency between their hardware and the software that runs on it.

So I generally think that while the software should be modifiable and ‘free’ to everyone, preventing the possibility of commercial gain is a bad idea. With retail margins for common devices so small, my feeling is that the services are where most companies are making their crust now. If the kernel adopted v3 then where would that leave businesses wanting to use linux?

[1] http://www.bibsonomy.org is one experimental example I’ve come across.

Update 20th June: Linus had this eloquent statement to represent his point clearly

Update 21st June: We are reminded that Linus recently performed a quick pole of 30 primary maintainers of kernel code and for varying reasons, few dissimilar to Linus’s own standpoint, all said that they would not support the adoption of the v3 license.

Update 30th June: GPL version 3 has been officially released!