Audiobooks – June 2023

The Player of Games by Iain M. Banks

A Culture novel about an expert game player who goes on a mission to an Empire built on a complex game. Interesting and recommended. 4/5

The Only Plane in the Sky: An Oral History of 9/11 by Garrett M. Graff

Interwoven accounts of the day from participants. 4/5

Last Man Standing by Craig A. Falconer

Lone Man tries to survive space emergency. Tries to be the next “The Martian” but doesn’t succeed. Science flaky. Many people like but I gave up at 30% through 2/5

My Scoring System

  • 5/5 = Brilliant, top 5 book of the year
  • 4/5 = Above average, strongly recommend
  • 3/5 = Average. in the middle 70% of books I read
  • 2/5 = Disappointing
  • 1/5 = Did not like at all
Share

Prometheus node_exporter crashed my server

I am in the middle of upgrading my home monitoring setup. I collect metrics via prometheus and query them with grafana. More details later but yesterday I ran into a little problem that crashed one of my computers.

Part of the prometheus ecosystem is node_exporter . This is a program that runs on every computer and exports cpu, ram, disk, network and other stats of the local machine back to prometheus.

One of my servers is a little HP Microserver gen7 I bought in late-2014 and installed Centos 7 on. It has a boot drive and 4 hard drives with data on it.

An HP Microserver gen7

I noticed this machine wasn’t showing up in the prometheus stats correctly. I logged in and checked and the version of node_exporter was very old and formatting it’s data in an obsolete way. So I download the latest version, copied it over the existing binary and restarted the service…

…and my server promptly crashes. So I reboot the server and it crashes a few seconds after the kernel starts.

Obviously the problem is with the new version of node_exporter. However node_exporter is set to start immediately after boot. So what I have to do is start Linux in “single user mode” ( which doesn’t run any services ) and edit the file that starts node_exporter and then reboot again go get the server up normally without it. I follow this guide for getting into single user mode.

After a big of googling I come across node_exporter bug 903 ( “node_exporter creating ACPI Error with Kernel error log ) which seems similar to what I was seeing. The main difference is that my machine crashed rather than just giving an error. I put that down to my machine running fairly old hardware, firmware and operating systems.

The problem seems to be a bug in HP’s hardware/firmware around some stats that the hardware exports. Since node_exporter is trying to get lots of stats from the hardware including temperature, cpu, clock and power usage it is hitting one of the dodgy interfaces and causing a crash.

The bug suggest disabling the “hwmon” check in node_exporter. I tried this but I was still getting a slightly different crash that looked like clock or cpu frequency. Rather than trying to trace further I disabled all the tests and then enabled the ones I needed one by one until the stats I wanted were populated ( except for uptime, because it turns out the time stats via –collector-time were one thing that killed it ).

So I ended up with the following command line

node_exporter --collector.disable-defaults
              --collector.filesystem
              --collector.uname
              --collector.vmstat
              --collector.meminfo
              --collector.loadavg
              --collector.diskstats
              --collector.cpu
              --collector.netstat
              --collector.netdev

which appears to work reliably.

Share

KVM Virtualisation on Ubuntu 22.04

I have been setting up a computer at home to act as a host for virtual machines. The machine is a recycled 10-year-old desktop with 4 cores, 32GB RAM and a 220GB SSD.

Growing the default disk

lvdisplay
lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
lvdisplay
df -h
resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
df -h

Installing kvm and libvirt

Installing packages:

apt install qemu-kvm libvirt-bin virtinst bridge-utils cpu-checker 
apt install libvirt-daemon-system virtinst libvirt-clients bridge-utils cloud-utils

Setting up users and starting daemons

systemctl enable --now libvirtd
systemctl start libvirtd
systemctl status libvirtd
usermod -aG libvirt simon

Setting up Networking

I needed to put the instance on a static IP and then create a bridge so any VMs that were launched were on the same network as everything else at home.

I followed these articles

First remove the default networks created by KVM

~# virsh net-destroy default
Network default destroyed

~# virsh net-undefine default
Network default has been undefined

then run “ip add show” to check just the physical network is left

backup and edit file in /etc/netplan ( 00-installer-config.yaml in my case) that has config for the network

Config created by installer:

# This is the network config written by 'subiquity'
network:
ethernets:
enp2s0:
dhcp4: true
version: 2

Replacement config:

network:
  ethernets:
    enp2s0:
      dhcp4: false
      dhcp6: false
  bridges:
    br0:
      interfaces: [enp2s0]
      addresses: [192.168.1.27/24]
      routes:
        - to: default
          via: 192.168.1.254
      mtu: 1500
      nameservers:
        addresses: [122.56.237.1, 210.55.111.1]
      parameters:
        stp: true
        forward-delay: 4
      dhcp4: false
      dhcp6: false
  version: 2

