2012-02-26

42

26 February 1970:
- in the morning there were only 4.834.800 seconds on Unix time
- the Beatles released Hey Jude
- rfc 34 was published
- in the evening Led Zeppelin performed in Stockholm
- one of my uncles was 40 years old

today is 26 February 2012:
- Unix time just passed 1.330.210.800 seconds
- only two Beatles are alive
- rfc count is up to 6533
- I am 42
- that same uncle is now 82

2012-02-06

Space: the final frontier

Generation X grew up with a recent history of Moon landings that allowed dreaming about permanent Moon bases and manned missions to Mars in the Eighties.... but both seem to be further away than ever.

Currently the most exciting space endeavors are:

Juno
Launched in the summer of 2011 and on a five year trip to explore Jupiter. If all goes well Juno will orbit Jupiter in the years 2016 and 2017.  Jupiter was already explored by the Pioneer and Voyager probes, and while I have no doubts about the scientific value of this mission, I fear that the mathematics behind the Earth flyby next year to speed up its course to Jupiter are more exciting.

Tiangong
China achieved automatic space docking in 2011. They have a small space laboratory named Tiangong and reliable rockets and spacecraft to get there. While I applaud their effort and follow their progress closely, it does feel like repeating Mir and Skylab. Expect one or two spacecraft to dock with Tiangong this year. Their progress is steady, but slow.

SpaceShipTwo
Richard Branson has the money and the will to start a space tourist business with SpaceshipTwo. The goal is to fly tourists to space... well almost space since they aim for the bottom of the Thermosphere, well below the ISS (which in itself is barely halfway in the Thermosphere). Flights with paying tourists should start in 2013.

New Horizons
Maybe the most promising of all current missions, aiming for a close encounter with Pluto. (Remember Pluto used to be a planet). Promising because we have not been to Pluto yet. The best pictures today are only ten pixels wide. Expect some nice desktop (or smartphone) wallpapers by 2015.

