Emulate a slow block device with dm-delay

When debugging a problem caused by high I/O latency on Linux, it may be interesting to emulate a slow or congested block device. The device mapper driver which manages logical volumes on Linux has a solution for that: the dm-delay target.

In this article, we will use the dm-delay ...

more ...

Send F10 to GRUB with Minicom

I recently had to modify the kernel command line of a machine that I accessed with a serial console. GRUB displayed the following message explaining that I had to “press Ctrl-x or F10 to boot”.

Minimum Emacs-like screen editing is supported. TAB lists
completions. Press Ctrl-x or F10 to boot ...
more ...

Send desktop notifications with cron

At work, I tend to check my mailbox too often. That’s unnecessary. As an experiment, I have decided to check it once every hour. Since I don’t want to spend “brain cycles” remembering when I should check my mailbox, I have added a cron task to display a ...

more ...

Notifications with file descriptors

Linux is known for its “everything is a file” mantra inherited from Unix. This means that a wide range of system resources are represented by files. Consequently, in a program, these resources are managed as file descriptors with a common set of primitives such as read(), write() or close().

Along ...

more ...


Compare binary files

Diff is often used to compare two files line by line, but for binary files you must rely on other tools. My favourite tool for this task is dhex: I often use it to analyze data corruptions.

Determine if two binary files are different

You can compute the checksums of ...

more ...

Exploit segfault hints in dmesg

You are writing a C program. Time has come to run it. You are pretty confident that it will run at once.

$ ./foo
Segmentation fault

The machine hardly reminds you that you were over-confident. But before rushing to re-compile your program with debugging symbols or adding printf() calls here and ...

more ...

Install an iSNS server on OpenIndiana

Updated March 2015: OpenIndiana’s last release (151a8) was made on July 2013. The OpenIndiana project does not look much alive. A replacement for OpenIndiana is XStreamOS.

In order to test target-isns, an iSNS client that I am developing, I looked for an iSNS server running on Linux. Unfortunately, the ...

more ...

Upgrade the CPU microcode on Debian

When looking at your system’s logs, maybe you have noticed the following advice in Linux’s dmesg output:

perf_event_intel: PEBS disabled due to CPU errata, please upgrade microcode

If you are running Debian, you just have to install two packages to fix the problem: intel-microcode and iucode-tool. With these ...

more ...

Install the Tizen SDK on Debian

Updated July 2013: the Tizen project has released the Tizen SDK 2.2. When installing the SDK on a distribution other than Ubuntu, the installer does not complain that the distribution is unsupported. As a consequence, the changes described here are no longer necessary.

Updated May 2013: the Tizen project ...

more ...