Note: The format in the 20.04 doc is slightly out of date (for the default route). Corrected in my file and the following link.

I used yamllint to check the config and “netplan try” and “netplan apply” to update.

Now we can make KVM aware of this bridge. create a scratch XML file called host-bridge.xml and insert the following:

<network>
  <name>host-bridge</name>
  <forward mode="bridge"/>
  <bridge name="br0"/>
</network>

Use the following commands to make that our default bridge for VMs:

virsh net-define host-bridge.xml
virsh net-start host-bridge
virsh net-autostart host-bridge

And then list the networks to confirm it is set to autostart:

$ virsh net-list --all
 Name          State    Autostart   Persistent
------------------------------------------------
 host-bridge   active   yes         yes

Booting a Virtual Machine

Now I want to create a Virtual machine image that I can base others I create off. I followed this guide:

Create Ubuntu 22.04 KVM Guest from a Cloud Image

First I downloaded the jammy-server-cloudimg-amd64.img from cloud-images.ubuntu.com. Note this is the ones that doesn’t have “disk” in it’s name.

~# wget http://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img

Then I grew the disk image to 10GB and copied it to where libvirt could see it.

~# qemu-img resize jammy-server-cloudimg-amd64.img +8G

~# cp ubuntu-18.04-server-cloudimg-arm64.img /var/lib/libvirt/images/jammy2204.img

Now I need to configure the image, especially with a user and password so I can login. The way to do this is with cloud-init. This is a special file of commands to config a booting virtual machine. The weird thing with KVM is that the file is on a virtual cdrom attached to the virtual machine.

First create the config

#cloud-config
system_info:
  default_user:
    name: simon
    home: /home/simon

password: hunter2
chpasswd: { expire: False }
hostname: ubuntu-22-cloud-image

# configure sshd to allow users logging in using password
# rather than just keys
ssh_pwauth: True

and save as bootconfig.txt . Then convert it to an iso and copy that to the images folder

~# cloud-localds bootconf.iso bootconf.txt
~# cp bootconf.iso /var/lib/libvirt/images/

~# virsh pool-refresh default

Now I run the program virt-manager locally. This is a graphical program that connects from my desktop over ssh to the the KVM server.

I use virt manager to connect to the KVM server and create a new virtual machine

  • Machine Type should be “Ubuutu 22.04 LTS”
  • It should boot off the jammy2204.img disk
  • The bootconf.iso should be attached to the CDROM. But the machine does not need to boot off it.
  • Set networking to be “Virtual network ‘host-bridge’: Bridge Network”

Boot the machine and you should be able to login to the console using the user:password you created in the cloud-config. You can then change passwords, update packages and otherwise configure the instance to you liking. Once you have finished you can shutdown the machine.

To create a new VM you just need to clone the disk:

~# virsh vol-clone --pool default jammy2204.img newvm.img

and then create a new Virtual machine in virt-manager using the disk (no need for the iso since the disk has the correct passwords)

Share

Audiobooks – May 2023

Napoleon: A Life by Andrew Roberts

A moderately detailed biography single-volume biography that gets good reviews. I could mostly follow the action (except perhaps some of the battles) and characters. Would definitely recommend 4/5

Open: An Autobiography by Andre Agassi

A fairly good memoir by the tennis player. Covers both professional and personal life. The match descriptions work quite well. 3/5

My Scoring System

  • 5/5 = Brilliant, top 5 book of the year
  • 4/5 = Above average, strongly recommend
  • 3/5 = Average. in the middle 70% of books I read
  • 2/5 = Disappointing
  • 1/5 = Did not like at all
Share

Audiobooks – April 2023

1493: Uncovering the New World Columbus Created by Charles C. Mann

Mostly covering the Colombian Exchange between the Old and New Worlds. With stories of goods, species and people going in both directions. 4/5

The Late Monsieur Gallet by Georges Simenon

A salesman is found shot dead. Maigret finds he was leading a double life, but to what end and why does the case not make sense? 3/5

The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company by Robert Iger

Covers his career before CEO up to his original retirement. Lots of interesting stores and some tips for managers. 4/5

A Man’s Head by Georges Simenon

Suspicious a convicted murderer is innocent Maigret arranges his escape and surveillance. One mysterious man directly challenges Maigret to solve the mysterious web of people around the case. 3/5

Dreams of other worlds: The Amazing Story of Unmanned Space Exploration by Chris Impey and Holly Henry

The story of 12 unmanned space missions. Not as detailed as I’d like, around half of each mission’s chapter goes off on tangents but still good. 3/5

The Hanged Man of Saint-Pholien by Georges Simenon

An unexpected suicide leads Maigret to a pretentious group of youths and another suicide ten years previous. 3/5

