Friday, September 30, 2016

D-Bus user session

I noticed that I cannot open the user dbus in Ubuntu while I could do that in Arch Linux. It seems there is no user dbus by default in Ubuntu (or Ubuntu server at least). To have one:

$ sudo apt install dbus-user-session

Then `sudo systemctl start --user dbus` or reboot.

Monday, September 12, 2016

Mysterious crashes in DPDK application when using the pcap driver.

I was experiencing mysterious crashes in my DPDK application when using pcap virtual devices (using the --vdev option). What's more, when there was more crashes, I didn't seem to be getting all the packets I should have. So I investigated, and found out I was attempting to capture packets from multiple threads. That seems to be a no no with the pcap driver, considering it explicitly does not support multiple queues. I limited the number of cores available to my application using the -c option, and everything was solved.

Fixing "no driver found for eth_pcap0"

I was getting a "no driver found for eth_pcap0" error message whenever I wanted to use an "eth_pcap" virtual device with my DPDK application. But the DPDK sample app "test-pmd" worked just fine with those. So I took a look at its Makefile and found out adding this line to my Makefile fixes the issue:

DEPDIRS-y += lib drivers


Monday, May 30, 2016

ISO seems to be empty in Linux

So I had this ISO that I knew wasn't corrupted because I've seen it mounted and used on a Windows machine. In Linux though, mount gave me a "wrong fs type" error and both Archive Mounter and Archive Manager said the ISO is empty.

A quick search brought me to this Ubuntu Forums thread that gave me the answer. The ISO was in the UDF format. This is how I managed to mount it: sudo mount -t udf -o loop ~/path/to.iso mountdir

Friday, May 27, 2016

Enabling temperature sensors in Ubuntu

After installing lm-sesnors, you can see the current value of system sensors by running "sensors". If you suspect your system has more sensors than "sensors" is showing you, run "sensors-detect" and have it scan for more sensors. Then when it asks you if you want appropriate modules added to your /etc/modules file, say yes. Restart your computer and check "sensors" again.

Tuesday, April 19, 2016

Emacs configure script not finding gnutls even though you have it.

You probably don't have pkg-config installed. At least that was the case for me in my new Arch install. I just did a `sudo pacman -S pkg-config`, then configured emacs again.

Monday, April 18, 2016

modprobe: FATAL: Module uio not found.

What the hell is going on? Where is this u-i-o module DPDK needs? It's simple. Your probably using a cloud image; a vagrant VM or an EC2 instance most probably. You don't have everything you need pre-installed. Simply run "sudo apt-get install linux-generic linux-headers-generic" and you'll be fine. Go wild!

Saturday, March 12, 2016

Fixing problematic keys in st (suckless terminal)

Some keys were not working in Suckless Terminal (st). In particular Backspace and END keys were not working. Performing the following two steps fixes the problem (courtesy of the st page in the ArchWiki):


  1. Put this line in ~/.inputrc or /etc/inputrc:
    set enable-keypad on
  2. Run this in your terminal (you can put it in ~/.bashrc):
    stty erase '^H'

Monday, March 7, 2016

Container fstab not working in LXC

It seems that from some version of LXC, the deafults have changed such that container fstab simply has stopped working for me. This is how I fixed the problem: add the following line to your container config file:
lxc.mount = /var/lib/lxc/container-name/fstab
Fix the container name in that, and you're ready to go.

Sunday, February 14, 2016

How to enable graph style meters in htop 2.0?

The graph style meters added in htop 2.0 are really cool. You can see a sample in the htop homepage (at the moment anyway). In order to have one of those, go to setup (R2), then meters. Choose one of the meters (or add a new one) select it and hit space to change its style until it's on "graph".