BaroqueW

BaroqueW

and his sidekick nikkitaa

BaroqueW RSS Feed
 
 
 
 

Archive for January, 2008

Analyse des logs de MediaProxy

Voici une brève astuce pour analyser les logs de MediaProxy. Plus précisément, ce script affiche le nombre moyen de paquets perdus par MediaProxy lorsqu’on le teste avec des sessions RTP ayant un nombre de paquets constant et connu (i.e. lorsqu’on rejoue une session RTP pré-enregistrée, avec SIPp par exemple).

tail -1000 /var/log/messages | grep relayed | awk ‘{print $8}’ > myresults
sed ’s/^…………//’ myresults | awk ‘BEGIN{s=0;}{s=s+$0;}END {print 400-s/NR;}’

Petite explication

tail -1000 /var/log/messages | grep relayed | awk ‘{print $8}’ > myresults

Première ligne, on prend la fin des logs systèmes (adaptez à votre configuration, notamment si les logs de MediaProxy sont dans un fichier séparé), on sélectionne ensuite uniquement les lignes indiquant la fin d’une connection, et sur ces lignes, on ne prend que le 8ème champ (qui contient le nombre de paquets reçus et renvoyés) et on sauvegarde le résultat dans un fichier temporaire.

sed ’s/^…………//’ myresults | awk ‘BEGIN{s=0;}{s=s+$0;}END {print 400-s/NR;}’

Seconde ligne, on ne convserve que le nombre de paquets renvoyés par MediaProxy, on additionne toutes les valeurs et on en fait la moyenne avant de la soustraire du nombre de paquets attendus (ici 400 par session RTP) ce qui donne le nombre moyen de paquets perdus par session RTP.

  • Share/Save/Bookmark
Category: Articles en français, Tech >> Computer | Leave a comment

Meilleurs vœux !

Bonne année à tous !

Un peu en retard certes, tout comme les cartes de bonne année que j’ai postées de Suède. Rentré de France à la toute fin de Décembre, je me suis mis en quête de quelques cartes dans le style suédois pour envoyer à ma famille. Et bien, en deux semaines, impossible d’en trouver une seule ! Pas de gott nytt år, pas de god jul, rien !
Jul

Renseignements pris auprès d’un Suédois, il semblerait que les cartes de vœux en Suède sont échangées avant Noël, ce qui explique sans doute que Posten/la Poste fournisse dès la mi-novembre une liste des dates limites auxquelles il faut envoyer ses cartes et colis à destination du monde entier afin qu’ils soient reçus à temps pour Noël.

Notez donc dans vos petits carnets d’envoyer en avance vos prochaines cartes de vœux à vos amis suédois !

  • Share/Save/Bookmark
Category: Articles en français, Blog, Suède / Sweden | Leave a comment

Brushing with the Swedish Judicial System

I’ve probably had more contact with the police than the average person might expect to have, considering that I’m a law abiding citizen (of two countries) and I’m not one for excessive drinking or anything that could get me into trouble. This is entirely due to the fact that the world is full of stupid people.

Yes, stupid people. In the age of technology where most people pay with a debit or credit card, in an age where an increasingly large number of people download movies and thus put the video store out of business, in an age of video surveillance cameras – what smart person would think to rob or commit theft in a video store? They wouldn’t, of course. Yet they do, surprisingly often despite the precautions we take against it. One fateful evening two men decided the law did not apply to them, and that there would be no repercussions. Working together one distracted me with questions about the movie I was playing on TV (Underworld) while the other one walked out of the store with over 60 movies. I chased after them, and had “suck my dick” shouted at me and a movie thrown at me for my trouble. I ran back inside to call the emergency number, only to be told that wasn’t appropriate and be hung up on.

Eventually I did get a hold of someone willing to do his job, not that the police that finally visited the store did anything other than take my statement – they refused to even watch the video. Luckily, deepthro… I mean… a friend to the store… managed to identify one of the perpetrators, the distracter. I had the utmost joy of looking at a stack of mug shots to identify the second, mr. “suck my cock”, which took me about two seconds. God bless the memory of a woman scorned.

