Saturday, 8 November 2008

Server oprydning

Mens jeg lige sidder og keder mig (efter at have afleveret det sidste mini-projekt inden jeg skal til for alvor at arbejde på mit semester projekt), så skete der det at mine tidligere udviklings og lege maskiner pludseligt kom op igen, så jeg skulle til at have det hele geninstalleret der.

Det er en broget flok, så i gang med Python skovlen, og få kodet lidt automatisering. Det vigtigste er automatiseret installation af seneste Java JDK, Glassfish, og Tomcat. Nå, men Python og Pexpect (en Pythonifisering af expect), det er lige hvad der kan bruges til det.

Så var der navngivning som jeg også lige ville have ensrettet. Tidligere hed maskinerne noget så usexet som, list2 - list(1) var navnet på en maskine helt tilbage da jeg arbejde hos SOL, sip1 - Gratissip's SIP proxy boks, og "inf" - som jeg slet ikke kan huske hvorfor.

Guder fra den nordiske mytologi er vist overbrugt, så lidt anderledes skulle vælges, og valget faldt på distrikterne i den stat vi bor i, i Indien.

Andhra Pradesh kort

cuddapah.kokila.eu
Gratissip's boks, hjemmesider (Ubuntu, DK).
nellore.kokila.eu
Installation og test boks (OpenSolaris, DK).
visakhapatnam.kokila.eu
Subversion repository boks (OpenSolaris, USA).
prakasam.kokila.eu
Backup boks (Ubuntu, DK).
chittoor.kokila.eu
Har jeg ikke lige nogen brug til endnu, men mon ikke jeg kan finde på noget :-) (Debian, HU)

Samtidig har jeg lige fået opdateret dokumenterne i min Dropbox, så installation også er bedre dokumenteret i fremtiden - så er der lidt mere styr på det hele.

Posted by sorend at 5:27 PM in Stud.IT notes

Sunday, 19 October 2008

Google 10 år, klummer svar

Google 10 years

Min tidligere kollega Mikkel deMib har en klumme på Comon om Google's 10 års fødselsdag. Der er en del åbne spørgsmål der, så jeg skrev lidt kommentarer til ham som jeg håbede han ville svare på, men det er foreløbig ikke lige blevet til noget ;-) Nå, men jeg har kopieret svaret her til bloggen, for at få lidt blog-indlæg, og også fordi det er et område der interesserer mig.

Blog-indlægget handler om hvad man kan forvente af nye tiltag der kan sætte mægtige Google under pres.

Som der skrives er det svært at forestille sig en "Google killer" da de favner så vidt, og er så gode til at jorde/opkøbe (alt efter hvordan man ser det), at det er svært at komme igang med noget nyt. Det er lidt synd, for Google er så store at de nok ikke vil lave radikalt om på deres tilgang til søgning (bare min holdning).

Nogen enkelte områder kunne være f.eks. (der er nok mange flere):

1) Dybe søgninger. Det at man søger mere specifikt i online-databaser. F.eks. hvis man søger på "bmw brugt 100000 kr" er det måske mere relevant hvad bilbasen.dk kan komme op med ved at søge på "bmw" og "=100k kr", end en liste af websites der har noget med brugt bmw.

2) Specifikke resultater. Google er begyndt lidt på det, søger man på "københavn kirker" får man et mere specifikt resultat end bare henvisninger til websider).

3) Kontekst-baserede søgninger. Til hver søgning er der noget kontekst, f.eks. sidder du og skriver et dokument om SEO, men mangler lige en defination af et ord, så du ønsker at slå ordet op i en SEO kontekst. Det samme med søgningen ovenfor, 100000kr betyder måske for dig at du er interesseret i alt fra 50k-120k, mens for andre betyder 100k 95k-105k.

4) "Live" søgninger. Google er nogengange hurtig til at få dine ændringer indekserede, men måske kunne websites installere en lille app (Google Desktop lignende?) eller implementere et API, som søgemaskinen kunne benytte, til søgninger i altid opdateret data. F.eks. Google er allerede massivt distribueret, man kunne godt forestille sig at nogen af deres "tønder" ligger hos dem der genererer data.

5) Rigtig semantik. Så godt som alle søgemaskiner i dag benytter statistik (nogen vil måske argumentere for at "statistisk semantik" også er rigtig semantik, men det ser jeg lige bort fra her). Hvis man kunne få semantik ind i stedet, kunne det være lettere at ramme hvad der ledes efter. Det er lidt svært at definere hvad sådan noget er, men Twine er et foreslag.

