Prefetch Technologies // Keeping your cache lines cozy

Tracking Linux UIDs across process creation

securityOct 26, 2016 2 min read

When you support mission critical systems it is critically important to know WHAT is running on your systems and WHO is running it. In the past it was sometimes a chore to tell which UID ran a program. This was especially true in the early days when programs fork()'ed and execve()'ed after escalating privileges. The which UID ran a program mystery has been mostly solved (I say mostly because user namespaces throw a few kinks into the equation) by auditing and the PAM loginuid module…

$ read more →

Displaying device multi-path statistics on Linux hosts

storageOct 24, 2016 2 min

Linux provides a number of useful utilities for viewing I/O statistics. Atop, iostat, iotop, etc. are extremely useful utilities but they don't allow you to easily see I/O statistics for each path to a mapper device. To illustrate this lets say you have a mapper device named mpatha with four paths (represented by sdcl, sdnf, sdeq and sdpk in the output below): To visualize the amount of I/O traversing down each path to a mapper device we need to combine iostat and grep: This solution requires you to look up the device you want to monitor and the default output is terrible…

$ read more →

Making Python code more readable with list comprehensions

pythonOct 21, 2016 1 min

This post is added as a reference for myself. As I mentioned previously I've been spending a good deal of time learning how to write efficient and readable Python code. Jeff Knupp's Idiomatic Python videos are absolutely incredible and have definitely helped me become a better programmer. In his first video he turned me on to list comprehensions and how they can make code more readable…

$ read more →

Making sense of docker storage drivers

containersOct 15, 2016 2 min

Docker has a pluggable storage architecture which currently contains 6 drivers. If you have docker installed you can run 'docker info' to see which driver you are using: Picking the right driver isn't straightforward due to how fast docker and the storage drivers are evolving. The docker documentation has some excellent sugge stions and you can't go wrong using the most widely used drivers. I have hit a couple of bugs with the overlayfs driver and I have never bothered with the devicemapper driver with loopback files (vs…

$ read more →

Viewing Linux tape drive statistics with tapestat

linuxOct 15, 2016 1 min

A while back I wrote a blog entry showing how to get tape drives statistics with systemtap. This script wasn't very reliable and I would frequently see it crash after collecting just a few samples. Due to the work of some amazing Linux kernel engineers I no longer have to touch systemtap. Recent Linux kernels now expose a number of incredibly useful statistics through the /sys file system: There is also a tapestats utility in the syststat package that can be used to summarize these statistics: This is a useful addition and I no longer have to worry about systemtap croaking when I'm tracking down issues.

$ read more →