Lucky: How Joe Biden Barely Won the Presidency by Jonathan Allen and Amie Parnes

Covering the 2020 US Presidential primaries and election. Mostly from the Democratic side. Reasonably good but not quite up to the 2008/2012 books. 4/5

My Audiobook Scoring System

  • 5/5 = Brilliant, top 5 book of the year
  • 4/5 = Above average, strongly recommend
  • 3/5 = Average. in the middle 70% of books I read
  • 2/5 = Disappointing
  • 1/5 = Did not like at all
Share

Audiobooks – March 2023

Pictures at a Revolution: Five Movies and the Birth of the New Hollywood by Mark Harris

The story of the conception, making and release of the 5 Best Picture Nominees at the 1968 Oscars. 4 Classic films and one Bomb. Great book, Highly recommend. 4/5

The Great North Road: London to Edinburgh – 11 Days, 2 Wheels and 1 Ancient Highway by Steve Silk

A mix of travel and history (a 100 year old guide is used and compared). A nice relaxing read. 3/5

Learn Like a Pro: Science-Based Tools to Become Better at Anything by Barbara Oakley

A good general book on learning and study techniques. 3/5

Firepower: How Weapons Shaped Warfare by Paul Lockhart

How weapons developments from 1300 to the end of WW2 shaped how wars were fought at the tactical and operation level. Very interesting, recommended. 4/5

Pietr the Latvian by Georges Simenon

The First Inspector Maigret detective story. A dead body and a live businessman are both match the description of a notorious fraudster. A short interesting listen. 3/5

Build: An Unorthodox Guide to Making Things Worth Making by Tony Fadell

The author talks about his career (at including helping create the ipod, iphone and Nest) and lessons about building products and companies. 4/5

The Crime at Lock 14 by Georges Simenon

A woman’s body is found in a stable near a canal and Inspector Maigret is called to investigate. Her upper-class but disreputable English husband is suspected. Lots of descriptions of Canal life 3/5

Steve Jobs by Walter Isaacson

An authorised (although with plenty of warts) biography of the Apple Founder and CEO. Well written, detailed and interesting. 4/5

The Farthest Shore by Ursula K. Le Guin

Throughout Earthsea magic is dying and people are sicking or going mad. Archmage Sparrowhawk and young Prince set out to investigate. A very real-feeling story. 4/5

My Audiobook Scoring System

  • 5/5 = Brilliant, top 5 book of the year
  • 4/5 = Above average, strongly recommend
  • 3/5 = Average. in the middle 70% of books I read
  • 2/5 = Disappointing
  • 1/5 = Did not like at all
Share

Audiobooks – February 2023

The Rules of the Game: Jutland and British Naval Command by Andrew Gordon

A very detailed account of the battle of Jutland and British Navel Culture. So detailed I gave up trying to follow the Audiobook but would work better if printed. 3/5

Wings of War: The World War II Fighter Plane that Saved the Allies and the Believers Who Made It Fly by David Fairbank White

The History of the P-51 Mustang through 3 people. Designer Edgar Schmued, Tommy Hitchcock, the man who fought for its adoption, and Don Blakeslee, an ace who flew it. 3/5

The Tombs of Atuan by Ursula K. Le Guin,

The 2nd Earthsea book. A girl grows up as a high priestess until one day Sparrowhawk comes to rob her temple. 3/5

1491: New Revelations of the Americas Before Columbus by Charles C. Mann

Nominally a history of the people’s of the pre-Columbian Americas. Covers the population, age and sophistication of the civilizations based on recent discoveries. 4/5

Geniuses at War: Bletchley Park, Colossus, and the Dawn of the Digital Age by David A. Price

A short book on the Bletchley Park code-breaking efforts of WW2. A general overview concentrating on a few characters with much left under-covered. 4/5

An Unfinished Life: John F. Kennedy, 1917–1963 by Robert Dallek

Good account of life and Presidency although only single volume and the audiobook is further abridged. Well worth it as a first JFK biography. 4/5

Tomorrow’s People: The Future of Humanity in Ten Numbers by Paul Morland

A review of some demographic trends and what they tell us how the world will look in the future. 4/5

Countdown to Pearl Harbor: The Twelve Days to the Attack by Steve Twomey

A chronicle of why America was unprepared for the Japanese Attack on Pearl Harbor. Detailed but a nice and interesting read. 4/5

My Audiobook Scoring System

  • 5/5 = Brilliant, top 5 book of the year
  • 4/5 = Above average, strongly recommend
  • 3/5 = Average. in the middle 70% of books I read
  • 2/5 = Disappointing
  • 1/5 = Did not like at all
Share

AudioBooks – January 2023

Colditz Prisoners of the Castle by Ben Macintyre