6) Hele GUI delen. Det er let at foreslå lignende keywords at søge efter, men søgemaskinerne udvider allerede forespørgsler med lignende keywords, så kunsten er at finde de keywords som ikke er lignende, men som også dækker hvad man har brug for. Hvordan præsenterer man sådan noget? Søgeresultaterne, måske man kunne benytte en spatiel tilgang til visualisering af resultater, hvor man selv kan organisere og gemme dem til senere. Hvad med billed-søgning, det er der forsket rigtigt meget i med gode resultater, men Google satser stadig på at man skal basere alt på keywords.

Der er altså mange muligheder for at "kille" Google hvis man tør sige nej til opkøb :-) Google har har baseret sig på standard-software fra de startede, og meget af teknologien til at skalere op er tilgængelig i dag, man skal bare i gang med at kode.

Technorati Tags:

Posted by sorend at 5:37 PM in Stud.IT notes

Sunday, 7 September 2008

Hundekøbere snydt

Jeg læste lige om denne nye slags scam som nogen (sikkert en, som udgiver sig for flere personer) har fundet på: At sælge hunde på DBA.dk og gipote.dk og så påstå at man er dansker, men pt. bor i England.

Det virker ikke særligt IT relateret, men, nu er det jo ikke lang tid siden at Google har fået sig en engelsk til dansk oversætter. Et rigtigt godt gæt, tror jeg vil være, at personen i England bruger den til at scamme danskere med.

Lige en hurtig lille test - se selv hvor let det er ved at klikke på links'ne her: http://kortlink.dk/google/5qvv, og http://kortlink.dk/google/5qvu

