USB2.0 enclosure benchmark
[ link: usb2-enclosure-benchmark | tags: usb linux disk | updated: Sat, 05 Jul 2008 20:42:19 ]
I've noticed my laptop disk filling up... particularly in $HOME/work/*. Lots
of little contracts, each involving at least the linux kernel tree of one
vintage of another, are to blame.
Linux Kernel Walkthroughs posted
[ link: 20080703230924 | tags: linux kernel oclug talk video | updated: Fri, 04 Jul 2008 17:00:13 ]
Ian just posted the screen casts of the Linux Kernel Walkthroughs that I ran last week.
Here is the same video on google/video... it's a lot lower rez :(
Authenticating Linux against OSX LDAP directory
[ link: osx-ldap-authentication | tags: osx linux ubuntu ldap | updated: Mon, 30 Jun 2008 09:21:13 ]
I was recently asked by a colleague, and now also a client, to look over the LDAP configuration on his Ubuntu boxen. He was having
issues with the root account. The problem turned out being that the Ubuntu box was trying to get the root authentication from LDAP.
It successfully found an LDAP account on the OSX LDAP server, but was unable to login since that account is disabled. The solution
was to filter out the root account from the LDAP reply using the pam_filter directive in /etc/ldap.conf. Jay was also kind enough
to document his setup for others that are trying to accomplish a
similar task.
side note: Jay briefly showed me his OSX/Linux integration... looks pretty cool. Particularly the LDAP directory and automount of OSX exported volumes for users. OSX seems to make certain things really easy.
Linux Kernel Walkthroughs
[ link: linux-kernel-walkthroughs | tags: linux kernel oclug talk | updated: Wed, 02 Jul 2008 11:35:56 ]
I will be kicking off a new series of talks at OCLUG later this month. The idea is not mine, but a copy of a similar series ran by Silicon Valley Linux Users Group. Kudos to them!
Here is the info on the first Kernel Walkthrough: Source Tree Layout. I will start off by covering the tree structure and talk a bit about the components, before handing control of the talk over to the audience and let them drive the types of things they would like to explore.
We are being hosted by the TheCodeFactory, which is a very cool concept. From the website:
"TheCodeFactory is a collaborative work space located in downtown Ottawa at 246 Queen Street, between Bank and Kent, above the Green Papaya Restaurant. TheCodeFactory is a clubhouse or water cooler for the Start-up community in Ottawa."
In short they are a place where startups can meet and collaborate way before they have any office space of their own. Ottawa being such a hotspot for startups, this is clearly a good idea.
is my usb device connected to a fast port?
[ link: slow-usb-key | tags: usb linux | updated: Thu, 22 May 2008 20:18:09 ]
I started a transfer last night to copy a 700M file to my USB key. It's still going. I figured that it might have been OHCI vs EHCI issue. I had to remind myself how to check.
fixing X for GeodeLX
[ link: fixing-x-for-geode-lx | tags: geode x linux x86emu ubuntu | updated: Sun, 02 Mar 2008 13:27:57 ]
Recently I have been doign a bit of contract work for Symbio Technologies. They have had me do various little projects part time. Most recently I got a chance to work on X.org video drivers for the Geode family.
Here is the progress...
kvm nfs hang
[ link: kvm-nfs-hang | tags: kvm linux | updated: Tue, 08 Jan 2008 00:29:29 ]
I ran into a strange NFS + KVM issue. Every so often under heavy NFS load my KVM client would hang retrying the nfs server. On the console the client was showing:
nfs: server host not responding, still trying
I found this bug post which does not seem to have been resolved in 2.6.24.
Using the kvm flag -net nic,model=rtl8139 fixed the problem for me.
protecting sshd from OOM killer
[ link: deoom-sshd | tags: linux kernel oom | updated: Wed, 12 Dec 2007 10:08:11 ]
When Linux runs low on memory it tries to kill off applications that may be responsible for the high memory usage. It sometimes gets is all wrong, so the kernel has a way to tell it which processes are to be treated differently by the OOM killer.
I am using ssh to run some stress tests. Occasionally they cause memory to run out, and when I am not paying attention sshd is killed off... which means I cannot turn off the tests.
Here is a script that makes sshd immune to OOM killer.
for pid in $(pidof sshd) ; do
echo "disabling oom on pid $pid"
echo -17 | sudo tee /proc/$pid/oom_adj > /dev/null
done
NOTE: the sudo tee is a useful trick when you want to write to a file as root w/o spawning a subshell.
comparing two directories
[ link: comparing-two-directories | tags: shell linux | updated: Thu, 13 Sep 2007 14:07:51 ]
In one of the project I am working on we have the build environment tarred up and stored in tgz files and committed in SVN. To avoid updating the same 300M tarball we decided to added incremental tarballs each time that we add new software to the build environment. But that's not the important bit...
I wanted to figure out what software was installed since the last tarballs were extracted. To do this I need to compare two directories and create a new tarball with all the new files. How do you diff two directories pro grammatically?
I came up with this...
cp -ax orig-dir new-dir
... do whatever in new-dir ...
diff -u <(find orig-dir -printf "%p %t\n" | cut -d / -f 2-) \
<(find new-dir -printf "%p %t\n" | cut -d / -f 2-) \
| grep -v '^[+-]'
And then I found out that I can do it with rsync...
rsync -a orig-dir/ new-dir/
... do whatever in new-dir ...
rsync -av --dry-run orig-dir/ new-dir/
reducing power consumption
[ link: reducing-power-consumption | tags: linux power laptop | updated: Tue, 24 Jul 2007 08:28:24 ]
I was recently talking to Jean about lowering power consumption. One of the things I do is to purge all modules when I go to battery power. Here is the script I use to remove unwanted modules.
lsmod | awk '/0 *$/ {print $1}' | xargs -n1 sudo rmmod
Building things as modules makes this more successful. And you have to run it a few times to get all the unused modules out. Maybe something like this would work...
while lsmod | grep -q '0 *$' ; do
lsmod | awk '/0 *$/ {print $1}' | xargs -n1 sudo rmmod
done
