Setting up a UTF-8 environment in linux

Based on this post. Check if the locales package is installed (dpkg -l locales). Then run: dpkg-reconfigure locales and choose the desired locales (en_US.UTF-8, for me). Then, to be sure, export the variables (~/.bashrc) export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8 export LANGUAGE=en_US.UTF-8 You should start tmux or screen with the parameters, to be sure: $ tmux -u […]

Visualizing thread context switch and schedule timeline in Linux

Recently I needed to see when my threads were executing and in which processor, and it took me a couple of days to get this done. Here is the best solution I’ve found. First of all, we need the kernel to be compiled with some debug features enabled http://www.mjmwired.net/kernel/Documentation/trace/ftrace.txt https://www.kernel.org/doc/Documentation/trace/ftrace.txt We’ll need to mount the […]