A few epoll jots

Just a few things I wrote down while getting the hang on Linux’ epoll working with a named pipe. There’s also a little test program at Github. Be sure to read this and this. An event list for a file descriptor can be added only once with epoll_ctl(…, EPOLL_CTL_ADD, …). Calling epoll_ctl for adding an [...]

Jots on named pipes (FIFOs in Linuxish)

Major disclaimer These are pretty random jots that I made while evaluating named pipes as a solution for project. I eventually went for a driver in the kernel for various reasons, so I never got to verify that anything written below is actually correct. I’ve also written a small post on epoll with named pipes [...]

usbpiper: A single-threaded /dev/cuse and libusb-based endpoint to device file translator

Introduction Based upon CUSE, libusb and the kernel’s epoll capability, this is a single-threaded utility which generates one /dev/usbpiper_* device file for each bulk / interrupt endpoint on a USB device. For example, /dev/usbpiper_bulk_in_01 and /dev/usbpiper_bulk_out_03. It’s an unfinished project, that was stopped before a lot of obvious tasks in the TODO list were done. [...]

FUSE / CUSE kernel driver dissection notes

What this post is about Before anything: If you’re planning on using FUSE / CUSE for an application, be sure to read this first. It also explains why I bothered looking at the kernel code instead of using libfuse. So these are some quite random notes I took while trying to figure out how to [...]

FUSE / CUSE signal handling: The very gory details

First: If you’re planning on using FUSE / CUSE for an application, be sure to read this first. It also explains why I didn’t just take what libfuse offered. Overview This is a detour from another post of mine, which dissects the FUSE / CUSE kernel driver. I wrote this separate post on signal handling [...]

Linux CUSE (and FUSE): Why I ditched two months of work with it

Introduction If you’re planning to use CUSE (or FUSE) for an application you care about, this post is for you. That includes future self. I’m summarizing my not-so-pleasant journey with this framework here, with focus on how I gradually realized that I should start from the scratch with an old-school kernel module instead. Most important, [...]

Octave: Empty plots (after “figure”)

Running Octave 4.2.2 on Linux Mint 19, I got plots with nothing in them occasionally. Solution: Change the graphics toolkit to GNU Plot. Simply put, add ~/.octaverc reading graphics_toolkit(“gnuplot”) and rerun Octave. By the way, for zooming in, right-click the mouse on the first point, and left-click on the second.

systemd: Reacting to USB NIC hotplugging (post-up scripting)

The problem Using Linux Mint 19, I have a network device that needs DHCP address allocation connected to a USB network dongle. When I plug it in, the device appears, but the DHCP daemon ignored eth2 (the assigned network device name) and didn’t respond to its DHCP discovery packets. But restarting the DHCP server well [...]

A VoIP phone at home: The tech details on leaving your phone company

Introduction This is some information and hard-learned wisdom I collected while setting up an Israeli phone number for use with a VoIP phone, so I can accept calls with a regular Israeli phone number and also make outbound calls. Important to note is that I did this without the local ISPs that provide this service. [...]

MySQL, OOM killer, overcommitting and other memory related issues

It started with an error message This post is a bit of a coredump of myself attempting to resolve a sudden web server failure. And even more important, understand why it happened (check on that) and try avoiding it from happening in the future (not as lucky there). I’ve noticed that there are many threads [...]