Sysadmin Mega Thread

There is also a flag to not cross mount points, that will prevent descending into .zfs land.

1 Like

Does it also not recurse into child datasets? I don’t remember.

Yes. Here’s an example of recursing to child datasets without crossing mount points into .zfs (or nullfs/bind/nfs mounts etc):

zfs list -Hro mountpoint /jails | xargs sudo tar --one-file-system -cf /tmp/jails.txz
1 Like

RIP $500
image

3 Likes

Thought I’d share the somewhat hacky script I wrote to monitor the mute status of my mic. This script is run by polybar and the output is tailed into a module.

#!/bin/bash


printoutput() {
        OUT=$(pactl list sources | grep -A99 Source\ \#1 | grep Mute)
    if [[ $OUT == *"yes"* ]] ; then
        echo ""
    else
        echo ""
    fi
}

printoutput

handle_pulselog() {
    while IFS= read -r line; do
        if [[ $line != *"source #1"  ]]; then
            continue
        fi
        printoutput
    done
}

pactl subscribe | handle_pulselog

I’m not sharing it for the cleanliness of all the code, but as an example of how you can use a bash script to handle streaming data.

pactl subscribe prints out data every time an event happens. You can pipe that to a function, and snag the STDIN with read, then parse it just like you’re reading from a file with a while loop.

2 Likes

Lol

Like I said. Hacky.

The second half of the script is the good part.

1 Like

Would this work?

[ $line == *"source #1" ] && printoutput

Nvm, I misread it.

1 Like

lol yeah, I could have done something along those lines.

Had a light bulb moment, today.

I have been defining large scale infrastructure as code. Previously, I’d use the principle I’ve always used in OO Programming where I would make the lower level components depend on the higher level components.

This works well on smaller scale system; where, low level, abstract and generic definitions, are fed to the run time environment, but depend on the higher level concrete definitions.

This works just fine - and you can achieve polymorphic environments doing this; however, it seemed like, as I said to my coworker, my architecture was “backwards,” albeit “traditionally” correct.

I then inverted the roles and turned the system up-side-down, where the system was fed high level, abstract, generic definitions by means of an interface, which work across runtime environments, however these definitions depend on low level, concrete, definitions.

While explaining this to my coworker I said I essentially inverted the dependencies… and BINGO - HOLY %^&* I’ve achieved successful dependency inversion in my system!

All of a sudden the information I had learned about morphed into experience and understanding.

As Ice Cub would say “Today was a good day”

1 Like

Sounds great. Can you provide a concrete example?

lol

Finally time to figure out oVirt 4.4 on CentOS 8.

2004 was a good vintage.

2 Likes

Huh. The last Windows 10 Feature Update was build 2004, too.

1 Like

April 2020 (I’m assuming)

1 Like

Oh, that makes sense. I always thought it was build number. ¯\(ツ)

Merged out of news thread since we’re not supposed to chat there.

1 Like

Oh yeah there are a lot of updates.

I’m in the process of upgrading all my servers as we speak.

[lbrown@hyperion ~]$ cat /etc/redhat-release 
CentOS Linux release 8.2.2004 (Core) 
1 Like

ZoL has not released a kABI for el8_2 so you will have to use DKMS to get it to work with RHEL/CentOS 8.2 for the time being.

Not testing it on 1 or 2 first??