A good contrast to the “Boys Own” versions by Pat Reid I read as a kid. Covers lots of other viewpoints including from the Germans. Recommended 4/5

Project Hail Mary by Andy Weir

Last read July 2021. A semi-repeat of The Martin where a lone astronaut has to science the shit out of a bad situation. This time to save humanity. 4/5

Seven Games: A Human History by Oliver Roeder

Working through increased complexity of Checkers, backgammon, chess, and Go. Poker, Scrabble, and bridge the author looks at how humans and computers play them. 4/5

Daily Rituals: How Artists Work by Mason Curry

161 short articles about the work habits of authors, artists, composers and the like. Interesting with some ideas one can potentially adopt. 3/5

The Extraordinary Life of an Ordinary Man: A Memoir by Paul Newman

Based on tapes recordings made by the actor and those that knew him. Honest and Deep rather than broad and concentrating on his early life and career. 4/5

A Wizard of Earthsea by Ursula K. Le Guin

Classic Children’s Fantasy story that I haven’t read since I was a kid. Told in a very epic tone and language. Good although I missed the map on audiobook. 4/5

My Audiobook Scoring System

  • 5/5 = Brilliant, top 5 book of the year
  • 4/5 = Above average, strongly recommend
  • 3/5 = Average. in the middle 70% of books I read
  • 2/5 = Disappointing
  • 1/5 = Did not like at all
Share

Audiobooks – December 2022

The Years of Lyndon Johnson. Book Four: The Passage of Power by Robert Caro

Covers 1958-1964. Especially the 1960 Democratic primary and election, Johnson’s unhappy Vice Presidency and the first months of his Presidency. As good as the others in the series. 4/5

England’s Villages: An Extraordinary Journey Through Time by Dr Ben Robinson

An archaeologist writes about the evolution of English Villages, their people, buildings, names and forms. Okay but not exceptional. 3/5

Jefferson: Architect of American Liberty by John B. Boles

A good single volume biography. Works hard to explain Jefferson’s attitudes especially on slavery. Good coverage and easy to follow. 4/5

Shutdown: How Covid Shook the World’s Economy by Adam Tooze

Covering roughly 2020 plus a few months on each side it mostly concentrates on the government and central bank measures to stabilise economies. 3/5

Doing Good Better: Effective Altruism and How You Can Make a Difference by William MacAskill

A Introduction to Effective Ultruism and how you can do the most good in the world via carefully picking charities to give to and other alternatives. 4/5

Leave the Gun, Take the Cannoli: The Epic Story of the Making of The Godfather by Mark Seal

Covers the writing of the book by Puzo, adapting and then filming it. Lots of Behind the scenes stories. A fun read 4/5

The 2020 Commission Report on the North Korean Nuclear Attacks Against the United States by Jeffrey Lewis

A future/alternative history where Trump’s America fights North Korea. Well done and relatively plausible. 4/5

My Audiobook Scoring System

  • 5/5 = Brilliant, top 5 book of the year
  • 4/5 = Above average, strongly recommend
  • 3/5 = Average. in the middle 70% of books I read
  • 2/5 = Disappointing
  • 1/5 = Did not like at all
Share

Donations 2022

Each year I do the majority of my Charity donations in early December (just after my birthday) spread over a few days (so as not to get my credit card suspended).

I do a blog post about it to hopefully inspire others. See previous years: 2021, 2020, 2019, 2018, 2017, 2016, 2015

All amounts are in $US unless otherwise stated

General Charities

$750 to Givewell Top Charities fund . This was previously called their “Maximum impact fund”.

Software and Internet Infrastructure Projects

Last year I donated $100 each to SPI and SFC but this year I dropped it to $50 each and did direct donations to Python and Syncthing. I’m not sure which is the best strategy.

Others including content creators

Payments via Patreon

Current as of mid-December 2022

  • $2/month to Daniel King to make Chess videos
  • $1/month to Chris Stuckmann who does movie reviews
  • $2/month to The Prancing Pony Podcast who make a podcasts show about J R R Tolkien
  • $1/month to Joe Snodow who runs funny twitter accounts.
  • $1/month to Zach Weinersmith who creates SMBC Comic and other stuff
  • $1/video to The Nerdwriter who does Youtube videos
  • $1/month to CGP Grey who does Youtube Videos
  • $1/month to City Beautiful who is creating videos about cities and city planning.
  • $1/month to Alt Shift X who creates youtube videos
  • $2/month to Rose Eveleth who creates the Flash Forward podcast.
  • $1/month to RMTransit who does a Youtube channel on Transit.
  • $1/month to Quinn’s Ideas which is a Youtube Channel about Science Fiction (especially Dune)
  • $1/ month to Asianometry who creates youtube videos, mainly on Economics and the semiconductor industry.
  • $1/month to CityNerd who Videos on Cities and Transportation
Share