<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>#!/bin/blog</title>
	<atom:link href="https://binblog.de/feed/" rel="self" type="application/rss+xml" />
	<link>https://binblog.de</link>
	<description>What goes up, must come down. Ask any system administrator.</description>
	<lastBuildDate>Wed, 10 Dec 2025 08:44:38 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>
	<item>
		<title>A late-stage intro to backups with restic</title>
		<link>https://binblog.de/2025/12/10/a-late-stage-intro-to-backups-with-restic/</link>
		
		<dc:creator><![CDATA[#!/bin/blog]]></dc:creator>
		<pubDate>Wed, 10 Dec 2025 08:39:00 +0000</pubDate>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[UNIX & Linux]]></category>
		<guid isPermaLink="false">https://binblog.de/?p=4791</guid>

					<description><![CDATA[Some keep talking about restic being the best personal backup system around, while I had to learn that for others, even experienced Linux and MacOS users, it's an absolute mystery. Here’s a usage scenario I suggest for restic beginners today.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Some keep talking about <a href="https://restic.readthedocs.io/en/stable/">restic</a> being the best personal backup system around, while I had to learn that for others, even experienced Linux and MacOS users, it&#8217;s an absolute mystery.</p>



<p class="wp-block-paragraph">Here&#8217;s a usage scenario I suggest for restic beginners today.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>The Repository Location</strong></p>



<p class="wp-block-paragraph"><a href="https://restic.readthedocs.io/en/stable/030_preparing_a_new_repo.html">The repository</a> is the location where restic will store the backup data.</p>



<p class="wp-block-paragraph">Let&#8217;s not go into local backups or where your particular system mounts removable USB devices. For users with experience on the command line, SFTP will be most approachable for their first off-system restic repository.</p>



<p class="wp-block-paragraph">The SFTP repository location for this example shall be:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
sftp:demouser@backupserver:/home/demouser/restic-repository
</pre></div>


<p class="wp-block-paragraph">I save this to <em>~/.config/restic/restic-url.txt </em>in my home directory.</p>



<p class="wp-block-paragraph">Remember to actually create this directory on the destination before initializing it as a repository.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>The Repository Password</strong></p>



<p class="wp-block-paragraph"><a href="https://words.filippo.io/restic-cryptography/">Repository encryption</a> is derived from the repository password. I have now mostly standardized on random passwords that I keep in a password manager. I save the random password to <em>~/.config/restic/restic-pw.txt</em></p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
openssl rand -hex 32 &gt; ~/.config/restic/restic-pw.txt
</pre></div>


<p class="wp-block-paragraph">(This file will contain a line break at the end, <a href="https://github.com/restic/restic/blob/6174c91042e1ad9158ce1fd40bdccfaa5ca37de6/internal/global/global.go#L206">which is ignored by restic</a>.)</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>Repository Initialization and first Backup</strong></p>



<p class="wp-block-paragraph"><strong>DO NOT PANIC </strong>before you&#8217;ve seen the next section.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
restic init \
  --repository-file ~/.config/restic/restic-url.txt \
  --password-file ~/.config/restic/restic-pw.txt
</pre></div>

<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
restic backup $HOME \
  --repository-file ~/.config/restic/restic-url.txt \
  --password-file ~/.config/restic/restic-pw.txt
</pre></div>


<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>Connecting the Dots</strong></p>



<p class="wp-block-paragraph">Restic&#8217;s extremely basic user interface frequently is in fact a bit of an obstacle in day-to-day-use:</p>



<ul class="wp-block-list">
<li><em>restic backup </em>requires to always be passed the <em>include </em>paths on the command line.</li>



<li>Same with <em>restic forget</em>, which requires the retention policy on the command line.</li>
</ul>



<p class="wp-block-paragraph">I configure restic&#8217;s repository through environment variables:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
# ~/.bashrc
export RESTIC_REPOSITORY_FILE=~/.config/restic/restic-url.txt
export RESTIC_PASSWORD_FILE=~/.config/restic/restic-pw.txt
</pre></div>


<p class="wp-block-paragraph">For invocations that require options, I create shell aliases:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
# ~/.bashrc
alias restic-backup=&quot;restic backup --exclude ./Downloads $HOME&quot;
alias restic-forget=&quot;restic forget --keep-last=10&quot;
alias restic-check=&quot;restic check --read-data-subset 1%&quot;
</pre></div>


<p class="wp-block-paragraph">With environment and aliases in place, <em>restic-backup </em>will back up without any further options, <em>restic-forget </em>will purge old backups and <em>restic-check </em>will check the integrity of a random subset of repository contents.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>Regular Restore</strong></p>



<p class="wp-block-paragraph">For casual backup browsing, <a href="https://github.com/emuell/restic-browser">restic-browser </a>does exist, but <code>restic mount ~/mnt </code>and a quick dive into <em>~/mnt/snapshots/latest </em>is my go-to approach on Linux.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>PANIC.txt</strong></p>



<p class="wp-block-paragraph">As with every backup, you MUST be aware of how to access it in case you need it, and in this case, the restic repository password.</p>



<p class="wp-block-paragraph">I keep instructions similar to this in my password manager&#8217;s text notes, along with the restic repository password itself:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
restic mount ~/mnt \
  --repo sftp:demouser@backupserver:/home/demouser/restic-repository
</pre></div>


<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>Final words</strong></p>



<p class="wp-block-paragraph">Bootstrapping <em>restic</em>, as it for some reason lacks any sort of configuration file, is a lot harder than it should be. In my work supporting enterprise Linux laptop users, I consistently had a very hard time providing reliable guidance for maintaining their backups. I consider my little <a href="https://github.com/mschmitt/drestic">drestic wrapper</a> a failure as well.</p>



<p class="wp-block-paragraph">The above is the bare minimum I can break things down to without straying away too far from stock <em>restic </em>(no wrapper script or shell functions), and with the minor tradeoff of creating the shell aliases.</p>



<p class="wp-block-paragraph">Have fun and remember to use a password manager. <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f60a.png" alt="😊" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph">For restic on Windows, have a look at <a href="https://binblog.de/2025/11/20/restic-on-windows-with-rest-server-on-linux/" data-type="post" data-id="4717">my previous post</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Restic (on Windows) with REST-server (on Linux)</title>
		<link>https://binblog.de/2025/11/20/restic-on-windows-with-rest-server-on-linux/</link>
		
		<dc:creator><![CDATA[#!/bin/blog]]></dc:creator>
		<pubDate>Thu, 20 Nov 2025 17:59:32 +0000</pubDate>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<guid isPermaLink="false">https://binblog.de/?p=4717</guid>

					<description><![CDATA[As I was intending to create a nice multi-client configuration for Restic&#8217;s REST-server, I found that Debian comes with all I needed. Note that this is a configuration that prioritizes automation and availability and at no point relies on interactive entering of passwords or passphrases or an ssh-/putty agent. You MUST however keep note of &#8230; <a href="https://binblog.de/2025/11/20/restic-on-windows-with-rest-server-on-linux/" class="more-link">Continue reading <span class="screen-reader-text">Restic (on Windows) with REST-server (on Linux)</span> <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">As I was intending to create a nice multi-client configuration for Restic&#8217;s REST-server, I found that Debian comes with all I needed.</p>



<p class="wp-block-paragraph">Note that this is a configuration that prioritizes automation and availability and at no point relies on interactive entering of passwords or passphrases or an ssh-/putty agent.</p>



<p class="wp-block-paragraph">You MUST however keep note of a) how to access your backup medium and b) the restic repository passphrase.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>REST-Server (on Linux)</strong></p>



<p class="wp-block-paragraph">For the BACKUP_DIR configuration in <em>/etc/default/restic-rest-server</em>, I&#8217;ll go with <em>/var/lib/restic-rest-server</em>:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
# lvcreate, mkfs, fstab, mount etc...
chown restic-rest-server /var/lib/restic-rest-server
</pre></div>


<p class="wp-block-paragraph">For good measure, I also add the <em>&#8211;private-repos </em>option in <em>/etc/default/restic-rest-server</em>, so every user will only be able to access repositories in the directory hierarchy matching their user name:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
# TCP or UNIX listen address.
#LISTEN = unix:/run/restic-rest-server
LISTEN = :8000

# Directory to store backups.
# Note: the server will not start unless this variable is defined.
#BACKUP_DIR = /srv/backups/
BACKUP_DIR = /var/lib/restic-rest-server

# Extra arguments to pass to the server. Run `restic-rest-server --help` to see
# available options. By default, basic authentication is enabled.
ARGS = &quot;\
  --htpasswd-file /etc/restic-rest-server/users.htpasswd \
  --private-repos \
&quot;
</pre></div>


<p class="wp-block-paragraph">An HTTP password for my user <em>mas </em>needs to be set and my user&#8217;s backup location created:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
htpasswd -B /etc/restic-rest-server/users.htpasswd mas
install -o restic-rest-server -d /var/lib/restic-rest-server/mas
</pre></div>


<p class="wp-block-paragraph"><em>restic-rest-server.service </em>can be started now.</p>



<p class="wp-block-paragraph">I&#8217;m lazy, so I didn&#8217;t configure TLS but configured a reverse proxy into a TLS web server that was already running:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
ProxyPass        /restic http://localhost:8000
ProxyPassReverse /restic http://localhost:8000
</pre></div>


<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>Restic (on Windows)</strong></p>



<p class="wp-block-paragraph">I have added the directory containing the <em>restic.exe </em>binary to the Windows PATH environment, and also maintain restic configuration as environment variables: </p>



<ul class="wp-block-list">
<li>The <strong>repository passphrase </strong>is in <em>restic-pw.txt</em>, </li>



<li>the <strong>URL for the repository </strong>in <em>restic-url.txt</em>, and </li>



<li>the <strong>list of files to back up </strong>in <em>restic-include.txt</em> (no environment for this one).</li>
</ul>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
RESTIC_REPOSITORY_FILE=C:/Users/mas/Apps/restic/restic-url.txt
RESTIC_PASSWORD_FILE=C:/Users/mas/Apps/restic/restic-pw.txt
</pre></div>


<p class="wp-block-paragraph">Contents of <em>restic-url.txt </em>resemble the following:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
rest:https://mas:***@backupserver/restic/mas/win11-mas/
</pre></div>


<p class="wp-block-paragraph">Now, I can initialize a repository. </p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
restic init
</pre></div>


<p class="wp-block-paragraph">Behold the first backup:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
restic --files-from c:/Users/mas/Apps/restic/restic-include.txt backup
</pre></div>


<p class="wp-block-paragraph">Note that while Windows has awful file system issues with files locked while open for reading, restic has the ability to create and work on a volume shadow copy on the fly, provided it runs with elevated privileges:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
restic --files-from c:/Users/mas/Apps/restic/restic-include.txt backup --use-fs-snapshot
</pre></div>


<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph">For running restic on a schedule, I use the operating system&#8217;s built-in Task Scheduler.</p>



<p class="wp-block-paragraph">Restic on Windows does NOT allow mounting the backups the ways it does on Linux. For browsing the backups on Windows, I therefore use <a href="https://github.com/emuell/restic-browser">Restic Browser</a> which just springs to life without any configuration, provided the environment variables are in place.</p>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Wo kommt eigentlich das Wasser her?</title>
		<link>https://binblog.de/2025/11/04/wo-kommt-eigentlich-das-wasser-her/</link>
		
		<dc:creator><![CDATA[#!/bin/blog]]></dc:creator>
		<pubDate>Tue, 04 Nov 2025 16:00:59 +0000</pubDate>
				<category><![CDATA[Bemerkenswertes]]></category>
		<category><![CDATA[infrastruktur]]></category>
		<category><![CDATA[kritis]]></category>
		<category><![CDATA[trinkwasser]]></category>
		<category><![CDATA[wasser]]></category>
		<guid isPermaLink="false">https://binblog.de/?p=4639</guid>

					<description><![CDATA[Tja. Weiß man doch. Oder? &#8220;Fällt bei Stromausfall eigentlich auch das Wasser aus?&#8221; fragte jemand im Kontext des Stromausfall in Spanien und Portugal im April 2025. Soviel wusste ich schonmal: Das Trinkwasser wird aktiv in die bekannten Hochbehälter gepumpt, und spätestens sobald die leer sind, fällt es aus. Vermutlich ist das auch gut so, denn &#8230; <a href="https://binblog.de/2025/11/04/wo-kommt-eigentlich-das-wasser-her/" class="more-link">Continue reading <span class="screen-reader-text">Wo kommt eigentlich das Wasser her?</span> <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><strong>Tja. Weiß man doch. Oder?</strong></p>



<p class="wp-block-paragraph"><em>&#8220;Fällt bei Stromausfall eigentlich auch das Wasser aus?&#8221;</em> fragte jemand im Kontext des <a href="https://de.wikipedia.org/wiki/Stromausfall_auf_der_Iberischen_Halbinsel_2025" target="_blank" rel="noreferrer noopener">Stromausfall in Spanien und Portugal im April 2025</a>.</p>



<p class="wp-block-paragraph">Soviel wusste ich schonmal: Das Trinkwasser wird aktiv in die bekannten Hochbehälter gepumpt, und spätestens sobald die leer sind, fällt es aus. Vermutlich ist das auch gut so, denn die Kläranlage funktioniert bei Stromausfall schließlich ebenfalls nicht.</p>



<p class="wp-block-paragraph">Ich habe das Thema zunächst vergessen und als ich dann mal wieder am Hochbehälter spazierenging, war die Frage erneut da: Wo kommt eigentlich das Wasser her?</p>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><a href="https://binblog.de/wp-content/uploads/2025/11/25-05-20-09-18-45-3591-scaled.jpg"><img fetchpriority="high" decoding="async" width="1024" height="768" data-id="4755" src="https://binblog.de/wp-content/uploads/2025/11/25-05-20-09-18-45-3591-1024x768.jpg" alt="Armaturen auf der Hauptleitung 1.1" class="wp-image-4755" srcset="https://binblog.de/wp-content/uploads/2025/11/25-05-20-09-18-45-3591-1024x768.jpg 1024w, https://binblog.de/wp-content/uploads/2025/11/25-05-20-09-18-45-3591-300x225.jpg 300w, https://binblog.de/wp-content/uploads/2025/11/25-05-20-09-18-45-3591-768x576.jpg 768w, https://binblog.de/wp-content/uploads/2025/11/25-05-20-09-18-45-3591-1536x1152.jpg 1536w, https://binblog.de/wp-content/uploads/2025/11/25-05-20-09-18-45-3591-2048x1536.jpg 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>
</figure>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>Die wenigen Fakten</strong></p>



<p class="wp-block-paragraph">An den aktiven und <a href="https://igwasser.de/" target="_blank" rel="noreferrer noopener">historischen Hochbehältern hier in Pohlheim</a> stehen Schautafeln, die aber in erster Linie die (gar nicht mal uninteressante) Historie beleuchten und nicht so wirklich auf die aktuellen Gegebenheiten eingehen. Ein paar Eckpunkte lassen sich hier aber ablesen:</p>



<ul class="wp-block-list">
<li>Das Wasser kommt seit den 1960er Jahren nicht mehr aus Quellen vor Ort, sondern aus dem 50 km entfernten <a href="https://www.zmw.de/wasser/wasserwerke/wasserwerk-stadtallendorf/" target="_blank" rel="noreferrer noopener">Wasserwerk Stadtallendorf</a>.</li>



<li>Die Leitung in meine Stadt zweigt an einem bekannten Industriebetrieb mitten im Wald von der Fernleitung ab.</li>
</ul>



<p class="wp-block-paragraph">Das sind erste Kristallisationspunkte, an denen man andocken kann.</p>



<p class="wp-block-paragraph">Umfangreiches Klicken brachte einen <a href="https://www.zmw.de/pdf/ewp/downloads/ewp-zmw-schemaplan.pdf?cid=1yv" target="_blank" rel="noreferrer noopener">Netzplan des Zweckverbands Mittelhessischer Wasserwerke</a> zutage, von dem ich lernte, dass Wasserleitungen Nummern zur Identifikation haben, und dass es Wasserleitungen gibt, die vom Zweckverband betrieben werden und welche, die von der Stadt betrieben werden. Mich interessierten vor allem die vom Zweckverband betriebenen Fernleitungen, die jeweils an der Stadgrenze enden, ab wo es mit Hausanschlüssen und Hydranten weitergeht.</p>



<p class="wp-block-paragraph">Auf dem Netzplan tauchten auch zum ersten mal die von mir in ihrer Existenz lediglich vermuteten Pumpwerke, im Fachjargon Druckerhöhungsanlagen, auf. Eine kleine, klar zum älteren aber noch aktiven Hochbehälter gehörende, die das Wasser in den höher gelegenen neuen Hochbehälter pumpt, und eine größere irgendwo im Süden von Gießen.</p>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-2 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><a href="https://binblog.de/wp-content/uploads/2025/11/25-05-30-10-49-41-3632-scaled.jpg"><img decoding="async" width="1024" height="768" data-id="4773" src="https://binblog.de/wp-content/uploads/2025/11/25-05-30-10-49-41-3632-1024x768.jpg" alt="Hinweis auf einen Düker der Hauptleitung 2.7 unter der Lahn" class="wp-image-4773" srcset="https://binblog.de/wp-content/uploads/2025/11/25-05-30-10-49-41-3632-1024x768.jpg 1024w, https://binblog.de/wp-content/uploads/2025/11/25-05-30-10-49-41-3632-300x225.jpg 300w, https://binblog.de/wp-content/uploads/2025/11/25-05-30-10-49-41-3632-768x576.jpg 768w, https://binblog.de/wp-content/uploads/2025/11/25-05-30-10-49-41-3632-1536x1152.jpg 1536w, https://binblog.de/wp-content/uploads/2025/11/25-05-30-10-49-41-3632-2048x1536.jpg 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>
</figure>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>Zeichen lesen</strong></p>



<p class="wp-block-paragraph">Weiß man erst einmal, dass die Leitungen Nummern haben, erkennt man auf den kleinen blauen Wasserschildern, mit denen alle Armaturen oberirdisch beschriftet sind, leicht eine organisatorische Nummer, die immer die Nummer der jeweiligen Leitung beinhaltet. Mit dem eher abstrakten Netzplan bewaffnet, konnte ich dann relativ gut ausschließen, was links und was rechts der Leitung liegt, Annahmen über den weiteren Verlauf der Leitung treffen und immer mehr unterirdische Standorte identifizieren, die Rückschluss auf den Leitungsverlauf erlauben. Mit etwas numerologischem Gefühl kann man anhand zweier Nummern auch bewerten, ob man dazwischen noch einen Standort übersehen hat.</p>



<p class="wp-block-paragraph">Die Kürzel der Wasserschilder hinsichtlich des Typs der jeweiligen Armatur sind mir leider bis zuletzt ein Rätsel geblieben, denn es existiert hier vor Ort *keine* Schnittmenge (also wirklich Null) mit dem, <a href="https://de.wikipedia.org/wiki/Hinweisschilder_zu_Stra%C3%9Feneinbauten#Hinweisschilder_f%C3%BCr_Wasser-Versorgungsleitungen">was jemand auf Wikipedia dazu aufgeschrieben hat</a>.</p>



<figure class="wp-block-table"><table class="has-fixed-layout"><tbody><tr><td><strong>Kürzel</strong></td><td><strong>Bedeutung</strong></td><td><strong>Overpass Turbo Suche</strong></td></tr><tr><td>S</td><td>Schieber</td><td><a href="https://overpass-turbo.eu/s/25bu" target="_blank" rel="noreferrer noopener">https://overpass-turbo.eu/s/25bu</a></td></tr><tr><td>SS</td><td>Schieberschacht(?) &#8211; Es ist hier immer ein Einstieg vorhanden.</td><td><a href="https://overpass-turbo.eu/s/25bm" target="_blank" rel="noreferrer noopener">https://overpass-turbo.eu/s/25bm</a></td></tr><tr><td>BE</td><td>Belüftung (und Entlüftung?)</td><td><a href="https://overpass-turbo.eu/s/25bn" target="_blank" rel="noreferrer noopener">https://overpass-turbo.eu/s/25bn</a></td></tr><tr><td>EN</td><td>Unbekannt</td><td><a href="https://overpass-turbo.eu/s/25bo" target="_blank" rel="noreferrer noopener">https://overpass-turbo.eu/s/25bo</a></td></tr><tr><td>MS</td><td>Unbekannt</td><td><a href="https://overpass-turbo.eu/s/25bp" target="_blank" rel="noreferrer noopener">https://overpass-turbo.eu/s/25bp</a></td></tr><tr><td>VB</td><td>Unbekannt, ausschließlich an großen Abzweigen der Hauptleitung 1.1 gesehen.</td><td><a href="https://overpass-turbo.eu/s/25bq" target="_blank" rel="noreferrer noopener">https://overpass-turbo.eu/s/25bq</a></td></tr><tr><td>AK</td><td>Absperrklappe(?)</td><td><a href="https://overpass-turbo.eu/s/25br" target="_blank" rel="noreferrer noopener">https://overpass-turbo.eu/s/25br</a></td></tr><tr><td>DÜ</td><td><a href="https://de.wikipedia.org/wiki/D%C3%BCker">Düker</a> unter der Lahn auf der Hauptleitung 2.7</td><td><a href="https://overpass-turbo.eu/s/25bs" target="_blank" rel="noreferrer noopener">https://overpass-turbo.eu/s/25bs</a></td></tr><tr><td></td><td></td><td></td></tr></tbody></table></figure>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-3 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><a href="https://binblog.de/wp-content/uploads/2025/11/25-06-13-16-06-22-3687-scaled.jpg"><img decoding="async" width="768" height="1024" data-id="4761" src="https://binblog.de/wp-content/uploads/2025/11/25-06-13-16-06-22-3687-768x1024.jpg" alt="Armaturen auf der Hauptleitung 1.5" class="wp-image-4761" srcset="https://binblog.de/wp-content/uploads/2025/11/25-06-13-16-06-22-3687-768x1024.jpg 768w, https://binblog.de/wp-content/uploads/2025/11/25-06-13-16-06-22-3687-225x300.jpg 225w, https://binblog.de/wp-content/uploads/2025/11/25-06-13-16-06-22-3687-1152x1536.jpg 1152w, https://binblog.de/wp-content/uploads/2025/11/25-06-13-16-06-22-3687-1536x2048.jpg 1536w, https://binblog.de/wp-content/uploads/2025/11/25-06-13-16-06-22-3687-scaled.jpg 1920w" sizes="(max-width: 768px) 100vw, 768px" /></a></figure>
</figure>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>Exkursionen</strong></p>



<p class="wp-block-paragraph">Nachdem die Umgebung des Hochbehälters zu Fuß erkundet war, gab es keine Ausreden mehr, und es musste mit dem Fahrrad querfeldein gehen.</p>



<p class="wp-block-paragraph">Bei dieser Spurensuche hat sich eine ganz wichtige Grundregel entwickelt: Die Leute vom Wasserwerk wollen und müssen mit ihrem blauen Werkstattwagen überall direkt ran. Jeder einzelne Standort, den ich identifiziert habe, ist (wenn auch nicht öffentlich) mit einem nicht geländegängigen Auto anfahrbar. Auf einem kaum passierbaren Trail mitten in der Wildnis wird man niemals Wasserarmaturen finden. </p>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-4 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><a href="https://binblog.de/wp-content/uploads/2025/11/25-06-13-16-28-53-3690-3-scaled.jpg"><img loading="lazy" decoding="async" width="1024" height="768" data-id="4765" src="https://binblog.de/wp-content/uploads/2025/11/25-06-13-16-28-53-3690-3-1024x768.jpg" alt="Hinweisschilder auf eher selten vorzufindende innerörtliche Armaturen des Zweckverbands" class="wp-image-4765" srcset="https://binblog.de/wp-content/uploads/2025/11/25-06-13-16-28-53-3690-3-1024x768.jpg 1024w, https://binblog.de/wp-content/uploads/2025/11/25-06-13-16-28-53-3690-3-300x225.jpg 300w, https://binblog.de/wp-content/uploads/2025/11/25-06-13-16-28-53-3690-3-768x576.jpg 768w, https://binblog.de/wp-content/uploads/2025/11/25-06-13-16-28-53-3690-3-1536x1152.jpg 1536w, https://binblog.de/wp-content/uploads/2025/11/25-06-13-16-28-53-3690-3-2048x1536.jpg 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>
</figure>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>Verdatung</strong></p>



<p class="wp-block-paragraph">Jeder hat auf Openstreetmap schon die eingetragenen Hochspannungstrassen gesehen. Wasserleitungen sind dagegen absolut exotisch. Hydranten sind vielleicht kartiert, Schieber eher nicht, Leitungsverläufe schon gar nicht. Eine Ausnahme davon ist <a href="https://openinframap.org/#12.62/50.32543/8.89175/A,B,L,W" target="_blank" rel="noreferrer noopener">Florstadt in der Wetterau, wo die Feuerwehr die innerörtlichen Leitungsverläufe kartiert hat</a>.</p>



<p class="wp-block-paragraph">Ich habe also angefangen, mir ein paar der dünn gesäten Beispiele zu suchen, das ganze mit dem OSM-Wiki abgeglichen und angefangen, wie folgt zu taggen:</p>



<p class="wp-block-paragraph">Armaturen</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
diameter=x
operator=ZMW
pipeline=valve
ref=x.y
substance=water
note=x (Kürzel und Durchmesserangabe des Schilds)
</pre></div>


<p class="wp-block-paragraph">Leitungen</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
name=ZMW x.y
operator=ZMW
ref=x.y
waterway=pressurized
man_made=pipeline
substance=water
location=underground
layer=-1
</pre></div>


<p class="wp-block-paragraph">Die Gesamtheit aus Teilstücken und Armaturen als Relation</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
layer=-1
man_made=pipeline
ref=z.y
name=ZMW x.y
substance=water
type=waterway
waterway=pressurised
</pre></div>


<p class="wp-block-paragraph">Hydranten habe ich nur in Ausnahmefällen ergänzt:</p>



<ul class="wp-block-list">
<li>Ganz fehlende Hydranten auf Hauptleitungen aufgenommen</li>



<li>Gegebenenfalls <code>note=Blauer Rand</code> für Hydranten, die nicht ohne weiteres von der Feuerwehr zur Wasserentnahme benutzt werden dürfen.</li>



<li>Falschzuordnung Unter-/Überflurhydrant berichtigt</li>



<li>Wenn ergänzt wurde, dann auch Durchmesser und Referenznummer dazu.</li>
</ul>



<p class="wp-block-paragraph">Hier die von mir kartierten Relationen:</p>



<ul class="wp-block-list">
<li><a href="https://www.openstreetmap.org/relation/19134846" target="_blank" rel="noreferrer noopener">ZMW 1.1</a>, die aus Richtung Wetzlar kommende und östlich von Gießen verlaufende Fernleitung nach Stadtallendorf</li>



<li><a href="https://www.openstreetmap.org/relation/19193120" target="_blank" rel="noreferrer noopener">ZMW 2.7</a>, die von ZMW 1.1 abzweigende westlich von Gießen verlaufende Fernleitung nach Stadtallendorf</li>



<li><a href="https://www.openstreetmap.org/relation/19145781" target="_blank" rel="noreferrer noopener">ZMW 5.9</a>, die von ZMW 1.1 abzweigende Hauptleitung zu meinem Wohnort</li>



<li><a href="https://www.openstreetmap.org/relation/19111202" target="_blank" rel="noreferrer noopener">ZMW 3.14</a>, eine zu einer südlich gelegenen Kommune weiterführende Leitung, die auch die beiden Hochbehälter verbindet</li>



<li><a href="https://www.openstreetmap.org/relation/19134841" target="_blank" rel="noreferrer noopener">ZMW 3.15</a>, eine redundante Leitung zwischen den Hochbehältern</li>



<li><a href="https://www.openstreetmap.org/relation/19120650" target="_blank" rel="noreferrer noopener">ZMW 4.15</a>, eine zu den östlichen Stadtteilen führende Leitung</li>



<li><a href="https://www.openstreetmap.org/relation/19120651" target="_blank" rel="noreferrer noopener">ZMW 4.16</a>, eine zu den südlichen Stadtteilen führende Leitung</li>



<li><a href="https://www.openstreetmap.org/relation/19211719" target="_blank" rel="noreferrer noopener">ZMW 4.18</a>, eine zu den nördlichen Stadtteilen führende Leitung, von der ich vermute, dass sie auch die Anbindung der sogenannten &#8220;Hochdruckzone&#8221; der Stadt ist.</li>



<li><a href="https://www.openstreetmap.org/relation/19211767" target="_blank" rel="noreferrer noopener">ZMW 1.5</a> in Richtung Lich hat mich nur interessiert, weil ihre Druckerhöhungsanlage so prominent im Wald zu sehen ist</li>
</ul>



<p class="wp-block-paragraph">Des weiteren:</p>



<ul class="wp-block-list">
<li><a href="https://www.openstreetmap.org/way/1392748666">SWG Querverbindung ZMW 1.1</a> (Arbeitstitel), die die ums Stadgebiet herumführende ZMW 1.1 quer vermascht</li>



<li><a href="https://www.openstreetmap.org/way/1392915524" data-type="link" data-id="https://www.openstreetmap.org/way/1392915524">SWG Transportleitung Schiffenberg</a></li>
</ul>



<p class="wp-block-paragraph">Leitungsverläufe wurden grundsätzlich nur als direkte Verbindungen zwischen überirdisch gefundenen Armaturen kartiert, außer es war eine zweifelsfreie Aussage über den Verlauf möglich, wie etwa bei ZMW 1.5 auf der auffälligen Schneise im Stadtwald, sowie der SWG-Querverbindung entlang der Bahngleise und entlang des Aulweg, an dessen Kreuzung mit dem Wartweg <a href="https://www.giessener-anzeiger.de/stadt-giessen/giessen-enormer-schaden-an-grosser-wasserleitung-93754312.html" data-type="link" data-id="https://www.giessener-anzeiger.de/stadt-giessen/giessen-enormer-schaden-an-grosser-wasserleitung-93754312.html">zum Zeitpunkt meiner Erkundungen genau diese 600er Leitung der Querverbindung gebrochen war</a>.</p>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-5 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><a href="https://binblog.de/wp-content/uploads/2025/11/25-06-22-10-59-16-3702-2-scaled.jpg"><img loading="lazy" decoding="async" width="1024" height="768" data-id="4772" src="https://binblog.de/wp-content/uploads/2025/11/25-06-22-10-59-16-3702-2-1024x768.jpg" alt="Typische unbeschilderte Armaturen auf der Stadtwerke-Querverbindung" class="wp-image-4772" srcset="https://binblog.de/wp-content/uploads/2025/11/25-06-22-10-59-16-3702-2-1024x768.jpg 1024w, https://binblog.de/wp-content/uploads/2025/11/25-06-22-10-59-16-3702-2-300x225.jpg 300w, https://binblog.de/wp-content/uploads/2025/11/25-06-22-10-59-16-3702-2-768x576.jpg 768w, https://binblog.de/wp-content/uploads/2025/11/25-06-22-10-59-16-3702-2-1536x1152.jpg 1536w, https://binblog.de/wp-content/uploads/2025/11/25-06-22-10-59-16-3702-2-2048x1536.jpg 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>
</figure>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>Druckerhöhungsanlage</strong>n</p>



<p class="wp-block-paragraph">Die Schnittstelle zwischen ZMW 1.1, ihrer Querverbindung, und ZMW 2.7 hat mir ein paar Tage lang ziemliche Rätsel aufgegeben, weil sie sich an einem komplett unübersichtlichen gordischen Knoten zwischen Bahnlinien und mehreren autobahnänlichen Bundesstraßen befinden musste. Ich konnte das sehr unauffällige Gebäude schließlich zweifelsfrei identifizieren, habe es aber in der Karte nicht getaggt.</p>



<p class="wp-block-paragraph">Die <a href="https://maps.app.goo.gl/Ba9Nj4qEUzPPqC1L8" data-type="link" data-id="https://maps.app.goo.gl/Ba9Nj4qEUzPPqC1L8">Druckerhöhungsanlage am Abzweig der ZMW 1.5 von der ZMW 1.1 </a>steht prominent im Wald und ist vor Ort als solche beschriftet.</p>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-6 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><a href="https://binblog.de/wp-content/uploads/2025/11/25-06-06-17-47-51-3666-1-scaled.jpg"><img loading="lazy" decoding="async" width="1024" height="768" data-id="4775" src="https://binblog.de/wp-content/uploads/2025/11/25-06-06-17-47-51-3666-1-1024x768.jpg" alt="Abzweig der (von mir sogenannten) Querverbindung 1.1 von der Hauptleitung 1.1." class="wp-image-4775" srcset="https://binblog.de/wp-content/uploads/2025/11/25-06-06-17-47-51-3666-1-1024x768.jpg 1024w, https://binblog.de/wp-content/uploads/2025/11/25-06-06-17-47-51-3666-1-300x225.jpg 300w, https://binblog.de/wp-content/uploads/2025/11/25-06-06-17-47-51-3666-1-768x576.jpg 768w, https://binblog.de/wp-content/uploads/2025/11/25-06-06-17-47-51-3666-1-1536x1152.jpg 1536w, https://binblog.de/wp-content/uploads/2025/11/25-06-06-17-47-51-3666-1-2048x1536.jpg 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>
</figure>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>Wie weiter</strong></p>



<p class="wp-block-paragraph">Ein spannender Einblick in Infrastruktur, von der man kaum etwas weiß und sieht, geht zu Ende. Unauffälligen Grüngürteln in Neubaugebieten und vegetationsfreien Schneisen im Wald messe ich plötzlich Bedeutung als potenziellem und vermutlichem Trassenverlauf zu.</p>



<p class="wp-block-paragraph">Falls mich jemand auf Insiderbasis in die Geheimnisse der Schilderkürzel einweihen und zu einer Besichtigungstour in Wasserwerk und Hochbehälter einladen möchte: Kontaktmöglichkeiten finden sich im Impressum. <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Too Good To #016</title>
		<link>https://binblog.de/2025/10/17/too-good-to-016/</link>
		
		<dc:creator><![CDATA[#!/bin/blog]]></dc:creator>
		<pubDate>Fri, 17 Oct 2025 10:25:40 +0000</pubDate>
				<category><![CDATA[Allgemein]]></category>
		<guid isPermaLink="false">https://binblog.de/?p=4680</guid>

					<description><![CDATA[Today: IPv6 with EUI64, kernel panic evasion, Seahorse CLI interaction. IPv6 with EUI64 (the thing with the hardware address) in NetworkManager Auto-prevent crashy service from starting We have a commercial piece of software here that can cause an irrecoverable kernel panic when starting, by loading a proprietary kernel module. Detect whether the system was previously &#8230; <a href="https://binblog.de/2025/10/17/too-good-to-016/" class="more-link">Continue reading <span class="screen-reader-text">Too Good To #016</span> <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><strong>Today: IPv6 with EUI64, kernel panic evasion, Seahorse CLI interaction.</strong></p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>IPv6 with EUI64 (the thing with the hardware address) in NetworkManager</strong></p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
# nmcli connection modify &quot;Wired connection 1&quot; ipv6.ip6-privacy 0
# nmcli connection modify &quot;Wired connection 1&quot; ipv6.addr-gen-mode eui64
</pre></div>


<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>Auto-prevent crashy service from starting</strong></p>



<p class="wp-block-paragraph">We have a commercial piece of software here that can cause an irrecoverable kernel panic when starting, by loading a proprietary kernel module. Detect whether the system was previously shut down cleanly and fail the service, if not:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
# /etc/systemd/system/fouled-up.service.d/prevent.conf

&#x5B;Service]
ExecStartPre=echo &#039;Analyzing journal for clean shutdown on previous boot.&#039;
ExecStartPre=journalctl -b -1 -g &#039;Shutting down.&#039; _COMM=systemd
</pre></div>


<ul class="wp-block-list">
<li><code>ExecStartPre </code>&#8211; Fail the unit if this command fails.</li>



<li><code>journalctl -b -1</code> &#8211;  Look at entries from previous boot.</li>



<li><code>-g 'Shutting down.'</code> &#8211; Grep for entries containing this string. Returns non-zero if not found.</li>



<li><code>_COMM=systemd </code>&#8211; Match entries from this command only.</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>Gnome session keyring / Seahorse CLI interaction</strong></p>



<p class="wp-block-paragraph">Nobody seems to really know how this works. I do however have an application password that I want to keep in the Gnome session keyring.</p>



<p class="wp-block-paragraph">The documentation for <em>secret-tool </em>references attributes/keys and values, but there seem to be no predefined names or convention for this.</p>



<p class="wp-block-paragraph">How to save and retrieve a password in the Gnome session keyring:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
# apt-get install libsecret-tools
$ printf &#039;xxsecretxx&#039; |
  secret-tool store --label=&#039;my application secret&#039; application theapplication
$ secret-tool lookup application theapplication
xxsecretxx
</pre></div>


<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Benchmarking ratarmount</title>
		<link>https://binblog.de/2025/08/14/benchmarking-ratarmount/</link>
		
		<dc:creator><![CDATA[#!/bin/blog]]></dc:creator>
		<pubDate>Thu, 14 Aug 2025 14:51:01 +0000</pubDate>
				<category><![CDATA[UNIX & Linux]]></category>
		<category><![CDATA[gzip]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[ratarmount]]></category>
		<guid isPermaLink="false">https://binblog.de/?p=4694</guid>

					<description><![CDATA[Ratarmount is an excellent tool for mounting archives as filesystems, and I use it a lot. The ratarmount README suggests to prefer indexed tar.xz archives created using pixz for performance, so let's see what's the best compression to use.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><a href="https://github.com/mxmlnkn/ratarmount">Ratarmount</a> is an excellent tool for mounting archives as filesystems, and I use it a <strong>lot</strong>. Mostly for union-mounting <em>tar.xz</em> telemetry bundles created by <a href="http://sos.rtfd.org/">sos report</a>. The <a href="https://github.com/mxmlnkn/ratarmount/blob/master/README.md">ratarmount README</a> suggests to prefer indexed <em>tar.xz</em> archives created using <a href="https://github.com/vasi/pixz">pixz</a> for performance, so let&#8217;s see what&#8217;s the best compression to use.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>TL;DRs</strong></p>



<ul class="wp-block-list">
<li>On huge archives, <em>tar.gz </em>is always fast and fastest, no optimization required.</li>



<li>Best to recompress <em>tar.xz</em> to <em>tar.gz </em>for best performance. Recompressing with <em>pixz </em>yields an improvement, but not as much as <em>gzip</em>.</li>



<li>On tiny archives close to the host&#8217;s RAM size, performance is hard to predict and may put <em>gzip </em>behind.</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>The &#8220;Backup&#8221; use-case</strong></p>



<p class="wp-block-paragraph">For my test to have a bit of a sizable workload, I pick a reasonably-sized <em>tar.gz</em>, a remnant historical backup of a long-gone server:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
-rw-r----- 1 root root 1.7G Aug  6 10:16 example.tar.gz
</pre></div>


<p class="wp-block-paragraph">This is stored on a RAID-1 of 7200 rpm hard drives, which should amplify all seek performance issues. 8 GB RAM, 6 physical CPU cores, 12 threads.</p>



<p class="wp-block-paragraph">I prepare a list of 1000 random files from the archive that I&#8217;ll be reading from the mounted archive.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
tar ztf example.tar.gz | egrep -v &#039;(/$|(sys|proc|dev|run))&#039; | shuf | head -1000 &gt; example.list
</pre></div>


<p class="wp-block-paragraph">Now, I mount the <em>tar.gz </em>for my baseline measurement.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
umount ./mnt; ratarmount example.tar.gz ./mnt
time xargs -I{} md5sum ./mnt/{} &amp;lt; example.list
...
real    0m13.974s
user    0m1.178s
sys     0m0.984s
</pre></div>


<p class="wp-block-paragraph">I recompress the <em>tar </em>from <em>gzip </em>to <em>pixz </em>and measure again:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; quick-code: true; notranslate">
gzip -dc example.tar.gz | pixz &gt; example.tar.pxz
umount ./mnt; ratarmount example.tar.pxz ./mnt
time xargs -I{} md5sum ./mnt/{} &amp;lt; example.list
...
real    0m57.408s
user    0m1.216s
sys     0m0.904s
</pre></div>


<p class="wp-block-paragraph">Multiple times slower! Back to <em>ratarmount</em>&#8216;s <em>README</em>: <em>&#8220;In contrast to bzip2 and gzip compressed files, true seeking on XZ and ZStandard files is only possible at block or frame boundaries.&#8221;</em> &#8211; <strong>Are you telling me <em>gzip </em>is not the issue and only naively compressed <em>xz </em>is? </strong>A quick recompress using vanilla <em>xz </em>and a comparison of that to the <em>pixz </em>compressed archive:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
gzip -dc example.tar.gz | xz --threads=$(nproc) &gt; example.tar.xz
umount ./mnt; ratarmount example.tar.xz ./mnt
time xargs -I{} md5sum ./mnt/{} &amp;lt; example.list
...
real    1m33.549s
user    0m1.109s
sys     0m0.838s
</pre></div>


<p class="wp-block-paragraph">Indeed a noticable, although not huge, penalty compared to <em>pixz</em>. Now that I&#8217;m here and wasted this much time, a final measurement using <em>bzip2</em>:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
gzip -dc example.tar.gz | bzip2 &gt; example.tar.bz2
umount ./mnt; ratarmount example.tar.bz2 ./mnt
time xargs -I{} md5sum ./mnt/{} &amp;lt; example.list
...
real    0m44.410s
user    0m1.301s
sys     0m1.164s
</pre></div>


<p class="wp-block-paragraph">So <em>ratarmount </em>handles <em>bzip2 </em>around the same speed as <em>xz </em>created by <em>pixz</em>.</p>



<p class="wp-block-paragraph"><em>Gzip </em>is always fastest, even without any special treatment, and I assume this is because multi-threaded <a href="https://github.com/mxmlnkn/rapidgzip">rapidgzip</a> literally is ratarmount&#8217;s sister project.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>The &#8220;Telemetry&#8221; use-case</strong></p>



<p class="wp-block-paragraph">Back to my tiny <em>sosreport </em>files in <em>tar.xz </em>format, still on the 7200-rpm HDD system. For consistency, I&#8217;ll use the same <em>md5sum </em>benchmark on 1000 archive members as above.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
ls -lh sosreport.tar.xz
-rw------- 1 root root 9.3M Aug 14 16:07 sosreport.tar.xz
tar Jtf sosreport.tar.xz | egrep -v &#039;(/$|(sys|proc|dev|run))&#039; | shuf | head -1000 &gt; sosreport.list
umount ./mnt; ratarmount sosreport.tar.xz ./mnt
time xargs -I{} md5sum ./mnt/{} &amp;lt; sosreport.list
...
real    0m4.979s
user    0m0.940s
sys     0m0.625s
</pre></div>


<p class="wp-block-paragraph">A conversion to <em>pixz</em>:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
xz -dc sosreport.tar.xz | pixz &gt; sosreport.tar.pxz
umount ./mnt; ratarmount sosreport.tar.pxz ./mnt
time xargs -I{} md5sum ./mnt/{} &amp;lt; sosreport.list
...
real    0m6.847s
user    0m0.829s
sys     0m0.553s
</pre></div>


<p class="wp-block-paragraph">And a conversion to <em>tar.gz</em>:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
xz -dc sosreport.tar.xz | gzip &gt; sosreport.tar.gz
umount ./mnt; ratarmount sosreport.tar.gz ./mnt
time xargs -I{} md5sum ./mnt/{} &amp;lt; sosreport.list
...
real    0m13.202s
user    0m0.918s
sys     0m0.598s
</pre></div>


<p class="wp-block-paragraph"><em>gzip </em>is suddenly slower here, and I believe it&#8217;s because the file turned out more than 50% larger than the <em>xz </em>versions, both of which are close to the hosts&#8217;s RAM size of 8 GB:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
-rw-r--r-- 1 root root  14M Aug 14 16:17 sosreport.tar.gz
-rw-r--r-- 1 root root 7.8M Aug 14 16:16 sosreport.tar.pxz
-rw------- 1 root root 9.3M Aug 14 16:07 sosreport.tar.xz
</pre></div>


<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph">My initial notes on how to install <em>ratarmount </em>in a <em>python virtualenv </em>are documented in <a href="https://binblog.de/2025/02/21/too-good-to-0013/" data-type="post" data-id="4545">Too good to #0013</a>.</p>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Too Good To #015</title>
		<link>https://binblog.de/2025/07/16/too-good-to-015/</link>
		
		<dc:creator><![CDATA[#!/bin/blog]]></dc:creator>
		<pubDate>Wed, 16 Jul 2025 07:49:38 +0000</pubDate>
				<category><![CDATA[Too Good To]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[toogoodto]]></category>
		<guid isPermaLink="false">https://binblog.de/?p=4615</guid>

					<description><![CDATA[The terrible benchmarks edition. A number of ad-hoc benchmarks I collected over time. They are terrible. Use at your own risk. Not only your hardware may be in danger, but most of all, your reputation. CPU (create high load) Note this is GNU parallel (apt-get install parallel), not the 100% incompatible moreutils parallel. See parallel_alternatives(7); &#8230; <a href="https://binblog.de/2025/07/16/too-good-to-015/" class="more-link">Continue reading <span class="screen-reader-text">Too Good To #015</span> <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">The terrible benchmarks edition.</p>



<p class="wp-block-paragraph">A number of ad-hoc benchmarks I collected over time. They are terrible.</p>



<p class="wp-block-paragraph">Use at your own risk. Not only your hardware may be in danger, but most of all, your reputation.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>CPU (create high load)</strong></p>



<p class="wp-block-paragraph">Note this is <a href="https://www.gnu.org/software/parallel/">GNU parallel</a> (<code>apt-get install parallel</code>), not the 100% incompatible <a href="https://manpages.debian.org/stable/moreutils/parallel.1.en.html" data-type="link" data-id="https://manpages.debian.org/stable/moreutils/parallel.1.en.html">moreutils parallel</a>.</p>



<p class="wp-block-paragraph">See <a href="https://www.gnu.org/software/parallel/parallel_alternatives.html">parallel_alternatives(7)</a>; it&#8217;s quite hilarious.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
parallel --line-buffer --tagstring=&#039;{#}&#039; --max-args=0 openssl speed ::: $(seq $(nproc))
</pre></div>


<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>CPU (compare speed)</strong></p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
sysbench --num-threads=$(nproc) --test=cpu run
</pre></div>


<p class="wp-block-paragraph">Newer invocation style:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
sysbench --threads=$(nproc) cpu run
</pre></div>


<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>CPU (compare speed, single-core shitbox edition)</strong></p>



<p class="wp-block-paragraph">Cobbled this up for putting <a href="https://binblog.de/2022/11/30/ibm-rs-6000-von-1993/" data-type="link" data-id="https://binblog.de/2022/11/30/ibm-rs-6000-von-1993/">a 1993 vintage RS/6000</a> into perspective. Counts how many rand() / (rand() + 1) divisions the system will do in 10 second intervals.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
perl -e &#039;$o=time();$s=$o;while(10&gt;$o-$s)
{rand()/(rand()+1);$i++;$n=time();if($n!=$o)
{printf&quot;%i\n&quot;,$i;$i=0};$o=$n}&#039;
</pre></div>


<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>Storage (throughput)</strong></p>



<ul class="wp-block-list">
<li>-u $LOGNAME: Specify username explicitly (relevant when running as root)</li>



<li>-f without argument: Skip character i/o tests</li>



<li>-n 0: Skip file creation tests</li>
</ul>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
/sbin/bonnie++ -u $LOGNAME -d . -f -n 0
</pre></div>


<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>Storage (filesystem)</strong></p>



<ul class="wp-block-list">
<li>-u $LOGNAME: Specify username explicitly (relevant when running as root)</li>



<li>-s 0: Skip the throughput test</li>



<li>-n 128: Number of files times 1024, increase <a href="https://binblog.de/2010/07/24/how-to-get-rid-of-the-plus-signs-in-bonnie-output/">until the +++-outputs disappear</a>.</li>
</ul>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
/sbin/bonnie++ -u $LOGNAME -d . -s 0 -n 128
</pre></div>


<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Der Untergang der Morning Midas</title>
		<link>https://binblog.de/2025/07/02/der-untergang-der-morning-midas/</link>
		
		<dc:creator><![CDATA[#!/bin/blog]]></dc:creator>
		<pubDate>Wed, 02 Jul 2025 19:13:57 +0000</pubDate>
				<category><![CDATA[Autos]]></category>
		<category><![CDATA[News on news]]></category>
		<guid isPermaLink="false">https://binblog.de/?p=4654</guid>

					<description><![CDATA[Will man der neuen Entwicklung folgen, dass Hybride als Elektroautos zählen, waren auf den entsprechenden Decks (nicht nur auf einem) hunderte Hybride mit Verbrennungsmotoren verladen und die These vom Elektroauto-Deck ist in sich nicht schlüssig.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Die Morning Midas war ein Frachtschiff beladen mit Autos, das ab dem 26. Mai 2025 auf dem Weg von China nach Mexiko war. Am 3. Juni 2025 geriet es im Nordpazifik in Brand und die Crew konnte nach erfolglosen Löschversuchen von einem vorbeikommenden Frachtschiff aufgenommen werden. Es gab keine Toten oder Verletzten.</p>



<p class="wp-block-paragraph">Am 16. Juni meldete die US Coast Guard, das Feuer auf dem führerlosen Schiff sei erloschen.</p>



<p class="wp-block-paragraph">Am 24. Juni wurde dann schließlich der Untergang der Morning Midas am Tag zuvor gemeldet. </p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>Autos an Bord</strong></p>



<p class="wp-block-paragraph">Die Ladung der Morning Midas setzte sich nach Meldungen der US Coast Guard wie folgt zusammen:</p>



<ul class="wp-block-list">
<li>3048 Fahrzeuge insgesamt</li>



<li>70 batterieelektrische Fahrzeuge</li>



<li>681 Fahrzeuge mit Hybridantrieb</li>



<li>Daraus abgeleitet also: 2297 reine Verbrennerfahrzeuge und 2978 Fahrzeuge mit Verbrennungsmotor.</li>
</ul>



<p class="wp-block-paragraph">In einer bisher so nicht beobachteten Auslegung wurde daraus in den meisten Teilen der Presse sofort ein Frachter &#8220;mit mehr als 700 Elektroautos an Bord&#8221;: <a href="https://archive.ph/iOpmI">PCTC Morning Midas Ablaze in Pacific with 700+ EVs Onboard, Crew Safely Evacuated</a></p>



<p class="wp-block-paragraph">Zum Tankinhalt der 2978 Fahrzeuge mit Verbrennungsmotor kamen 1880 Tonnen(!) fossiler Betriebsmittel für das Schiff selbst, die beim Untergang &#8211; noch &#8211; nicht in die Umwelt ausgetreten waren.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>Brandwahrscheinlichkeit pro Antriebskonzept</strong></p>



<p class="wp-block-paragraph">Die Hybriden sollen für eine ganz einfach gehaltene Betrachtung doppelt, sowohl als Verbrenner als auch als Elektroauto gezählt werden:</p>



<ul class="wp-block-list">
<li>2978 konventionelle Antriebe mit Verbrennungsmotor</li>



<li>751 Elektroantriebe</li>
</ul>



<p class="wp-block-paragraph"><a href="https://archive.ph/ggi2n">Es gilt als erwiesen, dass das Brandrisiko  bei Elektroautos nicht höher ist als bei Verbrennern.</a> Für die Berechnung soll angenommen werden, dass es gleich hoch sei.</p>



<p class="wp-block-paragraph">Die Wahrscheinlichkeit, dass der Brand von einem Elektroantrieb ausgegangen ist, liegt somit bei 751 <strong>÷</strong> 3048, also ziemlich genau 1:4 oder 25%. </p>



<p class="wp-block-paragraph">Die Wahrscheinlichkeit, dass der Brand durch einen Verbrennungsmotor entstanden ist, liegt dagegen bei 2978  <strong>÷</strong> 3048, also 98%.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>Das Elektroauto-Deck</strong></p>



<p class="wp-block-paragraph">Gar nicht so einfach, eine sinnvolle Quelle zu finden, wonach die Besatzung den Brand auf <em>dem Deck mit den Elektroautos</em> beobachtet hat. Dieser etwas erratisch aufgebaute Artikel bei CNN aus den ersten Tagen berichtet: <a href="https://archive.ph/0m0GK">A large plume of smoke was initially seen at the ship’s stern coming from the deck loaded with electric vehicles</a></p>



<p class="wp-block-paragraph">Es liegen keine öffentlich verfügbaren Informationen der Reederei vor; offenbar wurde ausschließlich direkt mit Presse und Coast Guard kommuniziert.</p>



<p class="wp-block-paragraph">Das einzige, was die These mit dem Elektroauto-Deck stützen könnte, wäre, dass das Schiff gezielt auf Lücke beladen worden sein könnte, um die Elektroautos zu isolieren. Ich würde tatsächlich erwarten, dass von unten nach oben beladen wird, die schweren Elektroautos zuunterst, und dann auch keine Lücken gelassen werden, um den Schwerpunkt niedrig zu halten.</p>



<p class="wp-block-paragraph">Will man der neuen Entwicklung folgen, dass Hybride als Elektroautos zählen, waren auf den entsprechenden Decks (nicht nur auf einem) hunderte Hybride mit Verbrennungsmotoren verladen und die These vom Elektroauto-Deck ist in sich nicht schlüssig.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>Was bleibt?</strong></p>



<p class="wp-block-paragraph">Fakten schonmal keine, außer der Erkenntnis, dass 2978 Verbrennerantriebe und 751 Elektroantriebe an Bord waren. In jedem einzelnen Auto noch dazu <a href="https://archive.ph/gBIHH">explosives Kältemittel, das im Hinblick auf Brandrisiko und -bekämpfung nicht immer unumstritten war.</a></p>



<p class="wp-block-paragraph">Ein Defekt am Schiff, oder Fahrlässigkeit, sind genauso denkbar wie ein Defekt an einem der Autos.</p>



<p class="wp-block-paragraph">Anders als im <a href="https://binblog.de/2023/08/12/fremantle-highway-chronologie-nicht-brennender-500-elektroautos/" data-type="post" data-id="4113">Fall der Fremantle Highway</a>, wo die am Brand schuldigen Elektroautos alle unbeschädigt von Bord gekommen sind, liegen alle Beweisstücke diesmal in kaum erreichbaren 5000 Metern Tiefe am Grund des Pazifik.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-7 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><a href="https://binblog.de/wp-content/uploads/2025/06/250608-G-QU445-001.jpg"><img loading="lazy" decoding="async" width="1024" height="576" data-id="4656" src="https://binblog.de/wp-content/uploads/2025/06/250608-G-QU445-001-1024x576.jpg" alt="Luftaufnahme der brennenden Morning Midas, auf ganzer Fläche blättert der Lack vom Schiffsrumpf ab." class="wp-image-4656" srcset="https://binblog.de/wp-content/uploads/2025/06/250608-G-QU445-001-1024x576.jpg 1024w, https://binblog.de/wp-content/uploads/2025/06/250608-G-QU445-001-300x169.jpg 300w, https://binblog.de/wp-content/uploads/2025/06/250608-G-QU445-001-768x432.jpg 768w, https://binblog.de/wp-content/uploads/2025/06/250608-G-QU445-001-1536x864.jpg 1536w, https://binblog.de/wp-content/uploads/2025/06/250608-G-QU445-001.jpg 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>
</figure>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>Chronologie der US Coast Guard</strong></p>



<ul class="wp-block-list">
<li>4. Juni &#8211; <a href="https://archive.ph/9xSKy">Coast Guard responds to vessel fire offshore Adak, Alaska</a></li>



<li>4. Juni &#8211; <a href="https://archive.ph/bktHA">CORRECTION: Coast Guard responds to vessel fire offshore Adak, Alaska</a></li>



<li>6. Juni &#8211; <a href="https://archive.ph/PRNk0">Update: Coast Guard responds to vessel fire offshore Adak, Alaska</a></li>



<li>9. Juni &#8211; <a href="https://archive.ph/E8r9I">UPDATE 2: Coast Guard responds to vessel fire offshore Adak, Alaska</a></li>



<li>16. Juni &#8211; <a href="https://archive.ph/yGSRL">No signs of smoke, flames, flooding, or pollution</a></li>



<li>24. Juni: <a href="https://archive.ph/1vSNW">UPDATE 3: Coast Guard responds to vessel fire offshore Adak, Alaska</a></li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>Über den Autor</strong></p>



<p class="wp-block-paragraph">Martin Schmitt ist in den 1990er Jahren nach Ausbildung und Berufstätigkeit als gelernter Speditionskaufmann in die IT gewechselt, hält sich also selbstbewusst für einen Experten in Logistikfragen.</p>



<p class="wp-block-paragraph">Dieses Posting wurde &#8211; wie alle anderen auf diesem Blog &#8211;  <strong>ohne die Unterstützung</strong> eines großen Sprachmodells (im Volksmund &#8220;künstliche Intelligenz&#8221;) verfasst.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>jq argfile/slurpfile migration</title>
		<link>https://binblog.de/2025/05/22/jq-argfile-slurpfile-migration/</link>
		
		<dc:creator><![CDATA[#!/bin/blog]]></dc:creator>
		<pubDate>Thu, 22 May 2025 05:42:43 +0000</pubDate>
				<category><![CDATA[UNIX & Linux]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[jq]]></category>
		<category><![CDATA[linux]]></category>
		<guid isPermaLink="false">https://binblog.de/?p=4626</guid>

					<description><![CDATA[I've been using jq --argfile for a few years, despite the manpage up to jq 1.6 advising against it.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">I&#8217;ve been using <code>jq --argfile</code> for a few years, despite <a href="https://jqlang.org/manual/v1.6/">the manpage up to jq 1.6 advising against it</a>. Let me create a demonstration JSON that resembles my telemetry use case:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
$ jq -n &#039;.metric1=1234|.metric2=5678&#039; | tee /tmp/test.json
{
  &quot;metric1&quot;: 1234,
  &quot;metric2&quot;: 5678
}
</pre></div>


<p class="wp-block-paragraph">This data used to be read via <code>--argfile</code>, bound to a variable and hooked into a bigger JSON object:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
$ jq -n --argfile m /tmp/test.json &#039;.metrics=$m&#039;
{
  &quot;metrics&quot;: {
    &quot;metric1&quot;: 1234,
    &quot;metric2&quot;: 5678
  }
}
</pre></div>


<p class="wp-block-paragraph">The <a href="https://packages.debian.org/trixie/jq">Version of <code>jq</code> on Debian 13/Trixie</a> does not support the <code>--argfile</code> option anymore:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
jq: Unknown option --argfile
</pre></div>


<p class="wp-block-paragraph"><strong>TL;DR</strong>: I had to replace <code>--argfile</code> with <code>--slurpfile</code> and use the first list index from the bound variable:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
$ jq -n --slurpfile m /tmp/test.json &#039;.metrics=$m&#x5B;0]&#039;
{
  &quot;metrics&quot;: {
    &quot;metric1&quot;: 1234,
    &quot;metric2&quot;: 5678
  }
}
</pre></div>


<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>Why though?</strong></p>



<p class="wp-block-paragraph"><code>--argfile</code> behaves differently depending on the number of JSON objects in the file. If it the file contains 1 JSON object, it is returned as a JSON object. If I create a JSON file that contains 2 JSON objects, they are converted to a list of objects:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
$ jq -n &#039;.metric1=1234,.metric2=5678&#039; | tee /tmp/test2.json 
{
  &quot;metric1&quot;: 1234
}
{
  &quot;metric2&quot;: 5678
}
</pre></div>

<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
$ jq -n --argfile m /tmp/test.json &#039;.metrics=$m&#039;
{
  &quot;metrics&quot;: {
    &quot;metric1&quot;: 1234,
    &quot;metric2&quot;: 5678
  }
}
$ jq -n --argfile m /tmp/test2.json &#039;.metrics=$m&#039;
{
  &quot;metrics&quot;: &#x5B;
    {
      &quot;metric1&quot;: 1234
    },
    {
      &quot;metric2&quot;: 5678
    }
  ]
}
</pre></div>


<p class="wp-block-paragraph"><code>--slurpfile</code> treats all JSON objects the same and if the file contains a single JSON object, returns a list of JSON objects containing a single entry. Hence the added <code>[0]</code> from the <em>TL;DR</em> section.</p>



<p class="wp-block-paragraph">One might argue that the removal of <code>--argfile</code> could have come following a clear deprecation notice instead of semi-permanently (<a href="https://manpages.debian.org/stretch/jq/jq.1.en.html">first appearance in Debian 9/Stretch</a>) advising against its use and then removing it all of a sudden. However, as far as I am concerned, the issue was detected in earliest Debian 13 compatibility testing within days after the freeze, I immediately knew what was cooking, the migration to <code>--slurpfile</code> was trivial, and it can also be deployed retroactively on all older systems.</p>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Too Good To #014</title>
		<link>https://binblog.de/2025/04/14/too-good-to-014/</link>
		
		<dc:creator><![CDATA[#!/bin/blog]]></dc:creator>
		<pubDate>Mon, 14 Apr 2025 19:19:26 +0000</pubDate>
				<category><![CDATA[Too Good To]]></category>
		<category><![CDATA[dmesg]]></category>
		<category><![CDATA[journald]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[systemd]]></category>
		<guid isPermaLink="false">https://binblog.de/?p=4562</guid>

					<description><![CDATA[In today's installment:

- dmesg from before the machine crashed
- Kill process ID from pidfile
- Let systemd retry a task
- Set MTU on OpenVPN connections in Networkmanager]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">In today&#8217;s installment:</p>



<ul class="wp-block-list">
<li>dmesg from before the machine crashed</li>



<li>Kill process ID from pidfile</li>



<li>Let systemd retry a task</li>



<li>Set MTU on OpenVPN connections in Networkmanager</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>dmesg from before the machine crashed</strong></p>



<p class="wp-block-paragraph">Super helpful and complete after most kernel panics and <em>Magic SysRq</em> resets:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
journalctl --dmesg --boot -1
</pre></div>


<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>Kill process ID from pidfile</strong></p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
pkill --pidfile foo.pid
</pre></div>


<p class="wp-block-paragraph">I use this in this wacky <em>systemd</em> user unit:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
&#x5B;Unit]
Description=nginx restreamer

&#x5B;Service]
ExecStart=/usr/sbin/nginx \
        -c %h/.local/nginx/nginx.conf \
        -g &quot;pid %h/.local/nginx/nginx.pid;&quot;
ExecReload=pkill -HUP --pidfile %h/.local/nginx/nginx.pid

&#x5B;Install]
WantedBy=default.target
</pre></div>


<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>Let systemd retry a task</strong></p>



<p class="wp-block-paragraph">Not the first appearance of <em>systemd-run</em> in this category, and probably not the last. Here&#8217;s how to hand a task to <em>systemd-run</em> in order to be retried a number of times.</p>



<p class="wp-block-paragraph">My bro math for interval calculation goes like this:</p>



<ul class="wp-block-list">
<li><em>RestartSec</em> = Time to wait between end of a failed attempt and start of the next attempt</li>



<li><em>RuntimeMaxSec</em> = Allowed time for each attempt</li>



<li><em>StartLimitBurst</em> = Number of attempts to make</li>



<li><em>StartLimitIntervalSec</em> = (<em>RestartSec</em> + <em>RuntimeMaxSec</em>) x <em>StartLimitBurst</em> x 10</li>
</ul>



<p class="wp-block-paragraph">So for a service that shall retry every 5 minutes (<em>RestartSec</em>), 12 times (<em>StartLimitBurst</em>), and shall be timed out after 30 seconds (<em>RuntimeMaxSec</em>):</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
systemd-run \
    --user \
    --property=Restart=on-failure\
    --property=RestartSec=300 \
    --property=RuntimeMaxSec=30
    --property=StartLimitBurst=12 \
    --property=StartLimitIntervalSec=39600 \
    sh -c &#039;test -e /tmp/1 &amp;amp;&amp;amp; touch /tmp/1&#039;
</pre></div>


<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>Set MTU on OpenVPN connections in Networkmanager</strong></p>



<p class="wp-block-paragraph">Is this <a href="https://www.0xf8.org/2015/08/setting-the-mtu-on-networkmanager-connections/">really still required</a>?</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
sudo install -m 0755 /dev/stdin /etc/NetworkManager/dispatcher.d/vpn-up &lt;&lt; &quot;Here&quot;
#!/bin/sh

if &#x5B; &quot;$2&quot; = &quot;vpn-up&quot; ]; then
        ip link set dev &quot;$1&quot; mtu 1392
fi
Here

</pre></div>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Headless OBS on Debian</title>
		<link>https://binblog.de/2025/04/03/headless-obs-on-debian/</link>
		
		<dc:creator><![CDATA[#!/bin/blog]]></dc:creator>
		<pubDate>Thu, 03 Apr 2025 08:32:38 +0000</pubDate>
				<category><![CDATA[UNIX & Linux]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[obs]]></category>
		<guid isPermaLink="false">https://binblog.de/?p=4566</guid>

					<description><![CDATA[What I tinkered with in recent days was a headless Linux desktop for OBS, running on a server, in my case to gateway an Icecast stream to Twitch.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">What I tinkered with in recent days was a headless Linux desktop for OBS, running on a server, in my case to gateway an Icecast stream to Twitch.</p>



<p class="wp-block-paragraph">A number of things need to be considered here:</p>



<ul class="wp-block-list">
<li>Identify what dependencies need to be installed.</li>



<li>Run a pseudo X11 display server and session.</li>



<li>Auto-start OBS, auto-start the stream.</li>



<li>Run a VNC frontend to the X11 session.</li>



<li>Backups.</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>OBS from Flatpak</strong></p>



<p class="wp-block-paragraph">Pretty unusual on a server, but should work without issues:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
sudo apt-get install flatpak
sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
sudo flatpak install flathub com.obsproject.Studio
</pre></div>


<p class="wp-block-paragraph"><em>Caveat: There is no OBS Browser source on ARM aarch64, so OBS will not be reasonably usable on Oracle&#8217;s &#8220;Always Free Tier&#8221; VPSes. Believe me. I tried.</em></p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>X11 dependencies</strong></p>



<p class="wp-block-paragraph">I run the <em>fvwm3 </em>window manager in the virtual display server, because it&#8217;s not completely on the hostile end of the window manager spectrum.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
sudo apt-get install x11vnc xvfb fvwm3 menu menu-xdg python3-xdg xbase-clients xterm xauth xinit
</pre></div>


<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>X11 startup</strong></p>



<p class="wp-block-paragraph">For X11 startup, I use a systemd user-unit along with a traditional <em>~/.xinitrc</em>, a file I hadn&#8217;t worked with in ages.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
# ~/.config/systemd/user/xinit.service
&#x5B;Unit]
Description=X virtual framebuffer

&#x5B;Service]
ExecStart=xinit -- /usr/bin/Xvfb :20 -nolisten tcp -screen 0 1280x720x24

&#x5B;Install]
WantedBy=default.target
</pre></div>


<p class="wp-block-paragraph"><em>Caveat: The preview pane inside OBS requires 24 bit color depth.</em></p>



<p class="wp-block-paragraph">The <em>~/.xinitrc </em>sets a language environment, which I use for influencing the date format inside the OBS browser source. The OBS invocation also starts the stream automatically, and ignores uncontrolled shutdowns of OBS, so the stream will autostart after a reboot.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
# ~/.xinitrc
LANG=en_GB.utf-8 flatpak run com.obsproject.Studio --startstreaming --disable-shutdown-check &amp;
exec fvwm3
</pre></div>


<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>VNC</strong></p>



<p class="wp-block-paragraph">The VNC service will be bound to localhost only, but adding a password won&#8217;t hurt and will hardly be noticeable once it&#8217;s setup and saved in the VNC client.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
x11vnc -storepasswd
</pre></div>


<p class="wp-block-paragraph">Another systemd user-unit takes care of starting <em>x11vnc</em>:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
# ~/.config/systemd/user/x11vnc.service
&#x5B;Unit]
Description=x11vnc
Requires=xinit.service

&#x5B;Service]
ExecStart=x11vnc -forever -usepw -listen localhost -display :20

&#x5B;Install]
WantedBy=default.target
</pre></div>


<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>Backups</strong></p>



<p class="wp-block-paragraph">OBS&#8217;s data is saved in: <em>~/.var/app/com.obsproject.Studio</em></p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>Access</strong></p>



<div class="wp-block-media-text has-media-on-the-right is-stacked-on-mobile"><div class="wp-block-media-text__content">
<ul class="wp-block-list">
<li><code>ssh &lt;theserver&gt; -L 5900:localhost:5900</code></li>



<li>Connect VNC viewer to localhost</li>
</ul>
</div><figure class="wp-block-media-text__media"><a href="https://binblog.de/wp-content/uploads/2025/04/obs-vnc.png"><img loading="lazy" decoding="async" width="1024" height="601" src="https://binblog.de/wp-content/uploads/2025/04/obs-vnc-1024x601.png" alt="Screenshot of the running VNC session with fvwm3 and OBS." class="wp-image-4583 size-full" srcset="https://binblog.de/wp-content/uploads/2025/04/obs-vnc-1024x601.png 1024w, https://binblog.de/wp-content/uploads/2025/04/obs-vnc-300x176.png 300w, https://binblog.de/wp-content/uploads/2025/04/obs-vnc-768x450.png 768w, https://binblog.de/wp-content/uploads/2025/04/obs-vnc.png 1282w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure></div>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
