FOSDEM 2016 is over

I went to FOSDEM 2016 this year with 8 other colleagues of mine and had a really really good time. A lot of good speeches and stuff to talk about and I feel very motivated for some new projects. Some of the stuff going on right now is incredibly exciting, especially with regards to containerization etc which is something I have a lot of personal and work related interest in. I will be looking into more details in that for the future…

What I did miss was a more “general networking” track with low level stuff like iptables, netfilter, iproute, wireshark, snort, etc. I’m just not sure if this is the right conference for that though. Gathering my thoughts and working out some of the project details in the upcoming week if I get time.

Using AWS EC2 instances for large builds

I experimented a few years ago with using EC2 spot instances (virtual server on the internet, but using unused server capacity). It was fairly successful, being able to run large calculations that should have taken weeks in a matter of days.

Since I started at my current job I’ve been running into building increasingly complex yocto images which keeps growing in size, at this point most images I build can take up to 6-7 hours to build on my laptop. This is an i7-4558U 2.8GHz cpu and 8 gigs of RAM so it’s not bad really, just not enough for these types of builds.

Again I started experimenting and I am really happy and impressed. So far all experiments are for open source projects etc, so nothing that has any non-disclosure agreements or corporate etc etc, I’d like to but this isn’t up to me really. I’ve setup an AMI on EC2 which I can instantiate and have up and running in 2-3 minutes, and then mount a 100 gig EBS volume where I store the sources and build data.

The same build that generally takes up to 6 hours on my laptop takes approximately 30-40 minutes on an EC2 c4.4xlarge machine (16 cores and 32 gigs ram).

My key findings so far is:

  1. Keep an AMI with all the build tools necessary/or script the setup.
  2. Keep an EBS volume with the long term stored data, gits etc for building and mount somewhere suitable in the AMI.
  3. Keep a micro instance (these are free/very cheap) around for mounting the EBS volume when you just want to check stuff out, mess around etc but not make builds.

DBus remote connection

November 5, 2014 by · Leave a Comment
Filed under: Communications, Development, General, Linux 

In a project I’m working on at the moment we wanted to remotely monitor a DBus session bus. The system in question has several buses available using different users and systemd. d-feet can connect and monitor remotely via TCP.  The following code will allow you to connect to a remote DBus on a target development board for example.

First copy the original session.conf to separate configuration files for each user.

cp /etc/dbus-1/session.conf /etc/dbus-1/session.conf.<username>
cp /etc/dbus-1/session.conf /etc/dbus-1/session.conf.<username2>

Then for each of the newly created configuration file, add the following configuration but with different port numbers and correct username director in /run/user. The ip address should be the IP of the connecting host, not the server. Edit session.conf.<username> and add:

<listen>tcp:host=<ip>,bind=*,port=<port>,family=ipv4</listen>
<listen>unix:path=/run/user/<username>/dbus/user_bus_socket</listen>
<listen>unix:tmpdir=/tmp</listen>

<auth>ANONYMOUS</auth>
<allow_anonymous/>

The systemd script is rewritten to use a specific conf file for the specific user trying to start the DBus.

Edit  /lib/systemd/system/dbus-session@.service and rewrite the ExecStart line as follows.

ExecStart=/usr/bin/dbus-daemon --config-file /etc/dbus-1/session.conf.%i --nofork

This allows you to connect using d-feet or other dbus applications (potentially, you should be able to connect for example other services over the network to the new DBus….).

Choose “connect to other bus” and use as bus address:

tcp:host=<targetIp>,port=<port>

Done. Hopefully.

Raspberry Pi + 2x Arduino Nano V3.0

March 19, 2014 by · Leave a Comment
Filed under: Development, General, Hardware, Linux, Robots 