Hot cocoa can make anyone feel better

I thought that would be all, but to my surprise, my sworn testimony was still needed at the trial against perpetrator #1 (I have no idea what’s going on with perpetrator #2). I feverishly tried to get all the information I could possibly scrounge about legal proceedings and what I would be required to do with help from the Swedish courts webpage. Luckily it was pretty straightforward, and I had my manager/role-model with me for support, she even sat down for a little fika (a swedish coffee break, only with the coffee replaced by sweet delicious creaming hot cocoa with whipped cream for me) to calm me down.

Tingsrätt (district court)

The experience was educational, if slightly negative. The proceedings started late, and no note was put on the door to warn us – and the woman in reception was of no help at all, as well as having the appearance of an alien who hadn’t gotten the hang of pretending to be human. We were waiting in the same area as his family eventually came to wait, all of whom I knew and had rented movies to/given movie advice to many many times. I, of course, didn’t realize that they were his family until AFTER I offered a cough drop to the woman coughing since I had other worries on my mind. The “bad guy” was brought up the stairs, handcuffed and escorted by two policemen past his family and myself and into a private room. The prosecutor explained what would happen (I didn’t tell him I’d already read the website, it never hurts to get more confirmation) to prepare me, and then I was to wait until I was called in.

the waiting hall, and someone’s forgotten coffee cup

I had to be sworn in by a very pleasant chairperson who said the oath and then I repeated after her: “I (your name) promise and affirm on my honour and faith that I will tell the whole truth and not omit, add or change anything.” (”Jag (ditt namn) lovar och försäkrar på heder och samvete, att jag skall säga hela sanningen och intet förtiga, tillägga eller förändra.”) Then I was asked to repeat the events of the evening, which I did. Shaking like a leaf the whole time, with my hands clenched together and trying to avoid looking at “the bad guy”. By the end of the story, my jaw was nearly vibrating my teeth together. I answered a few questions, although I have to say the defence attorney’s question wasn’t really a question and thus I had no way to answer it. “What direction was the other man standing”. Uhm, I don’t know… east? No, I didn’t answer that. I just told him that I was sorry but I didn’t understand the question, and he changed it to “did you come closer to the second man upon leaving the counter?”

After my testimony, I was free to stay, but I just booked it out of there as fast as I could, so I don’t even know what happened in the end. Maybe I’ll read about it in the paper, maybe I’ll get a letter. I also don’t know what will happen with the second perpetrator. I know the one I testified against was wanted on other charges as well, which is how he ended up in custody.

But all I could think about was if this was how horrible the entire experience felt for me, how awful is it for the family to watch the proceedings? How much worse is it for a rape victim? I truly hope I never need to do it again, but I’m glad I did do it. I’m glad I’ve done my duty and I’ve done what’s right, despite all my fears of reprisal. I was also compensated for the loss of salary due to being needed in court, which was a nice surprise.

And people? Don’t rob your fucking local video store.

Bunny demonstrates what you will look like if you mess with nikkitaa

postscript: Thanks to HL for supporting me, the designer of www.domstol.se and BaroqueW for giving Bunny a photoshoot.

postscript²: I love Bunny!

  • Share/Save/Bookmark
Category: Articles in English, Blog, Suède / Sweden | Comments (6)

A GPS on your Mac

I just bought a no-name USB GPS receiver in the Swedish store Teknikmagasinet and it’s up and running on my Mac (Leopard 10.5.1 or Ubuntu via Parallels). Story of an installation.

The device is just a small box, the size of a matchbox, that you can connect using the built-in PS2 cable or using the USB cable extension provided in the package (convenient to place the receiver outside or by the window). The package also contains a CD, note really useful (especially the test application) but it gives a very exhaustive list of the NMEA commands the receiver understands. The GPS chip is a Nemerix (not a Garmin, not a SiRF). For $40 to $60, you can find on Amazon similar USB GPS receivers with various chips and features (waterproof, number of channels, etc.).

