Tuesday, August 26, 2008

netperf tests

Just for fun. I'm running similar tests at work with 10GB cards so I thought it would be fun as a comparison to run the same tests on the wlan.

HP Compaq nw8240 running Ubuntu Hardy Heron 8.04 (standard Ubuntu kernel 2.6.24-21-generic)
Using the wlan interface (an Intel 2200BG) through
- 2 meters of free air
- 3Com 3CRWE454A72 54mbit access point
- Netgear GS108 Gigabit switch
- D-link DES-1005D 100Mbit switch (don't rely on the cheap d-link switches)
to my P3 800 HP "server" with 3Com 3C905C-TX 100mbit NIC.

Commands:

# netperf -H srv1 -t TCP_STREAM -C -c -l 60
# netperf -H srv1 -t TCP_SENDFILE -l 60 -C -c -F /boot/vmlinuz-2.6.24-21-generic
# netperf -H srv1 -t UDP_STREAM -l 60 -C -c -- -m 8972 -s 1M -S 1M


Results without any networking tweaks (no use since we're on a slow wlan?)

Netperf Test MTU BW Mbps TX_CPU % RX_CPU %
--------------------------------------------------
TCP_STREAM 1500 22.26 8.16 8.21
TCP_SENDFILE 1500 22.17 8.77 8.58
UDP_STREAM TX 1500 25.4 8.62
UDP_STREAM RX 1500 25.3 4.93


Using the performance enhancing suggestions from here:
http://www.myri.com/scs/READMES/README.myri10ge-linux
didn't help diddly. :)

Wednesday, August 20, 2008

ubuntu thinclient server

I have installed a Ubuntu 8.04.1 server with tftp, dhcp, bind (dns), http, nfs and samba.
Installed ltsp-server-standalone with apt-get
Modified the /etc/ltsp/dhcpd.conf to match my network properly
Got problems where the client stopped booting with a "Error: Connect: Connection refused" and a busybox prompt. Turns out I needed to run dpkg-reconfigure nbd-server.
Here's my /etc/nbd-server/config:
[generic]
# If you want to run everything as root rather than the nbd user, you
# may either say "root" in the two following lines, or remove them
# altogether. Do not remove the [generic] section, however.
user = nbd
group = nbd

# What follows are export definitions. You may create as much of them as
# you want, but the section header has to be unique.
[export]
exportname = /opt/ltsp/images/i386.img
port = 2000


Now I want my other pxe boot options back so I can run installs and tools as well as full Ubuntu thin clients. More to come...

Tuesday, August 19, 2008

pxe install

install and/or configure dhcp3-server
(if you already have dhcp configured you may just add "filename "pxelinux.0";" to the conf.
my /etc/dhcp3/dhcpd.conf:
ddns-updates on;
option domain-name "vstrom.local";
option domain-name-servers 192.168.0.2;
default-lease-time 86400;
max-lease-time 86400;
authoritative;
log-facility local7;

# vstrom
subnet 192.168.0.0 netmask 255.255.255.0 {
option domain-name-servers 192.168.0.2;
option domain-name "vstrom.local vstrom";
option subnet-mask 255.255.255.0;
range 192.168.0.50 192.168.0.59;
option routers 192.168.0.1;
ddns-update-style ad-hoc;
filename "pxelinux.0";
next-server 192.168.0.2;
}

install tftpd-hpa
create /tftpboot and edit /etc/default/tftpd-ha
#Defaults for tftpd-hpa
RUN_DAEMON="yes"
OPTIONS="-l -s /tftpboot"


Get the netboot files:
lftp -c "open http://archive.ubuntu.com/ubuntu/dists/intrepid/main/installer-i386/current/images/; mirror netboot/"
mv netboot/* /tftpboot
rm -r netboot


If you only want Ubuntu install you can stop here.

Otherwise:
Make a dir for ubuntu and copy the files there

My /tftpboot/pxelinux.cfg/default:
DISPLAY boot.txt

DEFAULT thin

LABEL thin
kernel ltsp/i386/vmlinuz ro
append initrd=ltsp/i386/initrd.img

LABEL hardy_install
kernel ubuntu/hardy/i386/linux
append vga=normal initrd=ubuntu/hardy/i386/initrd.gz --
LABEL hardy_cli-expert_install
kernel ubuntu/hardy/i386/linux
append tasks=standard pkgsel/language-pack-patterns= pkgsel/install-language-support=false priority=low vga=normal initrd=ubuntu/hardy/i386/initrd.gz --

LABEL intrepid-live
kernel ubuntu/intrepid-live/casper/vmlinuz
append root=/dev/nfs boot=casper netboot=nfs nfsroot=192.168.0.2:/media/intrepid-live file=preseed/ubuntu.seed initrd=ubuntu/intrepid-live/casper/initrd.gz --

LABEL intrepid-rescue
kernel ubuntu/intrepid-live/casper/vmlinuz
append root=/dev/nfs boot=casper netboot=nfs nfsroot=192.168.0.2:/media/intrepid-live initrd=ubuntu/intrepid-live/casper/initrd.gz single --

LABEL gparted
kernel gparted/vmlinuz1
append initrd=gparted/initrd1.img boot=live union=aufs noswap noprompt vga=788 fetch=http://192.168.0.2/filesystem.squashfs

LABEL grml
KERNEL grml/linux26
APPEND root=/dev/nfs rw nfsroot=192.168.0.2:/media/grml boot=live lang=us nomce quiet apm=power-off nodhcp noprompt noeject initrd=grml/minirt26.gz vga=791


PROMPT 1
TIMEOUT 0

And the /tftpboot/boot.txt

=============================================
Thin Client (Ubuntu 8.04 Hardy Heron)
thin

Install Ubuntu 8.04 Hardy Heron
hardy-install
hardy-cli_expert_install
hardy-rescue

Ubuntu 8.10 Intrepid Ibex (Alpha)
intrepid-live
intrepid-rescue

Tools
gparted
grml


Now to add systems;

Ubuntu 8.04 Hardy Heron install:

...more to come about adding the the systems to the tftp server

Tuesday, August 12, 2008

Turn off Firefox address bar url search

Annoying as hell when you just want to go to a host on the lan.
Type about:config in the address bar, answer yes then search for browser.urlbar.maxRichResults and change the value to -1 .

Sunday, August 10, 2008

Tall boy


My great dane, Buster. He's almost taller than me, and I'm 192cm. He'll do anything for some saucages. (I haven't told him they're actually hot dogs)


Lazy dog...

More pictures here:
http://www.flickr.com/photos/vigstrom/

Cat in a tyre


This cat likes to sleep inside motorcycle tyres...

Restore grub

I have the following disk layout:
sda1 Windows XP
sda5 Ubuntu 8.10 Intrepid Ibex (testing)
sda6 Ubuntu 8.04 Hardy Heron (working os)
sda8 Files

When installing the Intrepid Ibex daily testing distribution it rewrites grub. When I'm done testing and want to reset grub I just run the following as root (sudo -s) in terminal:
root@hardy:~#grub
[ Minimal BASH-like line editing is supported. For
the first word, TAB lists possible command
completions. Anywhere else TAB lists the possible
completions of a device/filename. ]

grub>
And run
grub> root (hd0,5)
My /boot is on sda6, (grub uses the bios order, starting at 0)
And then
grub> setup (hd0) 
Now just 'quit' and reboot.

Saturday, August 9, 2008

nfs mount

Set up the nfs share on the server:
1. Install nfs services
sudo apt-get install nfs-kernel-server nfs-common portmap

2. Edit the /etc/exports file (I like vim, change to gedit or emacs if you're bent that way)
sudo vim /etc/exports

add a line containing the folder you want to export, here's an example
/files/Public 192.168.0.1/24(rw,no_root_squash,async)

That will allow all computers with ip 192.168.0.1 to 192.168.0.254 to read and write.
You can specify a single computer ip and change 'rw' (read/write) to 'ro' (read only).

3. Restart the services
sudo /etc/init.d/portmap restart
sudo /etc/init.d/nfs-kernel-server restart

After changing /etc/exports you have to
sudo exportfs -a


Configure the client
1. Install nfs client support
sudo apt-get install portmap nfs-common

2. Create a mount point (A directory to hold the file system)
sudo mkdir /mnt/serverfiles

3. You may have to restart the services:
sudo /etc/init.d/portmap restart
sudo /etc/init.d/nfs-common restart

Now to mount the server share from a terminal:
sudo mount servername:/files/Public /mnt/serverfiles

To make it automount when booting:
sudo vim /etc/fstab

Add a line like this:
servername:/files/Public /mnt/serverfiles nfs rsize=8192,wsize=8192,timeo=14,intr

Friday, August 1, 2008

Eclipse





Picture of the solar eclipse over Stockholm today.

Customize the time format in Gnome

start gconf-editor1 and navigate to /apps/panel/applets/clock_screen0/prefs/custom_format
(clock_screen0 may not be exactly what you have in your system but you'll probably guess which is the right one)

-first change the key 'format' to 'custom' (you have to type it in, note the key documentation in the lower pane)
-Then set custom_format to something, say %Y %m %d - %R which will look like 2008 08 01 - 01:00
%Y - full year
%m - two digit month
%d - two digit day
%R - 24 hour time



You'll find more specifiers in the man page for date
$ man date

(1: You may have to install the editor with your package manager. Ubuntu/Debian: apt-get install gconf-editor)