Det er ikke perfekt dansk, men det er efterhånden normalt at få rigtig dårlig grammatik og stavning i e-mails, så der er kun tilbage, at bruge hjernen og betale kontant, eller sige "nej tak", hvis man vil handle med sådan nogen :-(

Technorati Tags:

Posted by sorend at 12:14 PM in Stud.IT notes

Thursday, 21 August 2008

Opensolaris managing failed package installs

I just switched my laptop to run OpenSolaris, Sun's free Unix-alike OS. So far it is a success. There is still a lot to be done, and one of those is the IPS package system. It fails too often to my taste. This article is about how to clean up after a broken IPS installation.

Basics of IPS' pkg tool

You can use pkg authority -H to list the repositories currently added. You add repositories using pkg set-authority -O url name. Some good repositories I use, in addition to the default repository, are:

To find packages to install, you use pkg search -r keyword, and install using pkg install packagename, or alternatively, you use the GUI under System -> Administration -> Package manager.

Installing and failure

So far so good. Now we want to look at what happens when something fails. First you get something like this ...

sorend@kovuru:~/Desktop/tmp$ pfexec pkg install IPSgvim
DOWNLOAD                                    PKGS       FILES     XFER (MB)
Completed                                  58/58   5727/5727 121.15/121.15 

PHASE                                        ACTIONS
Install Phase                            14778/15536 A
ction install failed for 'opt/csw/lib/i386' (pkg://blastwave/IPScommon):
  OSError: [Errno 1] Not owner: '//opt/csw/lib/i386'
pkg: An unexpected error happened during installation: [Errno 1] Not owner: '//opt/csw/lib/i386'
The Boot Environment opensolaris failed to be updated. A snapshot was taken before the failed attempt and is mounted here /tmp/tmpYXxKFN.
 Use 'beadm unmount opensolaris_static:-:2008-08-21-13:32:22' and then 'beadm activate opensolaris_static:-:2008-08-21-13:32:22' 
if you wish to boot to this BE.
Traceback (most recent call last):
  File "/usr/bin/pkg", line 1734, in ?
    ret = main_func()
...

To clean up, first you need to cleanup the Boot Environment (BE), this can be done with the beadm command. Check which BE's are available using the command beadm list.

sorend@kovuru:~/Desktop/tmp$ beadm list
BE                                       Active Active on Mountpoint     Space 
Name                                            reboot                   Used 
----                                     ------ --------- ----------     -----
opensolaris_static:-:2008-08-21-13:32:22 no     no        /tmp/tmpYXxKFN 75.5K
opensolaris                              yes    yes       legacy         4.55G

Here you can see there is a opensolaris_static* environment, this is the one you want to remove. If it has a mountpoint, then we need to unmount it first (yes, that is "unmount", not "umount"). You can do that with beadm unmount opensolaris_static:-:2008-08-21-13:32:22. After this has been done, you use beadm destroy opensolaris_static:-:2008-08-21-13:32:22. It will ask you to confirm to remove it, you just say yes :-)

After the you have destroyed the BE, there is still the ZFS snapshots that the BE used left. Those are not destroyed automatically, so you need to do that manually aswell. You can use zfs list to view the available ZFS containers.

sorend@kovuru:~/Desktop/tmp$ zfs list
NAME                                                      USED  AVAIL  REFER  MOUNTPOINT
rpool                                                    5.89G  43.3G  56.5K  /rpool
rpool@install                                              19K      -  55.5K  -
rpool/ROOT                                               4.55G  43.3G    18K  /rpool/ROOT
rpool/ROOT@install                                         15K      -    18K  -
rpool/ROOT/opensolaris                                   4.55G  43.3G  3.38G  legacy
rpool/ROOT/opensolaris@install                            128M      -  2.48G  -
rpool/ROOT/opensolaris@static:-:2008-08-21-13:32:22      2.75M      -  3.38G  -
rpool/ROOT/opensolaris/opt                               1.04G  43.3G   962M  /opt
rpool/ROOT/opensolaris/opt@install                         73K      -  3.60M  -
rpool/ROOT/opensolaris/opt@static:-:2008-08-21-13:32:22  97.7M      -   821M  -
rpool/ROOT/opensolaris_static:-:2008-08-21-13:32:22      75.5K  43.3G  3.38G  legacy
rpool/ROOT/opensolaris_static:-:2008-08-21-13:32:22/opt      0  43.3G   821M  /opt
rpool/export                                             1.34G  43.3G    19K  /export
rpool/export@install                                       15K      -    19K  -
rpool/export/home                                        1.34G  43.3G  1.34G  /export/home
rpool/export/home@install                                  19K      -    21K  -

You see that there are some containers which have opensolaris_static* in their names. These are the ones you want to get rid of, and you can do that by the command zfs destroy containername. You do it for each of the snapshots. Thats it, you've cleaned up after a failed install.

I really hope they fix this to work better, since it is quite annoying, and the error messages are often hard to decipher.

Technorati Tags:

Posted by sorend at 1:15 PM in Stud.IT notes

Saturday, 26 July 2008

VPN to AAUE using Linux

Since quite a number of people have asked me how to do this now, then it's probably time for a short blog on how you exactly get it up and running.

Hardy comes with a lot of nice features, so luckily the configuration here can be purely GUI based (I am showing commands for package installation, but you can do it from Synaptic),

Install vpnc

Vpnc a VPN client which is compatible with Cisco's "EasyVPN" equipment. This is what is in use at AAUE, so we are home free. If anyone has tried the "real" Cisco VPN client for Linux, then they know what a horror it is to make working.

You want to get both vpnc and the plugin for network manager:

sudo apt-get install vpnc network-manager-vpnc
When the installation is done, it will restart your network manager.

Configure VPN

This is a multiple step process, but very easy, just follow the steps outlined here below:


1. Select VPN connections and Configure VPN from the Networkmanager.

2. Select "Add" new VPN.

3. Select "Forward" ;)

4. Select Compatible Cisco VPN client (vpnc) and go forward.

5. Enter "AAUE" as the connectio name, and fill out the form with gateway vpn.aue.aau.dk and group name student.aaue.aau.dk

6. Click on the "Optional" tab, and select the Override user name, and enter your AAUE username (usually two characters and four digits), eg. sd2100. Then go forward.

7. On the finishing picture, verify that you entered it correct and select "Apply".

8. Check network manager's VPN connections again. There is now one VPN connection called AAUE

Connecting

First time you are connecting to the VPN, you will need to enter two passwords, your AAUE password, and a Group password. Your AAUE password you should know, and luckily, the Group password, we can get without asking administrators (that is the usual procedure, you ask your administrator about the group password).

To get the grouppassword, you must download the VPN client for linux from the AAUE website. You need to get the file vpnlinux-student.tar.gz. Once you have downloaded this archive file, you can need to find the file aaue-student.pcf inside of the archive, and inside this file, find the enc_GroupPwd. In simple cut'n'paste commands it is like this:

tar zxOvf vpnlinux-student.tar.gz vpnclient/aaue-student.pcf | grep enc_GroupPwd

Now you take this encrypted group password, and copy it into this neat webservice, which can "decrypt" the password: http://www.unix-ag.uni-kl.de/~massar/bin/cisco-decode, and voila, you have the Group password.

Then we can go on with connecting.


9. Select VPN connections and AAUE, when it asks passwords, enter the two passwords. Also select to save the passwords in the keyring, then you don't need to enter them each time you connect.