UbuntuFirst of all, Ubuntu with Parallels. My install is the installation that can be found on the website of Parallels. Remember to connect the USB port to Parallels (Devices>USB>USB-Serial controller) before going any further. Next, go in System>Administration>Synaptics Package Manager under Ubuntu. You can do a search on the string “GPS” and install the packages you feel interested in. At least, you need to install the GPS daemon gpsd and a client: xgps or gpsdrive. Then, start gpsd with ‘gpsd -n -D 3 -p /dev/ttyUSB0‘. If you want to push the envelope any further, go and visit the gpsd web site, otherwise, I provide all the basic informations here. To check your GPS receiver is working, start xgps or gpsdrive. If you see a sort of constellation in xgps representing the various satellites of the GPS system, or if your position shows up properly in gpsdrive, you’re good. If you have a display in xgps but not coordinates on the left side of the screen, it means the signal is too weak. Get the receiver outside or closer to a window, or try to get a clear horizon. To do some debugging, stop gpsd and start it again with ‘gpsd -n -N -D 3 -p /dev/ttyUSB0} to check the messages exchanged between the receiver and the computer. If you see a message saying “satellite data no good”, it means there is no proper reception. See below to screenshots: first, a screen of xgps with a poor reception (”n/a” on the left of the screen) and a screen of gpsdrive with a proper signal (I removed the bottom of the screen that included my coordinates). I didn’t test but this whole setup should be compatible with Kismet.

xgps

gpsdrive

MacOSXNow, let’s have a look at MacOSX. The easiest is to start installing the driver for PL2303 (the USB controller for many GPS receivers) on Prolific’s website. Then, install gpsdX, the OSX version of gpsd. Then start the start the application called ‘gpsdX Config’ and choose ‘/dev/tty.usbserial’, the peripheral created by the driver downloaded on Prolific (obviously if you GPS receiver is bluetooth-enabled, just select one of the /dev/tty.Bluetooth devices from the list). Apply the new settings and you now have a gpsd server running under MacOSX! Next step, finding a client. You have two options: gps2geX that interfaces gpsd with Google Earth (even in its free version), or the MacOSX port of GpsDrive developed by VASS-Softwareentwicklung. The first one obviously needs to have Google Earth installed on your computer. To use gps2geX, start GE, then start gps2geX, next click on “Start gps2geX” and here you are: Google Earth is kept updated regularly with your position! On the other hand, GpsDrive requires the installation of X11 from your copy of the DVD of MacOSX Leopard (or Tiger). Note that Gpsdrive is a PPC binary (but runs on Intel computers via Rosetta). The rest is just like under Ubuntu. Last precision, the use of gpsX is compatible (tested) with KisMAC (Kismet and KisMAC are two tools for wireless networks).

  • Share/Save/Bookmark
Category: Articles in English, Tech >> Computer | Comments (2)

Un GPS sur votre Mac

Je viens récemment d’acquérir un récepteur GPS USB d’entrée de gamme (comprendre, no-name) chez les Suédois de Teknikmagasinet et il tourne sur mon Mac (Leopard 10.5.1 ou Ubuntu via Parallels). Récit d’une installation.

L’appareil se présente sous la forme d’une petite boîte (taille boîte d’allumettes) qui peut se connecter avec un cable PS2 ou USB via la rallonge fournie (pratique pour laisser le recepteur a la fenetre ou dehors dans le jardin). Il y a aussi un CD d’install, anecdotique au niveau des applications mais avec plusieurs guides qui renseignent sur les commandes NMEA que le récepteur reconnaît. Au passage, la puce GPS est une puce Nemerix (pas Garmin ni SiRF).

