Posts for: #Awk

Visualising OpenBSD dmesg

Someone recently sent me OpenBSD 7.9 dmesg output from a NanoPi Zero2, which is a very compact and barebones arm64 machine based on the Rockchip RK3528 SoC.

Feeling somewhat bored, I decided to try to visualize the hardware relationships in directed graph form. It worked rather less-terribly than I expected with my very limited Graphviz experience.

For example, the below dmesg snippet shows how the first Ethernet interface is attached in my PCengines APU2:

[Read full post]

Diving deeper into AWK

I’ve always liked the Unix software toolbox concept: a variety of focused, easily-understood, easily-composed tools that each do approximately one thing. awk is one of my favourites, so I thought I’d write about how I most often apply it, and how you can get more from it too.

In the following examples, I’ll use output from ps, a useful source of test data that is universally available on BSD, Linux and macOS systems. Things should be mostly the same on other systems, too. If you’re using Solaris, for example, there’s a BSD-like ps in /usr/ucb/ps.

[Read full post]