Die wunderbare Welt von Isotopp
Fixing "ip netns" for docker
So I want to monitor my Jitsi Videobridge to get some useful statistics. The instructions say to enable Videobridge statistics and then grab stuff from port 8080.
Ok, I think I did that, but it did not work. Time to dig into the container network config.
And while I have a lot of network namespaces, they are unknown to ip netns, as can be seen when asking for a list. When we define a network namespace with ip netns, it will symlink the assigned name from /var/run/netns/<name> to /proc/<pid>/ns/net of the process that leads that namespace.
Optimistic locking
A question from Reddit’s /r/mysql:
Hey, I was planning to make a dashboard, where Users are subjected to make edits on their profiles every now and then, and I expect a high volume of requests to the database.
Having worked previously with MySQL for another Dashboard, I encountered errors for:
Maximum user connections - when I connected to the database only while query was to be executed
Lock wait timeout exceeded; try restarting transaction - when I connected to the database whenever a user logged into the dashboard, and ended the connection when he ended the session.
Fertig gelesen: Rolf Ulrici
Als ich noch ein ganz kleiner Kris war, habe ich die Schülerbüchereien von mehreren Schulen durchgelesen und mich dann über die Gemeindebücherei hergemacht. Es ist jetzt mehr als 40 Jahre her, daß ich da im Schülerteam mitgearbeitet habe, aber die Chefin, die damals gerade angefangen hatte und die auch das Schülerteam begründet hat, ist immer noch da und macht ihren Job. Das ist unglaublich großartig.
Groß geworden bin ich unter anderem mit den Büchern von Rolf Ulrici , Raumschiff Monitor und Erdschiff Giganto.
MySQL store_result and use_result
A question from Reddit’s /r/mysql led to a longer discussion of cursors and how they are implemented in MySQL, and what the advantages and drawbacks are.
The OP probably had a slow query, but was misphrasing the question:
I am having performance problems where my cursor is taking 6-8 seconds to go through a hundred rows. I think this is because I am also using while loops to loop through JSON objects to pull information. I am wondering if cursors are usually this slow or if I have set it up poorly.
Time Machine Editor
I have an embedded Mac mini, it drives the local TV screen by doing OpenVPN to Germany, Netflix, Amazon and the local Subsonic . It does not really do much with the local disk, and it does not need to wake up every hour to make a Time Machine backup over the network.
To change the backup interval, install Time Machine Editor .
Time Machine Editor can change the Time Machine Backup interval. It has a background daemon that triggers the backups, a GUI application and a command line utility.
Air Quality Sensors
In an earlier episode I asked for Plugs with Wi-Fi and ended up with Gosund and Tasmota . Considering this to be a success, I asked the Twitters for Temperature and Humidity Sensors. Of course, this got complicated.
I was pointed to Xiaomi Aqara , but these do not do Wi-Fi, but Zigbee - whatever that is, it is spoken by Zigbee USB Gateway Sticks and works with Raspi. We’ll see.
Gosund and Tasmota
(continued from Plugs with Wi-Fi ) So the Gosund plugs came, as did the Raspi 4. I did cancel the Shelly plug and decomissioned the TP-Link Kaka, because Tasmota on Gosund is awesome and the Gosund hardware is dirt cheap.
Power consumption of the local data grave, with too old a mainboard and CPU and way too much storage
But lets start at the beginning:
4 Pack of Gosund SP111 V1.1 , so they come in at around 10 Euro/pc. They come with a chinese cloud application that is utterly useless, and I never even tried to get them running with it. This is recommended, because running that app might update the native firmware of these things and potentially lock it.
Note to self: Archiving Discord Chats
When the Coronacrisis began, a good friend of mine started a Discord server and brought the band back together. As with any of the Coronavirus Quarantine Chats, the initial discussion revolved around baking proper bread. I wanted to archive this, so I needed a way to download Discord chat histories for archive.
The DiscordChatExporter can do that, and doing this was actually easy.
I needed
- Docker
- my Discord User Token
- No Discord Bot Token
- The Discord Channel ID
and then did a small starter script:
Deleting data from MySQL
I have been pointed at the following question: »Has anyone ever used mySQL events to auto-delete rows from a table after set period? Wondering your experience of doing this.«
There are two ends to this question:
- expiring data from a MySQL table
- doing this with the event scheduler
Mass-deleting data from InnoDB
You can of course delete data from a table using the SQL DELETE statement with an arbitrary WHERE-clause at any time:
Plugs with Wi-Fi
So we are baking bread, and for that we have a Wiesheu minimat oven that comes in at a full 16A - supposedly it is using 3kW or more peak plus the condenser hood that comes in at another 500W top power draw. On the other hand, when running the thing is hardly lukewarm, it is running much cooler than the Neff household oven/microwave combo we have.
Wiesheu minimat with condenser hood. Convection oven with 3 trays (for buns) or a single layer of stone plate for bread. Can do 3x12 buns (20 min) or 2-3 loaves of bread (1h). Power draw 3kW + 0.5kW for the hood. Intended use is a show oven in the sales room of a bakery, or as PoS oven in a gas station or supermarket.