Quick update, during my evenings I’ve been working with one of the Raspberry Pi’s I won on a local contest a few months ago, and it’s generally derailed into some kind of “let’s put as much stuff on it as possible”, meaning that I currently got my Raspberry Pi hooked up with:

  • Slice of Pi
  • Adafruit PWM driver
  • Raspicam on a simple pitch/yaw servo gimbal that me and my 1,5 year old put together in 10 minutes. Controlled via PWM.
  • MPU9150 sparkfun breakout board
  • 2 Arduino Nano V3.0

The two Arduino Nanos have split functionality, where one will provide me with data that needs to be gathered frequently, and the other is used for slow processes such as reading out 1-wire temp sensors etc.

The first nano will have the following functions hooked up to it:

  • 3x HC-SR04 ultrasound distance sensors
  • Voltage measurement 0-20V circuit
  • Control of 2 relays
  • 3x line tracking sensors
  • Reed switch
  • 2x motor controls via L298P chip

The second nano has the following hooked up to it:

  • MPX2200GP pressure sensor (will use something else soon’ish)
  • 2x 1-wire DS18B20 temperature sensors.
  • Others?

The general idea was to move timing critical stuff off the raspberry to the Nano and let the first one deal with quick sensor readouts, while the second Nano is dropped off with relatively slow sensors (DS18B20 takes very long time to read out for example). The two nanos will talk to the Raspberry via SPI I think, or possibly serial ports, but this is less likely as it would either require me to use one USB serial driver and the raspberry UART or get a 2 port USB hub of some kind and talk via USB UART’s.

arduino-hookup

I’ve meanwhile also played around with Eagle CAD for the first time in my life, making some electrical drawings of the hookups. I’m considering making a PCB layout of everything when I get there, not sure if there is any interest in this out there except for “the lols”. The image is still very raw and missing a lot of stuff that I know needs to be added at some point.

During christmas I spent some time making opencv haar cascade training on clementine detection and generally fooling around with it. I think I’m leaning towards making a robot (chassi on the way) which will travel around in the room looking for objects… I guess some of the sensors are a little overboard for this, but it’s all fun and games while it’s not work… 😉

Mirabox dist-upgrade causes system to deadlock/hang on bootup

May 22, 2013 by · 2 Comments
Filed under: Development, General, Linux 

I think there’s something bad going on between GlobalScales patches in the rootfs images they have for download for the mirabox when doing an apt-get dist-upgrade to the latest version of debian. This causes a complete lockup during boot of the device (network seems to work, but ssh and services are not started in time, and the console is completely locked up). There is pretty much nothing that works in this state, and I’ve found no way to skip ahead and get a login prompt.

I tried booting to Single user mode, but this is not possible because GlobalScale make pretty much everything start in rcS.d. I’m stuck in the same position as in a normal boot as described above, nothing possible to do.

Finally I resorted to using init=/bin/bash and managed to locate the issue down to the S07mountall.sh and/or the S08mountall-bootclean.sh. It seems S07mountall.sh will mount everything from fstab, which also seems to mount “something” on /dev, causing all dev entries to go missing, and hence several different things will just not boot. rm -rf’ing the S07mountall.sh and S08mountall-bootclean.sh script seems to have fixed the issue for me. However,  I’ve severely remade the whole rc.d structure since I think it’s a really bad idea to start so much services in rcS.d as it will block single user mode and kind of against the design philosophy of the init system. This rework may have made the situation better or worse, I’m not completely sure.

If anyone is willing to go more in depth I’d be happy to go into the details with them on what I found.

As for the Mirabox, I think it’s a good device so far, but this is my second GlobalScale device (had a Guruplug Server Plus for almost 2 years as my home server). There are a few things that nags at me so far though:

The file system is having the same issues as the Guruplug Server Plus, strange scripts running at strange times in the bootup procedure (for example, all the stuff that’s gone into the rcS.d directory), the rc.local script calling the /root/init_setup.sh script which in turn is loading a bunch of binary blob drivers and so on and so forth. The device as it is looks really well engineered, but the software is really butchered because of these strange setups. Putting in some good time to create a good integration with Debian (since that’s what they are using anyways) would help insanely much. Also, documenting the reflashing processes and so forth could also be very much helpful.