UbuntuTout d’abord, sous Ubuntu avec Parallels. Mon installation est celle qu’on trouve à télécharger sur le site de Parallels. Rappelez-vous de connecter le port USB à Parallels (Devices>USB>USB-Serial controller) avant de commencer. Ensuite, allez dans System>Administration>Synaptics Package Manager sous Ubuntu. Faites une recherche sur GPS et installez les packages qui vous intéressent (au moins gpsd pour le daemon GPS indispensable et probablement un client: xgps ou gpsdrive sont une bonne idée). Lancez ensuite gpsd avec ‘gpsd -n -D 3 -p /dev/ttyUSB0‘. Si vous voulez pousser plus loin, regardez sur le site de gpsd, pour une utilisation normale, vous avez toutes les explications ici. Pour vérifier que votre GPS marche, lancez xgps ou gpsdrive. Si vous voyez une espece de constellation dans xgps représentant les satellites du système GPS ou bien si votre position s’affiche sur la carte de gpsdrive, c’est gagné. Si vous avez un affichage dans xgps mais pas de coordonnées (partie gauche de l’écran), cela signifie que le signal est trop faible. Rapprochez-vous d’une fenêtre ou tâchez d’obtenir une ligne d’horizon plus dégagée. Si vraiment vous n’obtenez rien, lancez gpsd avec ‘gpsd -n -N -D 3 -p /dev/ttyUSB0‘ pour avoir l’affichage des messages reçus et échangés par le récepteur et l’ordinateur, ça peut aider (notamment “satellite data no good” qui signifie que la réception est mauvaise). Ci-dessous, un aperçu de xgps avec une mauvaise réception (”n/a” à gauche de l’écran) et un aperçu de gpsdrive en fonctionnement (moins le bas de l’écran qui indique les coordonnées précises du récepteur). Dernière précision, a priori ce montage est compatible avec Kismet mais je ne l’ai pas testé.

xgps
gpsdrive

MacOSXPour MacOSX maintenant. Le plus simple est d’installer le driver pour PL2303 (controleur USB de nombreux récepteurs GPS) depuis le site de Prolific. Ensuite, installez gpsdX, version OSX de gpsd. Lancez le programme appelé ‘gpsdX Config’ et choisissez ‘/dev/tty.usbserial‘, périphérique créé par le driver de Prolific (si votre récepteur USB est bluetooth, pas besoin d’installer le driver de Prolific, sélectionnez juste un des /dev/tty.Bluetooth). Appliquez ce changement et vous avez un serveur gpsd qui tourne sur votre Mac ! Maintenant, pour l’utiliser, deux options : soit gps2geX qui interface gpsd avec Google Earth (même en version gratuite), ou le port pour MacOSX de GpsDrive réalisé par VASS-Softwareentwicklung. Le premier nécessite l’installation de Google Earth au préalable. Ensuite il ne reste plus qu’à installer gps2geX, lancer GE puis gps2geX, cliquer sur “Start gps2geX” et vous voilà avec votre position actuelle (et mise-à-jour régulièrement) dans Google Earth ! L’installation de GpsDrive nécessite l’installation de X11 depuis votre DVD de MacOSX Leopard (ou pas Leopard d’ailleurs). À noter que GpsDrive tourne sur PPC (et donc sur Intel via Rosetta). Le reste se déroule comme sous Ubuntu. Dernière précision, l’utilisation de gpsX est compatible (testé) avec KisMAC (Kismet et KisMAC sont deux outils de visualisation de réseaux WiFi).

P.S. : Pour aller plus loin, OpenStreetMap qui fournira à terme les cartes de gpsdrive et qui réunit une communauté d’utilisateurs façon Wikipedia autour de l’édition d’une carte du monde.

  • Share/Save/Bookmark
Category: Articles en français, Tech >> Computer | Comments (3)

Status

  • BaroqueW sorting the first pictures
    4 hours ago
  • BaroqueW holy cow
    7 hours ago
  • BaroqueW ecoute desproges dans les fjords
    2 days ago
  • BaroqueW : it is in fact NOT funny to point people in the wrong direction when they're lost
    2 days ago

Popular posts

My Social Networks

DandyID 43 Things Clipmarks coComment Dailymotion Delicious deviantART Digg Diigo Facebook Flickr Get Satisfaction Guitar Hero HelloTxt Hulu ICQ Imdb Imeem Kiva last.fm Linkedin Netvibes orkut PeoplePond Picasa Plaxo PostCrossing RockBand Scribd Stumbleupon Tagged TripAdvisor Twitpic Twitter Xbox LIVE YouTube

Expand the experience

Blogroll

Internet Map

Meta