Debugging Non-Interactive Bash Scripts – Pipe Everything to Syslog

Here’s a cool hack I’ve recently come across when I wanted to modify a Bash script that runs in the background without a shell:

As usual when I touch Bash with its strange syntax, my modifications didn’t work at first, and only sending debug messages with logger() to syslog wasn’t doing me much good in this case. So I was thinking that it would nice if I could hook into stdout and stderr of the script to see Bash’s error message when the script falls over? So I googled a bit and found a solution that pipes all output to syslog. All that is required is adding the following line at the beginning of the script:

exec 1> >(logger -s -t $(basename $0)) 2>&1

Looks short and innocent and very Bash syntax like. And it works like a charm, all bash script output goes to the syslog. And if you would like to understand just what this line does, have a look here.

TCP Tracing – Part 1 – How TCP Reacts to Changing Network Conditions

After the interesting experience of chasing packet loss issues of my fiber router in Paris and learning about different TCP congestion control algorithms in the process, I wondered how TCP handles changing network conditions in wireless networks. After all, especially when on the move, air interface conditions and general load of the cell changes all the time. So how does that look like on the TCP/IP level? To find out, I made a number of throughput tests and generated graphs from the data dumps that show different scenarios. As a baseline, I first made an iperf3 downlink throughput test over a Wi-Fi link and a fixed line VDSL backhaul. Here’s how the throughput looks like:

The graph is pretty much flat at around 100 Mbps with a few minor wiggles, which is what I expected to see from a fixed line and completely uncongested link.

Now let’s have a look how the same download looks like over an LTE connection, again with Wi-Fi as the last hop in a stationary, i.e. non-moving setup:

Continue reading TCP Tracing – Part 1 – How TCP Reacts to Changing Network Conditions

On-Train Internet Experience between Cologne and Hamburg

I’ve been traveling quite a bit by train in Germany lately and I take from the press that German network operators have made some effort to improve the on-train network experience. And indeed, the experience on a recent trip from Cologne to Hamburg was a lot better compared to what I remember from the past.

Continue reading On-Train Internet Experience between Cologne and Hamburg

When the External Battery Slows Down The Keyboard

A few weeks ago, I wrote about the great autonomy time that 130 Wh USB Power Delivery Battery gave me for my notebook while traveling. The only disadvantage of the solution is that the battery weighs 600 grams. So I thought I’d get another, somewhat smaller and much lighter USB PD battery with a capacity of 37 Wh. This would just be enough to feel comfortable in many situations. And while the external battery works just fine with a number of USB PD capable notebooks I tried it with, it has an interesting quirk in combination with my main productivity notebook: It slows down the keyboard and makes it miss characters!

Continue reading When the External Battery Slows Down The Keyboard

Comments Disabled

Here’s a quick note before the next post to let you know that I’ve disabled comments for the moment. Lately, I’m getting 20+ spam comments every day on the latest blog posts and I’m a bit tired to clean up after them. Let’s see, perhaps the current wave dies down again, otherwise I have to take some counter measures. I’m very sorry if you thought about commenting, the Internet is not becoming any nicer these days, and I refuse to include any third party plugins that sends data to third party sites as part of being on a page or part of the commenting process.

Fiber in Paris – Part 4 – Packet Loss and BBR to the Rescue

In part 3 of this series, I’ve found the reason of why that FTTH line to Paris is so slow to download data from most destinations: Excessive packet loss. While I still haven’t found the reasons for the packet loss, I could at least answer why some (but very few) servers do not have a problem with it. And in the process, I figured out how to increase the throughput from one of my servers on the Internet to a client behind that FTTH line from 40 Mbps to 800 Mbps!

Continue reading Fiber in Paris – Part 4 – Packet Loss and BBR to the Rescue

Fiber in Paris – Part 3 – Packet Loss

After my initial delight of getting FTTH connectivity restored in Paris, I quickly realized that something is not quite in order. While getting well over 800 Mbps to some servers in the downlink, I got a meager 20 – 100 Mbps to others, even though they can deliver data much more quickly when I probe throughput from other places. At first, I thought that ‘Free’ must have a severely limited interconnect to those servers. But UDP iperf measurements to some of these servers showed that this was not the case. So I started to investigate and found the culprit: Very strange packet loss.

Continue reading Fiber in Paris – Part 3 – Packet Loss

Fiber in Paris – Part 2 – 2022 Equipment

Back in 2014 when we first got our FTTH connection in Paris, I posted a number of equipment pictures. The equipment has worked well over the years and probably would have continued to do if we hadn’t been forced to change providers from SFR to Free to restore service. This meant that we also got some new equipment, and here are some images of our current setup.

Continue reading Fiber in Paris – Part 2 – 2022 Equipment

Fiber in Paris – Part 1 – A Long Odyssey to New Light

Back in 2014, and yes, that’s 8 years ago, I got a Fiber to the Home (FTTH) line installed in Paris. Apart from very few outages that lasted a few minutes to a few hours, the link ran pretty much flawlessly and I had a lot of fun with it. That was, until mid-December 2021, when the fiber suddenly went dark. And staid dark until May 2022! So here’s what happened and why it took so long to restore service.

Continue reading Fiber in Paris – Part 1 – A Long Odyssey to New Light

Nested Virtualization

When I recently read this article about vulnerabilities to break out of virtual machines, I became aware again of the concept to run virtual machines inside virtual machines. This is also called nested virtualization and it seems most modern Intel and AMD CPUs support this feature. But does it really work ‘just like that and out of the box’ and if so, what’s the performance penalty?

Continue reading Nested Virtualization