Mat Honan hack “cloud isn’t so bad” comment

August 10, 2012 by · Leave a Comment
Filed under: Communications, General, Uncategorized 

Just read this by Ron Miller  and while I don’t mind the cloud (I use several cloud services extensively), I do think he’s completely missing the point. Yes, the cloud is as vulnerable as any other machine etc that I or someone else has set up. However, the daisychaining and the ability of the hacker to wipe out the entire storage media on the phone, tablet and the laptop wouldn’t have been an issue with old school IT. The main point of the original article by Mat Honan was that he felt stupid for not doing proper backups, and having setup remote wipe. Having a backup on dropbox, ubuntu one or some other place in the cloud just isn’t safe enough, imho. The way dropbox etc works, you can always wipe out the files in question permanently. A lot of cloud functions adds a lot of liability that we didn’t have before. This hack and the loss of his personal data would never have happened in 2000 as his phone and laptop wouldn’t had  a remote wipe function so easily accessible for anyone, and the tablet was barely “invented” yet.

 

 

FMEA of Door and conclusions

October 13, 2011 by · Leave a Comment
Filed under: Development, General, Management 
If Cavemen had done an FMEA of the door when it was invented, this would possibly be the outcome.
Item Potential Failure mode Potential Effects of failure Severity Rating Potential Causes Occurence rating
Open door Person behind door gets door in face  – Broken neck
– Death
– Bleeding nose
5-6  – Two persons trying to pass the same door
– Door placed to open into corridor
– -“- onto esplanade
– Badly placed painting on back of door
4
Open door Hidden vicious monster on other side  – Death
– Loss of limb
– Loss of head
10  – Door opens into wilderness
– Glass not yet invented, so other side of door can not be inspected
4
Close door Limbs get stuck between door and doorway  – Loss of limb
– Broken fingers/toes
– broken nails
– Bloodshed
7  – Person is angry and slams door shut
– Annoying salesman sticks foot into door
– Forgot person behind you
5
Run through door Other side opens into chasm
Other side opens up on multistory building
Other side opens up into ocean
 – Falling off high cliff
– Death
– Drowning
– Bludgeoning
– Cuts and bruises
10  – Earth activity causes earthquake and resulting chasm on other side of door
– Balcony fell down
– Global warming caused ocean to rise
– Person was in a rush, running through the door, falling off.
2

Conclusion

If the cavemen would have been engineers, they would never have invented the door, or at least not used it.

Finding the Zone.

February 10, 2011 by · 1 Comment
Filed under: Development, General, Personal 

Several years ago at one of my first jobs, right smack at the end of the dot-com boom over here, we had a dartboard. What good is a dartboard you ask? I don’t know, we also had a pinball machine, but I never quite liked it as much as the dartboard. I’d take short breaks from answering phone calls and e-mail or problematic pieces of text to throw a few darts. Personally, it gave me one thing however, I learnt to shut out everything else and find my Zone, you know the one where you’re at your most efficient, solving problems, kicking off e-mail and answering calls in a furious flurry.

For me, I focus on the bulls-eye of the dartboard, relax all muscles in my head, letting my scalp feel like a smashed egg running down from the skull. It feels like my head gets lighter and all pressure on my brain dissipates. Nothing else exists but bulls-eye. Ears are shut off, and all focus is on bulls-eye, nothing else distracts my eyes. At this point I’m there, and ready to hit bulls-eye. It’s simple, it’s fast, and it works. Under extreme pressure and stress, it sometimes takes closing my eyes to get the process started, but almost always I reach the “Zone” within a minute or so.