So... no Mars to stay mission yet, no manned Moon base today, nor are there any plans to return to the Moon (please don't point to babbling American presidential candidates or Russian managers at Roskosmos). Maybe a blog post about Bigelow or SpaceX next year... did I miss anything ?


2012-01-27

staking

Vakbonden hebben in het verleden zeker hun functie gehad om op te komen voor basis mensenrechten voor arbeiders. Dat is gelukt, ondertussen leven we in Belgiƫ allemaal in grote luxe. Hoeveel stakers bezitten een eigen huis, eigen wagen, laptop, flatscreen TV, smartphone en hebben nog geld over voor een reis?

Met de bedrijven gaat het minder goed. Het is crisis en de concurrentie uit het Oostblok en uit Azie is moordend. Het laatste wat een bedrijf vandaag nodig heeft, zijn stakers. Staken kost geld, en de winstmarges van de industrie zijn al lang niet meer wat ze vroeger waren. Als ge frustraties hebt met de banken, ga dan naar een andere bank. Er zijn voldoende kleine banken die niet gokken op de financiƫle markten. Maar werk uw frustraties niet uit op onze bedrijven aub.


Maandag wordt er niet gestaakt voor mensenrechten, wel om invloed uit te oefenen op de regering. De vakbonden willen het beleid van dit land bepalen. Als ze het dan toch zoveel beter weten, dat ze dan een partij oprichten. Eigenlijk zou Di Rupo en zijn regering maandag ontslag moeten nemen en tegen de vakbonden zeggen "Doen jullie het maar, en neem ineens het parlement (of alle parlementen sic) over!".

We hebben in dit land teveel! Teveel parlementen ok, maar vooral ook teveel luxe. Vergelijk met Azie, het Oostblok, Noord-Afrika waar men nog volop moet zorgen voor basis produkten zoals riolering, electriciteit, proper water enzovoorts. Daar zijn nog veel mensen die willen werken, die hard willen werken en die blij zijn dat ze werk hebben. Wees dus niet boos als na de staking van maandag blijkt dat bedrijven liever in Azie een filiaal openen dan hier.

Ik ga werken op maandag, want staken heeft alleen maar nadelen voor ons land!



2011-11-24

Mobile Vikings

Today is my 42nd day as a Mobile Viking. Call, sms and internet work perfectly and it is at least 50 percent cheaper than Belgacom Proximus! (No this is not an ad, I'm just happy for making a good decision.)

2011-11-17

Vrije software

Dinsdagavond gaf ik op cvo tsm een inleiding van een uurtje over vrije software. Het event is gefilmd en zal binnenkort online komen. De slides kan u hier(pdf) al bekijken.

Achteraf lag ik er wakker van omdat:
- mijn verhaal er absoluut niet uit kwam zoals ik wou
- ik vergeten te melden ben bij de vier vrijheden dat je eigen interne aanpassingen *niet* moet vrijgeven onder de gpl.
- hoewel mensen op de achterste rijen mij perfect konden verstaan, had ik voor een aantal personen toch beter de micro gebruikt (er was 81 man)

De balans is gelukkig nog positief omdat:
- meer dan 40 van de 49 evaluaties toch wel extreem goed waren (allemaal 8/9 of 9/9 voor de vragen over de spreker)
- er maar twee evaluaties waren die mij niet willen terugzien als spreker
- ach ik heb weer iets bijgeleerd over spreken voor groepen
- er is een basis gelegd voor een goeie talk over vrije software

2011-11-08

iSCSI mini howto

Some things in life, like iSCSI, are simple!
iSCSI is a protocol that allows you to have SCSI over IP.

The iSCSI Target

The host containing the physical hardware is called the iSCSI target and is easy to setup on Linux using iscsitarget.
aptitude install iscsitarget
aptitude install iscsitarget-dkms (Debian 6)

After enabling it in /etc/default/iscsitarget you can use files, hd devices, partitions, lvm volumes or software raid mdadm devices as 'physical hardware disks'
root@debby6:/etc/iet# cat ietd.conf
Target iqn.2010-02.be.linux-training:storage.lun1
IncomingUser isuser hunter2
OutgoingUser
Lun 0 Path=/iscsi/lun1.img,Type=fileio
Alias LUN1

Where /iscsi/lun1.img is a zeroed file created with
dd if=/dev/zero of=/iscsi/lun1.img count= bs=

Add the device to the allowed list:
root@debby6:/etc/iet# cat initiators.allow
iqn.2010-02.be.linux-training:storage.lun1

and start the server. You should see this:
root@debby6:/etc/iet# cat /proc/net/iet/session
tid:1 name:iqn.2010-02.be.linux-training:storage.lun1
The iSCSI Initiator

The host that connects to this target server is called the Initiator. Most Linux distros have this available as open-iscsi.
aptitude install open-iscsi

A discovery will show available devices on the target:
root@ubu1104:/etc/iscsi# iscsiadm -m discovery -t st -p debby6
192.168.1.31:3260,1 iqn.2010-02.be.linux-training:storage.lun2

Configuration with chap user and password takes a couple of commands:
root@ubu1104:/etc/iscsi# iscsiadm -m node --targetname "iqn.2010-02.be.linux-training:storage.lun1" --portal "debby6:3260" --op=update --name node.session.auth.authmethod --value=CHAP
root@ubu1104:/etc/iscsi# iscsiadm -m node --targetname "iqn.2010-02.be.linux-training:storage.lun1" --portal "debby6:3260" --op=update --name node.session.auth.username --value=isuser
root@ubu1104:/etc/iscsi# iscsiadm -m node --targetname "iqn.2010-02.be.linux-training:storage.lun1" --portal "debby6:3260" --op=update --name node.session.auth.password --value=hunter2

That's it! Now (re)start the open-iscsi service and use fdisk to see your iSCSI device.

2011-10-21

November 2011 : No radio, no music!

In the news today: Taxi drivers will now have to pay a daily fee to play radio (or even music on CD for which they already paid). The fee goes to SABAM (think MPAA).

Radio used to be free, to promote music so people would go and buy music. But more and more everyone has to pay because people (could be) listening: first only concerts and parties, then work environments like shops, then waiting rooms, truck drivers, and now taxi drivers. How long will it take until there is a tax on our ears ?! No, I'm not kidding(*), the MAFIA(sorry I meant SABAM) will get there!

Who do we pay ?! The 200 people working for SABAM ? Talk to any *real* artist and ask them how much they get from SABAM, because it is supposed to be all for the 'poor' artists. We already pay the rich and powerful for the music we buy, we pay a second time for the storage media where we keep the music (cd/usb/harddisk,...), so starting today we will pay three times when taking a taxi while listening to our own music. We could soon be paying a fourth time via our monthly internet connection payments. And I am probably forgetting a couple...

Why do people accept this ? What's the benefit of hauling money to SABAM for society ? What do we get in return ? It seems to me that this is a classical story of the rich getting richer... for doing absolutely nothing.

We should all refuse to buy any kind of music, turn off the radio and not play any audio for a whole month! Yes, make November 2011 the month of protest against the storm on SABAM taxes.


(*) It reminds of an old story. Put a frog in boiling water, and it will jump out immediately. Put a frog in cold water and slowly heat it up... the frog will stay put and die. Slow increments are easier to accept than sudden changes, but the end result is the same.

2011-06-26

Bluetooth and NXT setup

A reminder for myself on how to configure bluetooth for NXT devices.

Turn on all devices and activate bluetooth on the Linux, then:
$ hcitool scan
Scanning ...
00:16:53:08:XX:XX Julie
00:16:53:0B:XX:XX Mercedes

Then configure /etc/bluetooth/rfcomm.conf like this:
$ cat /etc/bluetooth/rfcomm.conf
rfcomm0 {
bind yes;
device 00:16:53:0B:XX:XX;
channel 1;
comment "Mercedes";
}

rfcomm1 {
bind yes;
device 00:16:53:08:XX:XX;
channel 1;
comment "Julie";
}

Then check the binding (as root):
# rfcomm release all && rfcomm bind all && rfcomm
rfcomm0: 00:16:53:0B:XX:XX channel 1 clean
rfcomm1: 00:16:53:08:XX:XX channel 2 clean

Then create an nxt.dat file in ~ :
$ cat /home/paul/nxt.dat
BTH::JULIE=BTH::JULIE::00:16:53:08:XX:XX::5
BTH::MERCEDES=BTH::MERCEDES::00:16:53:0B:XX:XX::5

Then compile and download to the NXT:
nbc foo.nbc -O=bar.rxe
nbc -b -d -S=BTH::Julie bar.rxe

2011-06-17

post-ubuntu install

Packages installed after default ubuntu install (personal bookmark).
root@mac:~# history | grep 'aptitude install'
11 aptitude install nvidia-settings nvidia-bl-dkms \
pommed vim nfs-common wicd
45 aptitude install azureus wesnoth chromium-browser
104 aptitude install virtualbox-4.0
139 aptitude install wireshark wireshark-gnome
152 aptitude install gimp
173 aptitude install openssh-server
180 aptitude install pdfedit
201 aptitude install ttf-bitstream-vera
206 aptitude install unrar
219 aptitude install imagemagick
220 history | grep 'aptitude install'

2011-06-07

World ipv6 day!

8th of June is tomorrow already!
My humble contribution is to teach networking students tonight about ipv6. It will be mostly theory since the school doesn't support ipv6 on the network. Luckily I have some screenshots and wireshark sniffs from this morning of a working ipv6 connection to the internet.

One of the ipv6 test websites.


A tcp handshake and http connection over ipv6 (using 6to4).


And a PTR record in ip6.net with 32 child domains (okay you don't need ipv6 for this, but it is related).

2011-04-23

another Microsoft virus...

Selecting an image on Google Image Search regularly minimizes the browser and pops up this annoying dialog.


Running Linux you know this is fake, but it is still annoying because (besides the minimizing of your browser) also opens a tab that refuses the back-button, and you don't get to see the actual image.


The first time this is funny (there is no C: drive nor a "My Documents" directory on "My computer").

Searching Google Images for something simple as "Axis Allies board 1984" and clicking on an image is enough to provoke it.

If you want to see the fun on Linux, use this link. Use at your own risk ;-)

http://www.google.com/imgres?imgurl=http://i.ehow.co.uk/images/a05/74/g6/axis-allies-board-game-rules-800X800.jpg&imgrefurl=http://madpeasant.com/cultivo-hasboro-axis-and-allies-board-game-download/&usg=__33uvjrDPcS0KU-Ifngk1w1ooYKI=&h=292&w=500&sz=146&hl=en&start=5&sig2=Uzaxsm4iXRrpvVidDNdnMw&zoom=1&tbnid=yFktGyapNI72ZM:&tbnh=76&tbnw=130&ei=MKeyTfGWCIaCOrHZ5IcJ&prev=/search%3Fq%3Daxis%2Ballies%2Bboard%2B1984%26hl%3Den%26safe%3Doff%26client%3Dubuntu%26hs%3DpRv%26sa%3DX%26channel%3Dfs%26biw%3D1912%26bih%3D1055%26tbas%3D0%26tbm%3Disch%26prmd%3Divns&itbs=1

(the url might not work since I reported it )

Click OK on this last dialog to close the tab.

2011-04-16

loadays talk

Some people convinced me to do a talk^Wtutorial tomorrow at loadays. It will be about bash!

Maybe I will use some slides from this downloadable pdf (50KB).

Content will come from the linux-training.be project (but that website stalled since February due to a redesign of our build-system). People that go to loadays can download the newest (1MB) pdf here.

LOAD, the Linux system administrator days

2011-03-29

clear zfs properties

Default zfs properties can be read with zfs get.
root@sol11aa ~# zfs get -r quota rpool/mita
NAME PROPERTY VALUE SOURCE
rpool/mita quota none default
rpool/mita/jenna quota none default
rpool/mita/josep quota none default

These properties can be changed with zfs set.
root@sol11aa ~# zfs set quota=2gb rpool/mita/jenna
root@sol11aa ~# zfs get -r quota rpool/mita
NAME PROPERTY VALUE SOURCE
rpool/mita quota none default
rpool/mita/jenna quota 2G local
rpool/mita/josep quota none default

And they can be cleared by setting the property to none, but the source is now set to local instead of default.
root@sol11aa ~# zfs set quota=none rpool/mita/jenna
root@sol11aa ~# zfs get -r quota rpool/mita
NAME PROPERTY VALUE SOURCE
rpool/mita quota none default
rpool/mita/jenna quota none local
rpool/mita/josep quota none default

This local can be restored to default using zfs inherit.
root@sol11aa ~# zfs inherit -Sr quota rpool/mita/jenna
root@sol11aa ~# zfs get -r quota rpool/mita
NAME PROPERTY VALUE SOURCE
rpool/mita quota none default
rpool/mita/jenna quota none default
rpool/mita/josep quota none default

2011-03-23

nine provinces in Flanders ?

Radio 1 this morning discussed a proposal to split Flanders into nine provinces. Disregarding the fact that I oppose the eight layered governance of a random street(*) in my city, I would like to redraw the current map of Flanders.



One of the main issues that prevents this country from having a government resolves around (imho ridiculous) language problems in and around Brussels (the brown area). Brussels is surrounded by (officially) Dutch speaking communities, but is itself mainly French-speaking.
Bad governance between 1970 and 2010 resulted in discrepancies (for instance: French-speaking people in Dutch-speaking territory BHV can vote for French-speaking politicians, but Dutch-speaking inhabitants of the French-speaking part of Belgium cannot vote for Dutch-speaking politicians).

Also, Brussels is structurally way too small to make decisions that it should be capable of making (about its airport/highways/public transport/industry/...), since those are mainly in Dutch speaking parts outside Brussels (falling under another government).

The new map:


This new map enlarges Brussels so that it can manage the areas that currently surround Brussels but that economically and structurally belong to Brussels. Another advantage is that adding more Dutch-speaking people to Brussels makes it more balanced linguistically.
The red part is the new province of Leuven. Some municipalities from the former province of Vlaams Brabant migrated to neighboring provinces.

(*) Depending on what happens in a random Antwerp street, one or more of the following eight 'governments' is responsible:
- district (part of the city)
- gemeente (the city council)
- kanton (district, smaller than a province)
- provincie (province)
- gemeenschap (the Flemish Community)
- gewest (the Flemish Region)
- land (Belgium)
- Europese Unie (European Union)
What happened to the KISS strategy ?!

2011-02-20

orca magnifier ?!

Yesterday I tried setting up orca magnifier on a freshly installed (fully updated) Ubuntu 10.10. The moment you check the magnifier checkbox the screen becomes garbled (all window borders disappear, about one quarter of the screen is magnified, the rest is garbled). The 'apply' and 'cancel' buttons are invisible (yet they work if you can guess their position).

Switching from the default to nvidia drivers makes no difference.

First we tried on an Acer Aspire 17-inch laptop, next we tried a 15-inch Apple Macbook Pro. The results are identical!! (yes i tried removing the orca config, creating a new user, reboot, ...)

Is there an alternative for orca magnifier ? (Because the Ubuntu/Orca forums don't help much.)

Will it work in Debian or Fedora ? (I would have to burn the cd and drive 100km to test this...)

Do you know people that actually use orca magnifier on Ubuntu ?

2010-12-27

Uchronie(s): New Byzance, New Harlem, New York

A friend gave me an excellent French series of comic books called Uchronie(s). Or is it three series ?

Each series is about a different city: New Byzance, New Harlem and New York. Or is it each time the same city in an alternate reality ?

In New Byzance people dream fragments of the story in New Harlem. In New York they see the future, or is the past ? The idea is to read the first comic of each series, before reading any of the part 2's.

All in all this is an interesting entanglement of stories, philosophy, history and cultures (to be concluded in 2011).

2010-11-07

svg with inkscape

Inkscape is an easy (and free) tool to create scalable vector graphics. It is much fun using it, it is even more fun sharing the results.

Two routers connect two LAN's


DNS lookup behind adsl-router


TCP handshake example
More of them can be found here : http://www.linux-training.be/svg/

2010-10-20

funny directory on Solaris

bell21# cd /usr/share/man/
bash: cd: /usr/share/man/: No such file or directory
bell21# cd /usr/share/
bell21# file man
man: directory
bell21# chmod 755 man
chmod: WARNING: can't change man
bell21# cd man
bash: cd: man: No such file or directory
bell21# ls ma*
man: No such file or directory
bell21# echo ma*
man
bell21# ls -l /usr/share | grep man
dr-xr-xr-x 1 root root 1 Oct 20 08:52 man
bell21#
Answer below...

One of my students put
/usr/share/man bell21:/usr/share/man
in the /etc/auto_direct file ;-)

2010-08-25

simple zfs snapshot demo

create a zfs file system on four disks
root@sol10u8 /# zpool create zzz c2t0d0 c2t1d0 c3t0d0 c3t1d0
root@sol10u8 /# zfs create zzz/data42


populate it with 2MB of data
root@sol10u8 /# dd if=/dev/urandom of=/zzz/data42/file2MB count=2048 bs=1024
2048+0 records in
2048+0 records out


verify the used disk space is 2MB
root@sol10u8 /# zfs list -o space
NAME AVAIL USED USEDSNAP USEDDS USEDREFRESERV USEDCHILD
zzz 7.81G 2.11M 0 23K 0 2.09M
zzz/data42 7.81G 2.02M 0 2.02M 0 0


add 3MB
root@sol10u8 /# dd if=/dev/urandom of=/zzz/data42/file3MB count=3072 bs=1024
3072+0 records in
3072+0 records out


wait a couple of seconds, then verify usage of diskspace
2MB + 3MB = 5MB
root@sol10u8 /# zfs list -o space
NAME AVAIL USED USEDSNAP USEDDS USEDREFRESERV USEDCHILD
zzz 7.81G 5.12M 0 23K 0 5.10M
zzz/data42 7.81G 5.03M 0 5.03M 0 0


create a snapshot to preserve this 5MB forever
root@sol10u8 /# zfs snapshot zzz/data42@Wednesday


snapshot = read only copy
snapshot = takes almost zero diskspace when created
snapshot = consumes diskspace as data changes
snapshot = because it keeps the original data

verify diskspace used by snapshot
root@sol10u8 /# zfs list -o space
NAME AVAIL USED USEDSNAP USEDDS USEDREFRESERV USEDCHILD
zzz 7.81G 5.12M 0 23K 0 5.10M
zzz/data42 7.81G 5.03M 0 5.03M 0 0
zzz/data42@Wednesday - 0 - - - -


force 3MB of data changes on the original file system
root@sol10u8 /# dd if=/dev/urandom of=/zzz/data42/file3MB count=3072 bs=1024
3072+0 records in
3072+0 records out


this new 3MB of data was written over 3MB of existing data

wait a couple of seconds!!
then verify disk usage of file system and snapshot
root@sol10u8 /# zfs list -o space
NAME AVAIL USED USEDSNAP USEDDS USEDREFRESERV USEDCHILD
zzz 7.81G 8.15M 0 23K 0 8.13M
zzz/data42 7.81G 8.05M 3.02M 5.03M 0 0
zzz/data42@Wednesday - 3.02M - - - -


notice that the snapshot uses 3MB --> it's keeping the original 3MB forever!
notice that the zpool consumes 8MB : 5MB of current data + 3MB snapshot data

copying the snapshot to another file system would total to 5MB
the same 5MB that existed at the time we took the snapshot
3MB inside the snapshot + 2MB of original data still on zzz/data42

add another 4MB of data to the file system
root@sol10u8 /# dd if=/dev/urandom of=/zzz/data42/file4MB count=4096 bs=1024
4096+0 records in
4096+0 records out


wait a couple of seconds
verify that data42 now consumes 9MB
snapshot stays at 3MB
total for the pool is now 12 MB
12MB = 3MB snapshot + 2MB original data + 3MB new data + 4MB new data
root@sol10u8 /# zfs list -o space
NAME AVAIL USED USEDSNAP USEDDS USEDREFRESERV USEDCHILD
zzz 7.80G 12.2M 0 23K 0 12.1M
zzz/data42 7.80G 12.1M 3.02M 9.03M 0 0
zzz/data42@Wednesday - 3.02M - - - -


this new 4MB data is in a new file, so it does not influence the snapshot

take a look at the file system
root@sol10u8 /# ls -l /zzz/data42/
total 18457
-rw-r--r-- 1 root root 2097152 Aug 25 21:45 file2MB
-rw-r--r-- 1 root root 3145728 Aug 25 21:49 file3MB
-rw-r--r-- 1 root root 4194304 Aug 25 21:51 file4MB


take a look at the snapshot
root@sol10u8 /# ls -l /zzz/data42/.zfs/snapshot/Wednesday/
total 10256
-rw-r--r-- 1 root root 2097152 Aug 25 21:45 file2MB
-rw-r--r-- 1 root root 3145728 Aug 25 21:46 file3MB


notice the difference in the time stamp on the 3MB file!!

use zfs send/receive to copy the snapshot
zfs send zzz/data42@Wednesday | ssh server "zfs receive yyy/data42"


or use cp, tar, cpio, rsync... to backup a snapshot
www.linux-training.be explains these commands

destroy the snapshot
zfs destroy zzz/data42@Wednesday