Aug 302021

One of the most amusing (if you have a sick sense of humour) things about the debate between fans of the current US system (devotees of privatised health care) and those proposing a more rational and efficient system, is the whole “I don’t want to pay towards the care of another”.

Once you get past the level of selfishness approaching a sociopath, and think deeply about how insurance – any insurance – works, you realise something. People with private health care insurance are already paying for the health care of others because that is how insurance works.

The insurance company sets monthly premiums at a level they calculate will leave them with profit after all the healthcare costs and overheads are taken care of. Most of the people paying those insurance premiums are unlikely to ever use up those premiums on their own health care; those premiums are going towards the healthcare costs of those who do exceed the total value of all the premiums they’ve paid. And of course to fill the pockets of the insurance companies.

So the next time someone objects to “socialist” healthcare by saying that they don’t want to pay for the healthcare of others’, just point out that they already are.

Posts in a Foggy River
Aug 282021

There’s a bunch of idiots currently poisoning themselves by taking Ivermectin as a cure or preventative for Covid-19. Which is doubly-dumb because not only is there no real evidence that ivermectin will do anything to deal with Covid-19, but these idiots are all too frequently getting their dose from horse-worming medication because the stocks of ivermectin for people has all run out.

Yes you read that right ivermectin is an approved medication for people when the dosage is appropriate. But it is not approved for treating Covid-19; it is intended to treat parasites.

And nobody with any sense would suggest ivermectin paste intended for use on horses :-

  1. The dose of ivermectin for a 700Kg horse is way higher than for a person who typically weighs under 100Kg. And yes the weight makes a difference – LD50 is the measure of how poisonous a drug is, which is specified per kilogram of the subject’s weight.
  2. An oral preparation of a drug for a horse may well contain ingredients not suitable for people.

So taking ivermectin without checking the ingredients and adjusting the dosage is really dumb especially when taking it for something it hasn’t been shown to be effective for.

And don’t take the advice of random strangers on the Internet; some of us aren’t qualified as pharmacists. Consult proper experts.

Setting Sail
Aug 282021

Dealing with a potentially problematic SATA controller, I came across a little issue – which disks were connected to which controller? Not a problem most people would have to deal with but I do have rather a lot of disks. What I wanted was a tool that would list the controllers (lspci) with disks (block devices) shown per controller (lsblk).

I couldn’t find on, so I knocked up a quick and nasty shell script to do the job.

This isn’t a proper product and probably has many bugs (in particular it doesn’t like disks that are members of a volume group), but it works well enough for my use case :-

» ./print-block-tree 
01:00.0 USB controller: Advanced Micro Devices, Inc. [AMD] X399 Series Chipset USB 3.1 xHCI Controller (rev 02)
  sr0:  PIONEER BD-RW_BDR-UD04 41443030303030303030303030303030 1024M
01:00.1 SATA controller: Advanced Micro Devices, Inc. [AMD] X399 Series Chipset SATA Controller (rev 02)
  sdi: 0x5000c50050ada74d ATA ST4000VN000-1H41 Z300H9GD 3.6T
  sdl: 0x500003992be00c53 ATA TOSHIBA_MG04ACA4 39DFK8S4FJKA 3.6T
  sdm: 0x500003992bf8077f ATA TOSHIBA_MG04ACA4 39CIK7DNFJKA 3.6T
  sdn: 0x500a075102fce9c7 ATA C300-CTFDDAC128M 00000000103402FCE9C7 119.2G
  sdo: 0x500003992bb80ede ATA TOSHIBA_MG04ACA4 39CAKCKDFJKA 3.6T
09:00.0 SATA controller: Marvell Technology Group Ltd. 88SE9235 PCIe 2.0 x2 4-port SATA 6 Gb/s Controller (rev 11)
  sdp: 0x5002538f71100d76 ATA Samsung_SSD_870 S5STNG0R101271L 3.6T
  sdq: 0x50000399ec700c31 ATA TOSHIBA_MG04ACA4 30BXKC00FJKA 3.6T
41:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981/PM983
  nvme0n1:  96G