After the few darts, I’d get my headphones on and listen to music, work my hardest to shut everything else out and maintain the Zone for as long as possible. Reaching it takes concentration and loosing the concentration is always easily lost. Getting back on your train of thought on a complex problem after loosing it is hard work, often taking 15-30 minutes. I absolutely hate having that elusive thread of clarity vanish into thin air due to someone breaking Zone or loosing the almost ready to implement solution to a particularly bothersome problem.

My wife knitted me a pair of special fingerless gloves, ending just before the first knuckle on my ringfinger. I use them while coding or otherwise writing at the computer, to keep my hands warm, just to be able to maintain the Zone for that bit longer, not having to bother about getting cold hands. Cozy, to say the least, but people look funny at me for using them so it’s not often I use them at work. Also, I like to wall myself in as I’m easily distracted by movements and foreign objects. Open office space is complete devastation on these trips into the Zone, where people talk, walk around, gesticulate, strange things happening on other peoples screens, and so forth. I barely ever manage to stay in the Zone for more than 45 minutes or so. On that note, open office planning must have been among the most stupid things ever invented, short term savings at huge cost in productivity.

So, that is how I reach my Zone. Do you have a Zone, and how do you reach it? How do you maintain it from collapsing?

Comments requiring login

March 11, 2010 by · Leave a Comment
Filed under: Frozentux.net, General, Personal 

Due to the amount of spam I receive in the comments fields of this site, I decided to turn on the requirement for all users to be logged in to post any comments. So far, there has been 770 spams posted and only 38 real comments. It’s easy to clean the spams out for sure (akismet, normal users don’t even have to see them), but just seeing the names of some of the links spammed are making me sick.

As a sidenote, with todays climate, maybe I shouldn’t say this, but if I ever ran into a person with the “quirkiness” required to watch (or for that matter produce) what is spammed these days, I’d probably go completely ballistic and on a killing spree. I definitely don’t condone the type of filtering done and/or tested on national levels, such as in Australia and Germany, but I can definitely understand why less hardened people turn to those extremes. My main reason for disliking that filtering isn’t really the content it is supposed to target, but rather where it is heading. The step from no filtering to filtering extreme sex is much larger than  the step from extreme sex to “rough” sex, and who will draw the line in the end?

What is the difference between extreme and normal? Most humans like to see things in black and white, and we forget about the greyscales. This is trait easily manipulated by people with an agenda (christian and muslim extremists, politicians, law enforcements and so forth) by pretty much saying “Look here, look at that absolute abomination of a thing going on, we can not allow this to happen to XXX. Let’s do something, let’s ban everything remotely connected to it.” In all honesty, that shit scares the hell out of me. Not so much the rethoric used, but the fact that so many falls for it. This whole 0-tolerance, black and white and fight or flight mentallity.

Anyways, just some random thoughts on the matter.

Website downtime

November 30, 2009 by · Leave a Comment
Filed under: Frozentux.net, General, Personal 

As some people may have noticed, the servers was down for almost a week. This was due to several hardware problems at my host, which where very unfortunate. When I put up the new webpage a few weeks ago, we also moved the daemons/hosting to a new one running on a new machine. This machine has been misbehaving for several weeks, and we switched over to another identical machine to rule out hardware error. In the end, we managed to get it solved. Last week both servers where killed due to power fluctuations (I believe if I interpreted it correctly). As a replacement, two new machines where ordered in, and they where both DOA (Dead on arrival). On top of this, I was told they received a faulty 20x500gb harddrive batch a few months back, which has had a 50% failure rate so far.

All this being said, I want to also extend my gratitude to these people for hosting this site, and for the wonderful work they do in running it. In 7 years of hosting this domain/host, I have rarely had a single breakdown, and this is the first time any major problem has existed with the hosting. In short, the wonderful fellows in the Netherlands that keeps hosting this site has had a really rough week, and I really wish them the best of luck getting everything back in order. Until then, please be patient with the site if it’s down or something is not working correctly, or even better, throw a mail in my general direction.

Next Page »