10. You are now connected ;-)

Next is that you should install a tool like FoxyProxy in Firefox, so you can easily switch between the AAUE proxy proxy.aue.aau.dk:3128 and your usual settings.

SSH out from AAUE network

Just a small extra tip. If you use SSH a lot, then I find it convenient to have configured two versions of each host, one that uses normal setup, and one that uses the VPN setup. To ssh out through the AAUE proxy, you can use the tool connect-proxy (sudo apt-get install connect-proxy).

One example from my ~/.ssh/config:

Host tanesha.net
        Hostname        tanesha.net
        Port            22
        User            sorenad
        Compression     yes
        ForwardX11      yes

Host tanesha.net-aaue
        Hostname        tanesha.net
        Port            22
        User            sorenad
        Compression     yes
        ForwardX11      yes
        ProxyCommand    connect-proxy -H proxy.aue.aau.dk:3128 %h %p

With this, I can do ssh tanesha.net-aaue when I am connected to the AAUE vpn, and ssh tanesha.net when I am on "plain" internet. It takes some more time to establish the connection through the AAUE proxy for some reason, but when it has been established, it goes fast like usual.

Technorati Tags:

Posted by sorend at 1:22 PM in Stud.IT notes

Thursday, 26 June 2008

Længe leve Tournesol!

Jeg plejer ikke normalt at skrive om politik, det ligger jo noget langt væk fra IT-nørd typen, men når nu Khader nævner Jørgen Poulsen som en "Tournesol type", så fortjener det alligevel et lille blog-indlæg.

Professor Tournesol som mange nok husker fra sin barndom/ungdom i Tintin bøgerne er den klassiske distræte professor, han er lidt tunghør overfor verden, men kun pga. sin passion for videnskaben, hvor hans opfindelser typisk går ud på noget genialt der kan give en bedre verden for alle.

At Jørgen Poulsen så sammenlignes med Tournesol forstår jeg ikke hvordan kan være en hån? Medmindre man håner videnskaben og arbejdet for en bedre verden?

Længe leve alle Tournesol typer! - Og, alt muligt respekt til Jørgen Poulsen, som har turdet gå ind i politik - håber han går til de radikale, så kan min lillesøster om ikke andet stemme på ham ;-)

Technorati Tags:

Posted by sorend at 10:53 AM in Stud.IT notes

Thursday, 24 April 2008

EU parliament voting system

Since I have a course on UI design this semester, with focus on very simple interfaces for embedded systems, I found these articles on Politiken quite interesting. Apparently, the case is, that members of the EU parliament by accident voted against what they wanted to vote, because they pushed the wrong button.


N.Y.Times, feb. 15, 1920, electronic
voting is not a new concept.

I tried to search little on the net to find out what kind of voting system it is they have there in detail, but it was not so easy to figure. I guess I have to go there once to see for myself how it works and how the UI excactly is. From what I can find about the MEP voting system and their Electronic voting rules, is that:

  • Electronic votes is the last option, where show of hands is the first
  • There are three buttons: For, Against, and Abstaining
  • The buttons are embedded in the desk
  • There is an electronic board where you can see results
  • MEPs have to identify with some kind of electronic card
  • There are two "modes" of voting, one counts only numbers, another "roll call" records what each MEP vote, the recording is not done by the electronic system
  • It will be an "anonymous" vote if only numbers are counted

Since the articles mention that voters are known, I guess it means that they voted electronically, but also that their names were registered by "roll call". Already this suggests that it is not a "UI problem" with the electronic voting system, but rather, well, they voted how they wanted to vote :-). (I'm not into politics, but Engelbreth's blog kind of coins the issue)

However, if someone had pictures of the actual voting system there, it could be interesting to conduct a study on features such as:

  • Coloring and labeling of buttons. Eg. a uniform color and too small labels could speak in favor of accidental votes.
  • Placement and size of buttons. Too close by each other, or size is different.
  • Environment around the setup, is it comfortable, is there enough space to the neighbouring table, so other members cannot lurk on you? This contradicts that it has to be easy to distinguish the buttons.
  • Do the displays show "live" votes or only results after voting has closed? I guess it has to be only final results, but surely live results could have maybe triggered more to "dare" to wrote For in this case.

Anyway, its an interesting field, and I hope I get the chance to go there some day, atleast just to see, not nessecarily to change anything (some can argue that EU in general does not change anything, but I better not say that, they could have impact on university fundings :) ).

Technorati Tags:

Posted by sorend at 7:56 AM in Stud.IT notes