Friday, June 26, 2020

Openhab and iobroker on same Linux Problem

Just saw, that frontail service for openhab serves on port 9001 which ist same as Iobroker internal imem Socket!

After disabling frontail iobroker was reachable again.

Sunday, June 7, 2020

USV / UPS an Raspi

Ich habe mich für die Vorgehensweise mit Nut entschlossen:

Nagios check_raid Bug for non Dm users:

since an update, the query for DM causes an error. Workaround for md Raid users is:
-p mdstat:

define command {
 command_name    check_raid
 command_line    /usr/lib/nagios/plugins/check_raid $ARG1$

define service{
    use                  generic-service
    host_name            localhost
    service_description  Linux RAID
    check_command        check_raid!-p mdstat!
    normal_check_interval  120
    retry_check_interval 5

Friday, May 1, 2020

Swap File on an off Ubuntu

Raspi 4 eeprom update

vcgencmd measure_temp

Raspi Backup Ubuntu

straightforward approach with:
 dd if=/dev/mmcblk0 |gzip > /media/backup/2020_02_16_gzip_backup.gz

incremental file copy:
sudo rsync -avu --progress /media/BilderArchiv/ /media/Raid1_2/BilderArchiv/

Raspi3 change to usb boot

If the device fails to respond after this maximum timeout, it is possible to increase the timeout to five seconds using program_usb_boot_timeout=1 in config.txt

enable usb:

insert in cmdline.txt und boot up twice:
#enable usb boot


Check for correct setting:

$ vcgencmd otp_dump | grep 17:

Raspi3 Ubuntu vcgencmd missing

Following guide here:

Optional PPAs
While the official image includes compatible firmware, bootloader and kernel, there are a few packages available in an unofficial PPA (ppa:ubuntu-raspi2/ppa) which are useful on the Raspberry Pi, including:

libraspberrypi-bin - VideoCore utilities from such as vcgencmd, raspistill, etc.

libraspberrypi-bin-nonfree - Binary VideoCore utilities not provided in the open source userland repository, currently vcdbg and edidparser.

xserver-xorg-video-fbturbo - An accelerated video driver, though this is limited to hardware accelerated window moving/scrolling on the Raspberry Pi.

hello-dkms - Not strictly to do with the Raspberry Pi, but a small example DKMS project to test building kernel DKMS modules.

To install:

sudo add-apt-repository ppa:ubuntu-raspi2/ppa
sudo apt-get update
sudo apt install libraspberrypi-bin
Further/updated Raspberry Pi packages can be found in the Ubuntu Pi Flavour Maker PPA. Many of these packages rely on the user being a member of groups:

sudo groupadd -f --system gpio
sudo groupadd -f --system i2c
sudo groupadd -f --system input
sudo groupadd -f --system spi

Raspi Ubuntu Debugging

Let dmesg -w run
Let run top to see heavy loads
Let vgencmd


import os

import time

def measure_temp():

temp = os.popen("vcgencmd measure_temp").readline()

return (temp.replace("temp=",""))

while True:




Raspi3 B+ external SSD USB freezes and hangs

For some time I've tried to get my Raspi3+ext SSD Setup working. Currently I do a complete Backup via dd towards a NAS drive. The Image sizes are rougly about 100 GB.
between 2GB und 100 GB the Backup always crashes.
The SSD ist connected directly to the USB Port without additional Powersupply.

So far I've had the following errors:
<pre class="brush: csharp">// Comment
watchdog: BUG: soft lockup - CPU#2 stuck fpr 23s: [kworker/2:0:3391]
watchdog: BUG: soft lockup - CPU#2 stuck fpr 23s: [ksoftirqd/1:18]
watchdog: BUG: soft lockup - CPU#2 stuck fpr 23s: [swapper/2:0]
rcu: $1-...0: (2ticks this >GP) idle=......02 softirq=12313/123123 fqs=18361
cpufrq: __target_index: failed to change cpu frequency: -22
watchdog: BUG: soft lockup - CPU#2 stuck for 22s! [(d-logind):5635]
rcu sched kthread starved for 1233 jiffies
RCU grace period k-thread stack dump

So far I've tested the following:

External Power Supply for ssd
Differen connector for SSD
USB Stick instead SSD
Backup from SSD to USB Stick
Backup from SSD to SD Card
Backup from USB Stick to SD Card

Everytime I get some kind of Kernel error, cpufreq error aso.

Next Step ist to test Raspbian instead of ubuntu.
Till now, raspbian was able to do a successfull backup to sd card in the same pi.
Next Step ist Backup to Network NAS.
If that works as well I'll try my ssd with Raspbian an Backup to NAS.

Actually, the only solution was a Raspbian native install on SSD. Everything works as perfect since then. qed.