Tracing open() syscalls during boot with journald

20 November 2022 systemd, eBPF, Fedora, Linux

For debugging purposes, I needed to figure out which processes open and change particular set of config files early during boot process. I could have used inotify and setup a watch for these files, but since I was also interested to learn what other files the unknown processes open, I figured that this is an ideal opportunity for checking out eBPF tracing ecosystem. And it turned out that it’s not just a nice example of how to (not) use bcc tools, but in this post we will also learn a bit about systemd journal.

Physical units in programming languages

3 April 2022 F#, Python, Ada, physics

Long time ago I read an article about Ada programming language, which included a demonstration showing how to use Ada’s strong type system for checking physical units of variables in a similar way how we rely on a compiler to check common data types. However the support of dimensional analysis and physical units in programming languages improved significantly in the meantime, and now one can find good support for it not just in “serious” languages like Ada. In this post we will see how to work with units on two simple examples, one for negative and the other for a positive use case, (re)implemented in Ada, F# and Python.

Minimal xmonad config

5 April 2021 xmonad, Haskell, Fedora

Some time ago, a colleague asked me about xmonad configuration of special key handlers when he noticed I’m xmonad user as well. He was interested in as simple as possible xmonad config file which defines actions for for volume and brightness control keys found on all recent laptops.

Getting started with Hakyll on Fedora

28 March 2021 Fedora, Haskell

Upstream installation tutorial of Hakyll static site generator shows how to use cabal or stack to get hakyll installed and build example site with it. And while the tutorial also mentions an option to use distribution packages on Debian or Fedora, the rest of the tutorial doesn’t explore this option further. In this post I provide a quick overview of installation and usage when Hakyll is installed from rpm packages on Fedora 33.

Birth time of a file on GNU Linux distributions

17 February 2019 software-archeology, BSD, GNU, coreutils, Linux, Unix

Have you ever wondered why it is that on GNU/Linux distributions stat(1) command from GNU Coreutils reports 3 classic unix time stamps access, modify and change and on top of that, there is also something called birth, but without any value? Why is the empty birth field even there? I became interested in this less known timestamp few months ago while I was debugging a rare problem, trying to get as much additional evidence as possible. And even though it didn’t help me in the end, I gradually learned a bit about it’s history and it’s future. Hence this post lies somewhere between software archeology and Linux Weekly News, and here you will learn where the timestamp comes from, how to work with it in GNU/Linux distributions and what it’s future looks like.

GNU tar, xkcd and BSD

6 March 2018 tar, GNU, BSD, xkcd

Do you remember that xkcd strip where an atomic bomb requires a valid tar command to disarm itself? Either way in this post you will learn about GNU tar features you are already familiar with, but also few details you maybe don’t have any idea about.


22 March 2014 git, bash

While I was going through a 3rd party git repository the other day, it occurred to me that it would be nice to have shell command git-cd, which would be like cd, but working with file paths relative to current git repository. And it turned out that this can be relatively easy to implement in bash.