summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--about/resources.gmi206
-rw-r--r--gemfeed/2024-12-03-f3s-kubernetes-with-freebsd-part-2.gmi73
-rw-r--r--gemfeed/2024-12-03-f3s-kubernetes-with-freebsd-part-2.gmi.tpl70
-rw-r--r--gemfeed/atom.xml78
-rw-r--r--index.gmi2
-rw-r--r--uptime-stats.gmi2
6 files changed, 287 insertions, 144 deletions
diff --git a/about/resources.gmi b/about/resources.gmi
index d30af6ad..ec9b123b 100644
--- a/about/resources.gmi
+++ b/about/resources.gmi
@@ -35,54 +35,54 @@ You won't find any links on this site because, over time, the links will break.
In random order:
+* 21st Century C: C Tips from the New School; Ben Klemens; O'Reilly
+* Perl New Features; Joshua McAdams, brian d foy; Perl School
+* DevOps And Site Reliability Engineering Handbook; Stephen Fleming; Audible
* Distributed Systems: Principles and Paradigms; Andrew S. Tanenbaum; Pearson
+* Terraform Cookbook; Mikael Krief; Packt Publishing
* Systemprogrammierung in Go; Frank Müller; dpunkt
-* DevOps And Site Reliability Engineering Handbook; Stephen Fleming; Audible
-* Learn You a Haskell for Great Good!; Miran Lipovaca; No Starch Press
+* Amazon Web Services in Action; Michael Wittig and Andreas Wittig; Manning Publications
+* Ultimate Go Notebook; Bill Kennedy
+* Learn You Some Erlang for Great Good; Fred Herbert; No Starch Press
+* Systems Performance Tuning; Gian-Paolo D. Musumeci and others...; O'Reilly
+* Hands-on Infrastructure Monitoring with Prometheus; Joel Bastos, Pedro Araujo; Packt
* Kubernetes Cookbook; Sameer Naik, Sébastien Goasguen, Jonathan Michaux; O'Reilly
-* C++ Programming Language; Bjarne Stroustrup;
+* Site Reliability Engineering; How Google runs production systems; O'Reilly
+* Go Brain Teasers - Exercise Your Mind; Miki Tebeka; The Pragmatic Programmers
+* Programming Perl aka "The Camel Book"; Tom Christiansen, brian d foy, Larry Wall & Jon Orwant; O'Reilly
+* Data Science at the Command Line; Jeroen Janssens; O'Reilly
+* Clusterbau mit Linux-HA; Michael Schwartzkopff; O'Reilly
+* Leanring eBPF; Liz Rice; O'Reilly
+* Pro Puppet; James Turnbull, Jeffrey McCune; Apress
+* Programming Ruby 3.3 (5th Edition); Noel Rappin, with Dave Thomas; The Pragmatic Bookshelf
+* Developing Games in Java; David Brackeen and others...; New Riders
+* Raku Fundamentals; Moritz Lenz; Apress
+* The KCNA (Kubernetes and Cloud Native Associate) Book; Nigel Poulton
+* Concurrency in Go; Katherine Cox-Buday; O'Reilly
* The Kubernetes Book; Nigel Poulton; Unabridged Audiobook
-* Object-Oriented Programming with ANSI-C; Axel-Tobias Schreiner
-* Polished Ruby Programming; Jeremy Evans; Packt Publishing
+* The Pragmatic Programmer; David Thomas; Addison-Wesley
* 97 things every SRE should know; Emil Stolarsky, Jaime Woo; O'Reilly
-* The KCNA (Kubernetes and Cloud Native Associate) Book; Nigel Poulton
-* Seeking SRE: Conversations About Running Production Systems at Scale; David N. Blank-Edelman; eBook
-* The Docker Book; James Turnbull; Kindle
-* Effective Java; Joshua Bloch; Addison-Wesley Professional
-* Higher Order Perl; Mark Dominus; Morgan Kaufmann
-* Perl New Features; Joshua McAdams, brian d foy; Perl School
-* Learn You Some Erlang for Great Good; Fred Herbert; No Starch Press
+* Polished Ruby Programming; Jeremy Evans; Packt Publishing
+* Chaos Engineering - System Resiliency in Practice; Casey Rosenthal and Nora Jones; eBook
+* Learn You a Haskell for Great Good!; Miran Lipovaca; No Starch Press
+* C++ Programming Language; Bjarne Stroustrup;
* The Practise of System and Network Administration; Thomas A. Limoncelli, Christina J. Hogan, Strata R. Chalup; Addison-Wesley Professional Pro Git; Scott Chacon, Ben Straub; Apress
-* Developing Games in Java; David Brackeen and others...; New Riders
-* 21st Century C: C Tips from the New School; Ben Klemens; O'Reilly
-* The DevOps Handbook; Gene Kim, Jez Humble, Patrick Debois, John Willis; Audible
-* Leanring eBPF; Liz Rice; O'Reilly
-* Raku Recipes; J.J. Merelo; Apress
-* Ultimate Go Notebook; Bill Kennedy
-* Clusterbau mit Linux-HA; Michael Schwartzkopff; O'Reilly
-* Programming Perl aka "The Camel Book"; Tom Christiansen, brian d foy, Larry Wall & Jon Orwant; O'Reilly
-* Concurrency in Go; Katherine Cox-Buday; O'Reilly
-* Think Raku (aka Think Perl 6); Laurent Rosenfeld, Allen B. Downey; O'Reilly
-* Amazon Web Services in Action; Michael Wittig and Andreas Wittig; Manning Publications
-* Modern Perl; Chromatic ; Onyx Neon Press
-* 100 Go Mistakes and How to Avoid Them; Teiva Harsanyi; Manning Publications
+* The Go Programming Language; Alan A. A. Donovan; Addison-Wesley Professional
+* Java ist auch eine Insel; Christian Ullenboom;
* Tmux 2: Productive Mouse-free Development; Brain P. Hogan; The Pragmatic Programmers
-* Hands-on Infrastructure Monitoring with Prometheus; Joel Bastos, Pedro Araujo; Packt
-* Funktionale Programmierung; Peter Pepper; Springer
* DNS and BIND; Cricket Liu; O'Reilly
-* Go Brain Teasers - Exercise Your Mind; Miki Tebeka; The Pragmatic Programmers
-* The Pragmatic Programmer; David Thomas; Addison-Wesley
-* Terraform Cookbook; Mikael Krief; Packt Publishing
* Effective awk programming; Arnold Robbins; O'Reilly
-* Raku Fundamentals; Moritz Lenz; Apress
-* Systems Performance Tuning; Gian-Paolo D. Musumeci and others...; O'Reilly
-* Pro Puppet; James Turnbull, Jeffrey McCune; Apress
-* Java ist auch eine Insel; Christian Ullenboom;
-* Data Science at the Command Line; Jeroen Janssens; O'Reilly
-* Chaos Engineering - System Resiliency in Practice; Casey Rosenthal and Nora Jones; eBook
-* The Go Programming Language; Alan A. A. Donovan; Addison-Wesley Professional
-* Programming Ruby 3.3 (5th Edition); Noel Rappin, with Dave Thomas; The Pragmatic Bookshelf
-* Site Reliability Engineering; How Google runs production systems; O'Reilly
+* Modern Perl; Chromatic ; Onyx Neon Press
+* Raku Recipes; J.J. Merelo; Apress
+* Effective Java; Joshua Bloch; Addison-Wesley Professional
+* 100 Go Mistakes and How to Avoid Them; Teiva Harsanyi; Manning Publications
+* Higher Order Perl; Mark Dominus; Morgan Kaufmann
+* Object-Oriented Programming with ANSI-C; Axel-Tobias Schreiner
+* Funktionale Programmierung; Peter Pepper; Springer
+* Seeking SRE: Conversations About Running Production Systems at Scale; David N. Blank-Edelman; eBook
+* The DevOps Handbook; Gene Kim, Jez Humble, Patrick Debois, John Willis; Audible
+* Think Raku (aka Think Perl 6); Laurent Rosenfeld, Allen B. Downey; O'Reilly
+* The Docker Book; James Turnbull; Kindle
## Technical references
@@ -90,10 +90,10 @@ I didn't read them from the beginning to the end, but I am using them to look up
* BPF Performance Tools - Linux System and Application Observability, Brendan Gregg; Addison Wesley
* Algorithms; Robert Sedgewick, Kevin Wayne; Addison Wesley
-* Implementing Service Level Objectives; Alex Hidalgo; O'Reilly
-* The Linux Programming Interface; Michael Kerrisk; No Starch Press
* Go: Design Patterns for Real-World Projects; Mat Ryer; Packt
+* Implementing Service Level Objectives; Alex Hidalgo; O'Reilly
* Relayd and Httpd Mastery; Michael W Lucas
+* The Linux Programming Interface; Michael Kerrisk; No Starch Press
* Understanding the Linux Kernel; Daniel P. Bovet, Marco Cesati; O'Reilly
* Groovy Kurz & Gut; Joerg Staudemeier; O'Reilly
@@ -101,44 +101,44 @@ I didn't read them from the beginning to the end, but I am using them to look up
In random order:
-* Influence without Authority; A. Cohen, D. Bradford; Wiley
-* The Software Engineer's Guidebook: Navigating senior, tech lead, and staff engineer positions at tech companies and startups; Gergely Orosz; Audiobook
-* Ultralearning; Anna Laurent; Self-published via Amazon
-* Never Split the Difference; Chris Voss, Tahl Raz; Random House Business
-* Ultralearning; Scott Young; Thorsons
-* The Good Enough Job; Simone Stolzoff; Ebury Edge
-* Atomic Habits; James Clear; Random House Business
-* So Good They Can't Ignore You; Cal Newport; Business Plus
-* Solve for Happy; Mo Gawdat (RE-READ 1ST TIME)
-* The Off Switch; Mark Cropley; Virgin Books (RE-READ 1ST TIME)
-* Coders at Work - Reflections on the craft of programming, Peter Seibel and Mitchell Dorian et al., Audiobook
-* The Phoenix Project - A Novel About IT, DevOps, and Helping your Business Win; Gene Kim and Kevin Behr; Trade Select
-* The Power of Now; Eckhard Tolle; Yellow Kite
-* The Daily Stoic; Ryan Holiday, Stephen Hanselman; Profile Books
+* Eat That Frog!; Brian Tracy; Hodder Paperbacks
* The Obstacle Is The Way; Ryan Holiday; Profile Books Ltd
-* Meditation for Mortals, Oliver Burkeman, Audiobook
-* Who Moved My Cheese?; Dr. Spencer Johnson; Vermilion
-* The Bullet Journal Method; Ryder Carroll; Fourth Estate
-* The Joy of Missing Out; Christina Crook; New Society Publishers
-* Buddah and Einstein walk into a Bar; Guy Joseph Ale, Claire Bloom; Blackstone Publishing
-* Staff Engineer: Leadership beyond the management track; Will Larson; Audiobook
+* Search Inside Yourself - The Unexpected path to Achieving Success, Happiness (and World Peace); Chade-Meng Tan, Daniel Goleman, Jon Kabat-Zinn; HarperOne
+* 101 Essays that change the way you think; Brianna Wiest; Audiobook
* Eat That Frog; Brian Tracy
-* Eat That Frog!; Brian Tracy; Hodder Paperbacks
+* The Software Engineer's Guidebook: Navigating senior, tech lead, and staff engineer positions at tech companies and startups; Gergely Orosz; Audiobook
+* Deep Work; Cal Newport; Piatkus
* Psycho-Cybernetics; Maxwell Maltz; Perigee Books
-* Stop starting, start finishing; Arne Roock; Lean-Kanban University
-* The Complete Software Developer's Career Guide; John Sonmez; Unabridged Audiobook
-* Digital Minimalism; Cal Newport; Portofolio Penguin
+* The Bullet Journal Method; Ryder Carroll; Fourth Estate
* The 7 Habits Of Highly Effective People; Stephen R. Covey; Simon & Schuster UK
-* 101 Essays that change the way you think; Brianna Wiest; Audiobook
-* 97 Things Every Engineering Manager Should Know; Camille Fournier; Audiobook
+* The Power of Now; Eckhard Tolle; Yellow Kite
+* So Good They Can't Ignore You; Cal Newport; Business Plus
+* Digital Minimalism; Cal Newport; Portofolio Penguin
+* The Complete Software Developer's Career Guide; John Sonmez; Unabridged Audiobook
* Slow Productivity; Cal Newport; Penguin Random House
-* The Courage to Be Disliked; Ichiro Kishimi and Fumitake Koga; Audiobook
+* Getting Things Done; David Allen
+* The Phoenix Project - A Novel About IT, DevOps, and Helping your Business Win; Gene Kim and Kevin Behr; Trade Select
+* Buddah and Einstein walk into a Bar; Guy Joseph Ale, Claire Bloom; Blackstone Publishing
* Time Management for System Administrators; Thomas A. Limoncelli; O'Reilly
+* The Good Enough Job; Simone Stolzoff; Ebury Edge
+* Atomic Habits; James Clear; Random House Business
+* The Daily Stoic; Ryan Holiday, Stephen Hanselman; Profile Books
+* 97 Things Every Engineering Manager Should Know; Camille Fournier; Audiobook
+* Never Split the Difference; Chris Voss, Tahl Raz; Random House Business
+* Influence without Authority; A. Cohen, D. Bradford; Wiley
+* Staff Engineer: Leadership beyond the management track; Will Larson; Audiobook
+* Who Moved My Cheese?; Dr. Spencer Johnson; Vermilion
+* Meditation for Mortals, Oliver Burkeman, Audiobook
* Consciousness: A Very Short Introduction; Susan Blackmore; Oxford Uiversity Press
-* Deep Work; Cal Newport; Piatkus
-* Search Inside Yourself - The Unexpected path to Achieving Success, Happiness (and World Peace); Chade-Meng Tan, Daniel Goleman, Jon Kabat-Zinn; HarperOne
-* Getting Things Done; David Allen
+* Ultralearning; Anna Laurent; Self-published via Amazon
+* The Courage to Be Disliked; Ichiro Kishimi and Fumitake Koga; Audiobook
+* Coders at Work - Reflections on the craft of programming, Peter Seibel and Mitchell Dorian et al., Audiobook
* Soft Skills; John Sommez; Manning Publications
+* The Off Switch; Mark Cropley; Virgin Books (RE-READ 1ST TIME)
+* Ultralearning; Scott Young; Thorsons
+* Stop starting, start finishing; Arne Roock; Lean-Kanban University
+* The Joy of Missing Out; Christina Crook; New Society Publishers
+* Solve for Happy; Mo Gawdat (RE-READ 1ST TIME)
=> ../notes/index.gmi Here are notes of mine for some of the books
@@ -146,30 +146,30 @@ In random order:
Some of these were in-person with exams; others were online learning lectures only. In random order:
-* Apache Tomcat Best Practises; 3-day on-site training
+* Developing IaC with Terraform (with Live Lessons); O'Reilly Online
+* Scripting Vim; Damian Conway; O'Reilly Online
* Red Hat Certified System Administrator; Course + certification (Although I had the option, I decided not to take the next course as it is more effective to self learn what I need)
-* MySQL Deep Dive Workshop; 2-day on-site training
-* Algorithms Video Lectures; Robert Sedgewick; O'Reilly Online
-* Structure and Interpretation of Computer Programs; Harold Abelson and more...;
+* Functional programming lecture; Remote University of Hagen
+* Cloud Operations on AWS - Learn how to configure, deploy, maintain, and troubleshoot your AWS environments; 3-day online live training with labs; Amazon
* The Well-Grounded Rubyist Video Edition; David. A. Black; O'Reilly Online
+* MySQL Deep Dive Workshop; 2-day on-site training
* Ultimate Go Programming; Bill Kennedy; O'Reilly Online
-* Cloud Operations on AWS - Learn how to configure, deploy, maintain, and troubleshoot your AWS environments; 3-day online live training with labs; Amazon
+* Algorithms Video Lectures; Robert Sedgewick; O'Reilly Online
* Protocol buffers; O'Reilly Online
-* The Ultimate Kubernetes Bootcamp; School of Devops; O'Reilly Online
-* AWS Immersion Day; Amazon; 1-day interactive online training
-* Developing IaC with Terraform (with Live Lessons); O'Reilly Online
-* Functional programming lecture; Remote University of Hagen
+* Structure and Interpretation of Computer Programs; Harold Abelson and more...;
* F5 Loadbalancers Training; 2-day on-site training; F5, Inc.
+* Apache Tomcat Best Practises; 3-day on-site training
+* AWS Immersion Day; Amazon; 1-day interactive online training
+* The Ultimate Kubernetes Bootcamp; School of Devops; O'Reilly Online
* Linux Security and Isolation APIs Training; Michael Kerrisk; 3-day on-site training
-* Scripting Vim; Damian Conway; O'Reilly Online
## Technical guides
These are not whole books, but guides (smaller or larger) which I found very useful. in random order:
+* Raku Guide at https://raku.guide
* Advanced Bash-Scripting Guide
* How CPUs work at https://cpu.land
-* Raku Guide at https://raku.guide
## Podcasts
@@ -177,58 +177,58 @@ These are not whole books, but guides (smaller or larger) which I found very use
In random order:
-* Hidden Brain
-* Pratical AI
-* Maintainable
-* Fallthrough [Golang]
* Backend Banter
-* Wednesday Wisdom
+* BSD Now [BSD]
* Fork Around And Find Out
* Cup o' Go [Golang]
-* Deep Questions with Cal Newport
-* The Pragmatic Engineer Podcast
+* Pratical AI
* The ProdCast (Google SRE Podcast)
+* The Pragmatic Engineer Podcast
* Modern Mentor
-* Dev Interrupted
-* BSD Now [BSD]
+* Deep Questions with Cal Newport
+* Hidden Brain
+* Maintainable
* The Changelog Podcast(s)
+* Fallthrough [Golang]
+* Dev Interrupted
+* Wednesday Wisdom
### Podcasts I liked
I liked them but am not listening to them anymore. The podcasts have either "finished" (no more episodes) or I stopped listening to them due to time constraints or a shift in my interests.
* Ship It (predecessor of Fork Around And Find Out)
-* Go Time (predecessor of fallthrough)
+* Modern Mentor
* FLOSS weekly
+* Go Time (predecessor of fallthrough)
* CRE: Chaosradio Express [german]
-* Modern Mentor
* Java Pub House
## Newsletters I like
This is a mix of tech and non-tech newsletters I am subscribed to. In random order:
-* Monospace Mentor
-* The Pragmatic Engineer
-* Register Spill
-* Changelog News
-* VK Newsletter
-* The Valuable Dev
-* Applied Go Weekly Newsletter
* Ruby Weekly
* Andreas Brandhorst Newsletter (Sci-Fi author)
-* byteSizeGo
* Golang Weekly
+* Applied Go Weekly Newsletter
+* The Valuable Dev
+* Changelog News
+* Register Spill
* The Imperfectionist
+* Monospace Mentor
+* byteSizeGo
+* The Pragmatic Engineer
+* VK Newsletter
## Magazines I like(d)
This is a mix of tech I like(d). I may not be a current subscriber, but now and then, I buy an issue. In random order:
-* freeX (not published anymore)
+* LWN (online only)
* Linux User
+* freeX (not published anymore)
* Linux Magazine
-* LWN (online only)
# Formal education
diff --git a/gemfeed/2024-12-03-f3s-kubernetes-with-freebsd-part-2.gmi b/gemfeed/2024-12-03-f3s-kubernetes-with-freebsd-part-2.gmi
index ba04abcb..3e27bc1e 100644
--- a/gemfeed/2024-12-03-f3s-kubernetes-with-freebsd-part-2.gmi
+++ b/gemfeed/2024-12-03-f3s-kubernetes-with-freebsd-part-2.gmi
@@ -45,8 +45,9 @@ Let's continue...
* ⇢ ⇢ CPU throttling
* ⇢ Wake-on-LAN Setup
* ⇢ ⇢ Setting up WoL on the laptop
-* ⇢ ⇢ Testing WoL
+* ⇢ ⇢ Testing WoL and Shutdown
* ⇢ ⇢ WoL from WiFi
+* ⇢ ⇢ Remote Shutdown via SSH
* ⇢ ⇢ BIOS Configuration
* ⇢ Conclusion
@@ -312,17 +313,25 @@ To wake the Beelinks from my Fedora laptop (`earth`), I installed the `wol` pack
[paul@earth]~% sudo dnf install -y wol
```
-Next, I created a simple script (`~/bin/wol-f3s`) to wake the machines:
+Next, I created a simple script (`~/bin/wol-f3s`) to wake and shutdown the machines:
```sh
#!/bin/bash
-# Wake-on-LAN script for f3s cluster (f0, f1, f2)
+# Wake-on-LAN and shutdown script for f3s cluster (f0, f1, f2)
# MAC addresses
F0_MAC="e8:ff:1e:d7:1c:ac" # f0 (192.168.1.130)
F1_MAC="e8:ff:1e:d7:1e:44" # f1 (192.168.1.131)
F2_MAC="e8:ff:1e:d7:1c:a0" # f2 (192.168.1.132)
+# IP addresses
+F0_IP="192.168.1.130"
+F1_IP="192.168.1.131"
+F2_IP="192.168.1.132"
+
+# SSH user
+SSH_USER="paul"
+
# Broadcast address for your LAN
BROADCAST="192.168.1.255"
@@ -333,7 +342,18 @@ wake() {
wol -i "$BROADCAST" "$mac"
}
-case "${1:-all}" in
+shutdown_host() {
+ local name=$1
+ local ip=$2
+ echo "Shutting down $name ($ip)..."
+ ssh -o ConnectTimeout=5 "$SSH_USER@$ip" "doas poweroff" 2>/dev/null && \
+ echo " ✓ Shutdown command sent to $name" || \
+ echo " ✗ Failed to reach $name (already down?)"
+}
+
+ACTION="${1:-all}"
+
+case "$ACTION" in
f0) wake "f0" "$F0_MAC" ;;
f1) wake "f1" "$F1_MAC" ;;
f2) wake "f2" "$F2_MAC" ;;
@@ -342,8 +362,16 @@ case "${1:-all}" in
wake "f1" "$F1_MAC"
wake "f2" "$F2_MAC"
;;
+ shutdown|poweroff|down)
+ shutdown_host "f0" "$F0_IP"
+ shutdown_host "f1" "$F1_IP"
+ shutdown_host "f2" "$F2_IP"
+ echo ""
+ echo "✓ Shutdown commands sent to all machines."
+ exit 0
+ ;;
*)
- echo "Usage: $0 [f0|f1|f2|all]"
+ echo "Usage: $0 [f0|f1|f2|all|shutdown]"
exit 1
;;
esac
@@ -352,21 +380,28 @@ echo ""
echo "✓ WoL packets sent. Machines should boot in a few seconds."
```
-After making the script executable with `chmod +x ~/bin/wol-f3s`, I can now wake the machines with simple commands:
+After making the script executable with `chmod +x ~/bin/wol-f3s`, I can now control the machines with simple commands:
```sh
-[paul@earth]~% wol-f3s # Wake all three
-[paul@earth]~% wol-f3s f0 # Wake only f0
+[paul@earth]~% wol-f3s # Wake all three
+[paul@earth]~% wol-f3s f0 # Wake only f0
+[paul@earth]~% wol-f3s shutdown # Shutdown all three via SSH
```
-## Testing WoL
+## Testing WoL and Shutdown
-To test the setup, I shutdown all three machines:
+To test the setup, I shutdown all three machines using the script's shutdown function:
```sh
-[paul@earth]~% ssh paul@192.168.1.130 "doas poweroff"
-[paul@earth]~% ssh paul@192.168.1.131 "doas poweroff"
-[paul@earth]~% ssh paul@192.168.1.132 "doas poweroff"
+[paul@earth]~% wol-f3s shutdown
+Shutting down f0 (192.168.1.130)...
+ ✓ Shutdown command sent to f0
+Shutting down f1 (192.168.1.131)...
+ ✓ Shutdown command sent to f1
+Shutting down f2 (192.168.1.132)...
+ ✓ Shutdown command sent to f2
+
+✓ Shutdown commands sent to all machines.
```
After waiting for them to fully power down (about 1 minute), I sent the WoL magic packets:
@@ -391,6 +426,18 @@ An important note: **Wake-on-LAN works perfectly even when the laptop is connect
This makes WoL very convenient - I can wake the cluster from anywhere in my home, whether I'm on WiFi or ethernet.
+## Remote Shutdown via SSH
+
+While Wake-on-LAN handles powering on the machines remotely, I also added a shutdown function to the script for convenience. The `wol-f3s shutdown` command uses SSH to connect to each machine and execute `doas poweroff`, gracefully shutting them all down.
+
+This is particularly useful for power saving - when I'm done working with the cluster for the day, I can simply run:
+
+```sh
+[paul@earth]~% wol-f3s shutdown
+```
+
+And all three machines will shut down cleanly. The next time I need them, a simple `wol-f3s` command wakes them all back up. This combination makes the cluster very energy-efficient while maintaining quick access when needed.
+
## BIOS Configuration
For WoL to work reliably, make sure to check the BIOS settings on each Beelink:
diff --git a/gemfeed/2024-12-03-f3s-kubernetes-with-freebsd-part-2.gmi.tpl b/gemfeed/2024-12-03-f3s-kubernetes-with-freebsd-part-2.gmi.tpl
index e241c32b..ac865bf3 100644
--- a/gemfeed/2024-12-03-f3s-kubernetes-with-freebsd-part-2.gmi.tpl
+++ b/gemfeed/2024-12-03-f3s-kubernetes-with-freebsd-part-2.gmi.tpl
@@ -280,17 +280,25 @@ To wake the Beelinks from my Fedora laptop (`earth`), I installed the `wol` pack
[paul@earth]~% sudo dnf install -y wol
```
-Next, I created a simple script (`~/bin/wol-f3s`) to wake the machines:
+Next, I created a simple script (`~/bin/wol-f3s`) to wake and shutdown the machines:
```sh
#!/bin/bash
-# Wake-on-LAN script for f3s cluster (f0, f1, f2)
+# Wake-on-LAN and shutdown script for f3s cluster (f0, f1, f2)
# MAC addresses
F0_MAC="e8:ff:1e:d7:1c:ac" # f0 (192.168.1.130)
F1_MAC="e8:ff:1e:d7:1e:44" # f1 (192.168.1.131)
F2_MAC="e8:ff:1e:d7:1c:a0" # f2 (192.168.1.132)
+# IP addresses
+F0_IP="192.168.1.130"
+F1_IP="192.168.1.131"
+F2_IP="192.168.1.132"
+
+# SSH user
+SSH_USER="paul"
+
# Broadcast address for your LAN
BROADCAST="192.168.1.255"
@@ -301,7 +309,18 @@ wake() {
wol -i "$BROADCAST" "$mac"
}
-case "${1:-all}" in
+shutdown_host() {
+ local name=$1
+ local ip=$2
+ echo "Shutting down $name ($ip)..."
+ ssh -o ConnectTimeout=5 "$SSH_USER@$ip" "doas poweroff" 2>/dev/null && \
+ echo " ✓ Shutdown command sent to $name" || \
+ echo " ✗ Failed to reach $name (already down?)"
+}
+
+ACTION="${1:-all}"
+
+case "$ACTION" in
f0) wake "f0" "$F0_MAC" ;;
f1) wake "f1" "$F1_MAC" ;;
f2) wake "f2" "$F2_MAC" ;;
@@ -310,8 +329,16 @@ case "${1:-all}" in
wake "f1" "$F1_MAC"
wake "f2" "$F2_MAC"
;;
+ shutdown|poweroff|down)
+ shutdown_host "f0" "$F0_IP"
+ shutdown_host "f1" "$F1_IP"
+ shutdown_host "f2" "$F2_IP"
+ echo ""
+ echo "✓ Shutdown commands sent to all machines."
+ exit 0
+ ;;
*)
- echo "Usage: $0 [f0|f1|f2|all]"
+ echo "Usage: $0 [f0|f1|f2|all|shutdown]"
exit 1
;;
esac
@@ -320,21 +347,28 @@ echo ""
echo "✓ WoL packets sent. Machines should boot in a few seconds."
```
-After making the script executable with `chmod +x ~/bin/wol-f3s`, I can now wake the machines with simple commands:
+After making the script executable with `chmod +x ~/bin/wol-f3s`, I can now control the machines with simple commands:
```sh
-[paul@earth]~% wol-f3s # Wake all three
-[paul@earth]~% wol-f3s f0 # Wake only f0
+[paul@earth]~% wol-f3s # Wake all three
+[paul@earth]~% wol-f3s f0 # Wake only f0
+[paul@earth]~% wol-f3s shutdown # Shutdown all three via SSH
```
-## Testing WoL
+## Testing WoL and Shutdown
-To test the setup, I shutdown all three machines:
+To test the setup, I shutdown all three machines using the script's shutdown function:
```sh
-[paul@earth]~% ssh paul@192.168.1.130 "doas poweroff"
-[paul@earth]~% ssh paul@192.168.1.131 "doas poweroff"
-[paul@earth]~% ssh paul@192.168.1.132 "doas poweroff"
+[paul@earth]~% wol-f3s shutdown
+Shutting down f0 (192.168.1.130)...
+ ✓ Shutdown command sent to f0
+Shutting down f1 (192.168.1.131)...
+ ✓ Shutdown command sent to f1
+Shutting down f2 (192.168.1.132)...
+ ✓ Shutdown command sent to f2
+
+✓ Shutdown commands sent to all machines.
```
After waiting for them to fully power down (about 1 minute), I sent the WoL magic packets:
@@ -359,6 +393,18 @@ An important note: **Wake-on-LAN works perfectly even when the laptop is connect
This makes WoL very convenient - I can wake the cluster from anywhere in my home, whether I'm on WiFi or ethernet.
+## Remote Shutdown via SSH
+
+While Wake-on-LAN handles powering on the machines remotely, I also added a shutdown function to the script for convenience. The `wol-f3s shutdown` command uses SSH to connect to each machine and execute `doas poweroff`, gracefully shutting them all down.
+
+This is particularly useful for power saving - when I'm done working with the cluster for the day, I can simply run:
+
+```sh
+[paul@earth]~% wol-f3s shutdown
+```
+
+And all three machines will shut down cleanly. The next time I need them, a simple `wol-f3s` command wakes them all back up. This combination makes the cluster very energy-efficient while maintaining quick access when needed.
+
## BIOS Configuration
For WoL to work reliably, make sure to check the BIOS settings on each Beelink:
diff --git a/gemfeed/atom.xml b/gemfeed/atom.xml
index bb665238..48bdcd7e 100644
--- a/gemfeed/atom.xml
+++ b/gemfeed/atom.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
- <updated>2026-01-11T10:37:38+02:00</updated>
+ <updated>2026-01-11T10:46:34+02:00</updated>
<title>foo.zone feed</title>
<subtitle>To be in the .zone!</subtitle>
<link href="gemini://foo.zone/gemfeed/atom.xml" rel="self" />
@@ -13637,8 +13637,9 @@ Jan 26 17:36:32 f2 apcupsd[2159]: apcupsd shutdown succeeded
<li>⇢ <a href='#cpu-throttling'>CPU throttling</a></li>
<li><a href='#wake-on-lan-setup'>Wake-on-LAN Setup</a></li>
<li>⇢ <a href='#setting-up-wol-on-the-laptop'>Setting up WoL on the laptop</a></li>
-<li>⇢ <a href='#testing-wol'>Testing WoL</a></li>
+<li>⇢ <a href='#testing-wol-and-shutdown'>Testing WoL and Shutdown</a></li>
<li>⇢ <a href='#wol-from-wifi'>WoL from WiFi</a></li>
+<li>⇢ <a href='#remote-shutdown-via-ssh'>Remote Shutdown via SSH</a></li>
<li>⇢ <a href='#bios-configuration'>BIOS Configuration</a></li>
<li><a href='#conclusion'>Conclusion</a></li>
</ul><br />
@@ -13949,20 +13950,28 @@ http://www.gnu.org/software/src-highlite -->
<pre>[paul@earth]~% sudo dnf install -y wol
</pre>
<br />
-<span>Next, I created a simple script (<span class='inlinecode'>~/bin/wol-f3s</span>) to wake the machines:</span><br />
+<span>Next, I created a simple script (<span class='inlinecode'>~/bin/wol-f3s</span>) to wake and shutdown the machines:</span><br />
<br />
<!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><i><font color="silver">#!/bin/bash</font></i>
-<i><font color="silver"># Wake-on-LAN script for f3s cluster (f0, f1, f2)</font></i>
+<i><font color="silver"># Wake-on-LAN and shutdown script for f3s cluster (f0, f1, f2)</font></i>
<i><font color="silver"># MAC addresses</font></i>
F0_MAC=<font color="#808080">"e8:ff:1e:d7:1c:ac"</font> <i><font color="silver"># f0 (192.168.1.130)</font></i>
F1_MAC=<font color="#808080">"e8:ff:1e:d7:1e:44"</font> <i><font color="silver"># f1 (192.168.1.131)</font></i>
F2_MAC=<font color="#808080">"e8:ff:1e:d7:1c:a0"</font> <i><font color="silver"># f2 (192.168.1.132)</font></i>
+<i><font color="silver"># IP addresses</font></i>
+F0_IP=<font color="#808080">"192.168.1.130"</font>
+F1_IP=<font color="#808080">"192.168.1.131"</font>
+F2_IP=<font color="#808080">"192.168.1.132"</font>
+
+<i><font color="silver"># SSH user</font></i>
+SSH_USER=<font color="#808080">"paul"</font>
+
<i><font color="silver"># Broadcast address for your LAN</font></i>
BROADCAST=<font color="#808080">"192.168.1.255"</font>
@@ -13973,7 +13982,18 @@ wake() {
wol -i <font color="#808080">"$BROADCAST"</font> <font color="#808080">"$mac"</font>
}
-<b><u><font color="#000000">case</font></u></b> <font color="#808080">"${1:-all}"</font> <b><u><font color="#000000">in</font></u></b>
+shutdown_host() {
+ <b><u><font color="#000000">local</font></u></b> name=$1
+ <b><u><font color="#000000">local</font></u></b> ip=$2
+ echo <font color="#808080">"Shutting down $name ($ip)..."</font>
+ ssh -o ConnectTimeout=<font color="#000000">5</font> <font color="#808080">"$SSH_USER@$ip"</font> <font color="#808080">"doas poweroff"</font> <font color="#000000">2</font>&gt;/dev/null &amp;&amp; \
+ echo <font color="#808080">" ✓ Shutdown command sent to $name"</font> || \
+ echo <font color="#808080">" ✗ Failed to reach $name (already down?)"</font>
+}
+
+ACTION=<font color="#808080">"${1:-all}"</font>
+
+<b><u><font color="#000000">case</font></u></b> <font color="#808080">"$ACTION"</font> <b><u><font color="#000000">in</font></u></b>
f0) wake <font color="#808080">"f0"</font> <font color="#808080">"$F0_MAC"</font> ;;
f1) wake <font color="#808080">"f1"</font> <font color="#808080">"$F1_MAC"</font> ;;
f2) wake <font color="#808080">"f2"</font> <font color="#808080">"$F2_MAC"</font> ;;
@@ -13982,8 +14002,16 @@ wake() {
wake <font color="#808080">"f1"</font> <font color="#808080">"$F1_MAC"</font>
wake <font color="#808080">"f2"</font> <font color="#808080">"$F2_MAC"</font>
;;
+ shutdown|poweroff|down)
+ shutdown_host <font color="#808080">"f0"</font> <font color="#808080">"$F0_IP"</font>
+ shutdown_host <font color="#808080">"f1"</font> <font color="#808080">"$F1_IP"</font>
+ shutdown_host <font color="#808080">"f2"</font> <font color="#808080">"$F2_IP"</font>
+ echo <font color="#808080">""</font>
+ echo <font color="#808080">"✓ Shutdown commands sent to all machines."</font>
+ <b><u><font color="#000000">exit</font></u></b> <font color="#000000">0</font>
+ ;;
*)
- echo <font color="#808080">"Usage: $0 [f0|f1|f2|all]"</font>
+ echo <font color="#808080">"Usage: $0 [f0|f1|f2|all|shutdown]"</font>
<b><u><font color="#000000">exit</font></u></b> <font color="#000000">1</font>
;;
<b><u><font color="#000000">esac</font></u></b>
@@ -13992,27 +14020,34 @@ echo <font color="#808080">""</font>
echo <font color="#808080">"✓ WoL packets sent. Machines should boot in a few seconds."</font>
</pre>
<br />
-<span>After making the script executable with <span class='inlinecode'>chmod +x ~/bin/wol-f3s</span>, I can now wake the machines with simple commands:</span><br />
+<span>After making the script executable with <span class='inlinecode'>chmod +x ~/bin/wol-f3s</span>, I can now control the machines with simple commands:</span><br />
<br />
<!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
-<pre>[paul@earth]~% wol-f3s <i><font color="silver"># Wake all three</font></i>
-[paul@earth]~% wol-f3s f0 <i><font color="silver"># Wake only f0</font></i>
+<pre>[paul@earth]~% wol-f3s <i><font color="silver"># Wake all three</font></i>
+[paul@earth]~% wol-f3s f0 <i><font color="silver"># Wake only f0</font></i>
+[paul@earth]~% wol-f3s shutdown <i><font color="silver"># Shutdown all three via SSH</font></i>
</pre>
<br />
-<h2 style='display: inline' id='testing-wol'>Testing WoL</h2><br />
+<h2 style='display: inline' id='testing-wol-and-shutdown'>Testing WoL and Shutdown</h2><br />
<br />
-<span>To test the setup, I shutdown all three machines:</span><br />
+<span>To test the setup, I shutdown all three machines using the script&#39;s shutdown function:</span><br />
<br />
<!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
-<pre>[paul@earth]~% ssh paul@<font color="#000000">192.168</font>.<font color="#000000">1.130</font> <font color="#808080">"doas poweroff"</font>
-[paul@earth]~% ssh paul@<font color="#000000">192.168</font>.<font color="#000000">1.131</font> <font color="#808080">"doas poweroff"</font>
-[paul@earth]~% ssh paul@<font color="#000000">192.168</font>.<font color="#000000">1.132</font> <font color="#808080">"doas poweroff"</font>
+<pre>[paul@earth]~% wol-f3s shutdown
+Shutting down f0 (<font color="#000000">192.168</font>.<font color="#000000">1.130</font>)...
+ ✓ Shutdown <b><u><font color="#000000">command</font></u></b> sent to f0
+Shutting down f1 (<font color="#000000">192.168</font>.<font color="#000000">1.131</font>)...
+ ✓ Shutdown <b><u><font color="#000000">command</font></u></b> sent to f1
+Shutting down f2 (<font color="#000000">192.168</font>.<font color="#000000">1.132</font>)...
+ ✓ Shutdown <b><u><font color="#000000">command</font></u></b> sent to f2
+
+✓ Shutdown commands sent to all machines.
</pre>
<br />
<span>After waiting for them to fully power down (about 1 minute), I sent the WoL magic packets:</span><br />
@@ -14040,6 +14075,21 @@ Waking up e8:ff:1e:d7:1c:a0...
<br />
<span>This makes WoL very convenient - I can wake the cluster from anywhere in my home, whether I&#39;m on WiFi or ethernet.</span><br />
<br />
+<h2 style='display: inline' id='remote-shutdown-via-ssh'>Remote Shutdown via SSH</h2><br />
+<br />
+<span>While Wake-on-LAN handles powering on the machines remotely, I also added a shutdown function to the script for convenience. The <span class='inlinecode'>wol-f3s shutdown</span> command uses SSH to connect to each machine and execute <span class='inlinecode'>doas poweroff</span>, gracefully shutting them all down.</span><br />
+<br />
+<span>This is particularly useful for power saving - when I&#39;m done working with the cluster for the day, I can simply run:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>[paul@earth]~% wol-f3s shutdown
+</pre>
+<br />
+<span>And all three machines will shut down cleanly. The next time I need them, a simple <span class='inlinecode'>wol-f3s</span> command wakes them all back up. This combination makes the cluster very energy-efficient while maintaining quick access when needed.</span><br />
+<br />
<h2 style='display: inline' id='bios-configuration'>BIOS Configuration</h2><br />
<br />
<span>For WoL to work reliably, make sure to check the BIOS settings on each Beelink:</span><br />
diff --git a/index.gmi b/index.gmi
index b4444edb..ce116e23 100644
--- a/index.gmi
+++ b/index.gmi
@@ -1,6 +1,6 @@
# Hello!
-> This site was generated at 2026-01-11T10:37:38+02:00 by `Gemtexter`
+> This site was generated at 2026-01-11T10:46:34+02:00 by `Gemtexter`
Welcome to the foo.zone!
diff --git a/uptime-stats.gmi b/uptime-stats.gmi
index bd5d4645..acecbdb8 100644
--- a/uptime-stats.gmi
+++ b/uptime-stats.gmi
@@ -1,6 +1,6 @@
# My machine uptime stats
-> This site was last updated at 2026-01-11T10:37:38+02:00
+> This site was last updated at 2026-01-11T10:46:34+02:00
The following stats were collected via `uptimed` on all of my personal computers over many years and the output was generated by `guprecords`, the global uptime records stats analyser of mine.