42:00.0 Serial Attached SCSI controller: Broadcom / LSI SAS2308 PCI-Express Fusion-MPT SAS-2 (rev 05)
  sdb: 0x500080dc00b4e2e9 ATA TOSHIBA-TR200 28RB76F7K46S 223.6G
  sdc: 0x500080dc00b4e3f6 ATA TOSHIBA-TR200 28RB76MOK46S 223.6G
  sdd: 0x500080dc009263fa ATA TOSHIBA-TR200 976B607GK46S 223.6G
  sde: 0x500080dc00926416 ATA TOSHIBA-TR200 976B6088K46S 223.6G
  sdf: 0x50025388a09508a9 ATA Samsung_SSD_850 S1SMNSAG216528K 119.2G
  sdg: 0x50025385a01c8379 ATA Samsung_SSD_840 S1ANNSAF214088T 119.2G
  sdh: 0x500080dc009263f4 ATA TOSHIBA-TR200 976B607AK46S 223.6G
  sda: 0x50025388a09508b4 ATA Samsung_SSD_850 S1SMNSAG216534V 119.2G
44:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) USB 3.0 Host Controller
  sdj:  Generic- USB3.0_CRW_-SD 201404081410 59.5G

The script itself :-

# Attempt at printing a "tree" of block devices

controllers=$(ls /dev/disk/by-path | awk -F- '{printf "%s-%s\n", $1, $2}' | uniq)
for c in $controllers
  rhs=$(echo ${c} | awk -F- '{print $2}')
  lspci -s ${rhs}
  blockdevices=$(ls -l /dev/disk/by-path/${c}* | grep -v part | awk '{print $NF}' | awk -F/ '{print $NF}' | uniq)
  for b in $blockdevices
    exp=$(lsblk -no WWN,VENDOR,MODEL,SERIAL,SIZE /dev/${b} | head -1 | tr -s " ")
    if [ -n "${exp}" ]
      echo "  ${b}: ${exp}"
The Rower
Aug 282021

For a while now, my workstation has been spewing out this error in rather large volumes :-

Aug 27 00:00:07 pica multipathd[1686]: pktcdvd0: unusable path (wild) - checker failed

(about 18,000 per day)

The multipath daemon is for handling block devices (disks) with multiple connections and dynamically updating the geometry when errors occur. Not the sort of thing that you usually find in a workstation (or indeed most servers) and indeed it appears that I only have this installed because I started with the server install of Ubuntu.

It wasn’t causing any harm but it was annoying that it was spamming syslog log files, so I took a look at fixing it. Turns out it is rather easy. Just edit /etc/multipath.conf and add a “blacklist” section :-

blacklist {
       devnode "^pktcdvd0"

The parameter to “devnode” is a regular expression but in this case we can get away with a “^” (meaning beginning of string) followed by the name of the device.

At this point, you could restart the daemon :-

systemctl restart multipathd.service

This shouldn’t cause any problems on most machines without multiple paths; and it probably won’t be a problem for servers which do have multiple paths. But in the later case, I’d test it or just go for a full reboot.

Morning Lighthouse
Aug 282021

To be a nice person there are all sorts of things to avoid – racism, sexism, transphobism, ableism, and probably a whole lot more -isms. Which is really rather complicated but it can be boiled down to the very simple :-

Just don’t be an arsehole.

That’s it. No special magic, just treat everyone in the way you would like to be treated :-

  1. Don’t stick your nose into other peoples’ private sex life; it’s none of your business.
  2. If someone decides to transition their gender, don’t worry about it – just address them with their preferred pronoun and name, and job done. And whilst we’re about it (with particular reference to TERFs), don’t invent bullshit reasons to be an arsehole.
  3. Colour is just skin-deep. It’s a spectacularly dumb reason to be labeled an arsehole.
  4. Someone doesn’t share your religious belief? That’s their problem (or yours).

The list could go on and on.

But it can all be simplified – if someone isn’t directly causing harm to others, what they are up to is their business not yours. Just don’t be an arsehole.

WP2Social Auto Publish Powered By :