The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,862 other subscribers

Archive for the ‘*nix’ Category

btrfs free space. It’s complicated. Still.

Posted by jpluimers on 2018/07/09

Everytime a btrfs based volume runs out of space, I’m reminded of these:

There are a few scripts that help you assess quota usage. If you think they are wrong, then you need to btrfs quota rescan / which tells you that it started, but won’t tell when it’s finished (nor wil journalctl -xe a.k.a. journalctl --catalog --pager-end), but dmesg does:

# dmesg | grep qgroup
[ 316.608122] BTRFS info (device sda2): qgroup scan completed (inconsistency flag cleared)

For now I’ve this quick script to start investigation:

~/Versioned/btrfs-du/btrfs-du && df -h | grep "\/$\|^[^\/]" && btrfs quota rescan -s /

It assumes there is quota on the root (enable with btrfs quota enable /) and is based on my fork github.com/jpluimers/btrfs-du. The df will limit itself to the root (trailing / matched by \/$) or disks not mounted from / (matched by ^[^\/]).

–jeroen

References (not solutions):

Read the rest of this entry »

Posted in *nix, btrfs, File-Systems, Linux, openSuSE, Power User, SuSE Linux | Leave a Comment »

Online markup conversion from markdown to mediawiki: pandoc

Posted by jpluimers on 2018/07/06

Since Mediawiki needs an extension to display Markdown, and many MediaWiki installations do not have that extension, I was looking for an online conversion from markdown to MediaWiki markup.

Luckily the Pandoc try has this conversion: [WayBack] Try pandoc! Markdown(pandoc) -> MediaWiki

These links helped me get there:

–jeroen

Posted in *nix, *nix-tools, Development, Lightweight markup language, MarkDown, MediaWiki, pandoc document converter, Power User, Software Development | Leave a Comment »

Acer B326HK – not finding a signal when the linux host wakes up out of sleep

Posted by jpluimers on 2018/07/02

Problem:

6 unlabeled buttons: I can not force the input to display port and monitor is searching other ports when host is sleeping. Getting no output when I wake up the host. 😞

Btw, this is for an Acer B326HK monitor. Other than issues with the UI, seems like a decent 4k monitor.

Solution:

my mistake was to use Display Port (Choice was DP or DVI) and the workaround is to disable power state changes on Display Port with something like “xset -dpms

Source: [WayBackThis could have been an April fool’s joke: telepathic monitor controls… – Grant Grundler – Google+

–jeroen

Posted in *nix, Power User | Leave a Comment »

Choosing a centralized logging and monitoring system

Posted by jpluimers on 2018/06/18

Interesting read:

Searching through logs and remoting to a machine to check it’s load is not a fun thing to do. This is why I’ve decided to look for a centralized logging service. And what I’ve chosen.

It looks like Microsoft App Insight is very much worth trying.

–jeroen

Posted in *nix, Development, Monitoring, Power User | Leave a Comment »

Restrict SSH User Access to Certain Directory Using Chrooted Jail

Posted by jpluimers on 2018/06/11

In this article, we will explain you how to restrict a SSH user access to a specific directory using chrooted jail in Linux systems.

Source: [WayBack] Restrict SSH User Access to Certain Directory Using Chrooted Jail

via: [WayBack] Restrict #SSH User Access to Certain Directory Using Chrooted Jail #Linux – Linux Inside – Google+

–jeroen

 

Posted in *nix, *nix-tools, Communications Development, Development, Internet protocol suite, Power User, SSH, TCP | Leave a Comment »

USB serial converters from FTDI – how to select them and get rid of fake chips

Posted by jpluimers on 2018/06/08

Be sure to read the comments at USB serial converters from FTDI are quite popular – Thomas Mueller (dummzeuch) – Google+ [WayBack] as it tells more about how to set genuine and fake FTDI chips apart (often before buying them, you cannot tell) and how to replace fake ones buy genuine ones.

Getting back to original means de-soldering fake chips, and soldering new genuine chips on the boards.

Fake chips:

  • have limited batches of the same serial (although there are ways to reprogram the serial, see links below)
    • connecting multiple adapters with the same serial causes trouble
  • are mangled by various FTDI drivers (either their PID is reset, or fake-data is inserted in the serial stream)
  • have problems operating at higher data rates

Note that the workarounds for these fake chips mean you cannot use more recent chips.

Links from Thomas’s post and other relevant links on the various kinds of genuine/fake and getting fake ones work again

Fake chips can cause you a lot of headaches – and time – sorting out communication problems: [WayBack] esptool-ck, esp8266, and FTDI Bug Hunting – vilimblog

Two years ago, this shoot-out (with results on github) had a great conclusion:

Buy either an adapter with a genuine FTDI chip, or one of the Silicon Labs CP2102 chips.

The FTDI chip is the only one attaining 3M baud rates.

Overview articles:

SiLabs chips seem to be the only without much trouble:

  • [WayBack] SiLabs CP210x USB Adapters For The Win – vilimblog
  • Review of a Generic USB RS 232/485/TTL Adapter (“Winners” branded) – YouTube:
    • Almost anything with FTDI/Prolific chips that comes from ebay/aliexpress should be assumed to be counterfeit – easy way to test this is to buy 2 and see if their serial numbers match. You don’t really want to waste your time with fake ones, you’ll end up spending more on those if you try to get them for as cheap as possible. Itead sells an adapter for 6.8 USD with genuine FT232RL chips, but they aren’t in as convenient dongle form factor, but might be worth more than your own time replacing fake chips with genuine ones.Although not mentioned here, CH340/1 should generally be avoided, while they work fine for short periods of time, for longer use they seem to be as unreliable as the counterfeit FTDI/Prolific chips on Linux.

      I haven’t seen or recognized a fake CP210x chip yet, so my guess would be that these are generally fine no matter where you get them. One big advantage of those is the integrated voltage 3.3V regulator, which can save some space when rolling your own boards.

FTDI related:

Genuine FTDI seems to be the easiest to find:

Prolific has similar issues, driver v3.4.25.218 still works with fake chips:

–jeroen

Related posts where I mentioned some of the trouble with FTDI chips:

Read the rest of this entry »

Posted in *nix, Development, Hardware Development, Hardware Interfacing, Legacy Ports: COM, Linux, openSuSE, Power User, SuSE Linux | Leave a Comment »

How to Control Your Air Conditioner with Raspberry Pi Board and ANAVI Infrared pHAT

Posted by jpluimers on 2018/06/04

Interesting howto: [WayBackHow to Control Your Air Conditioner with Raspberry Pi Board and ANAVI Infrared pHAT

via: [WayBack] Air conditioners’ remote control codes are a bit different from say your TV remote control, as they don’t just send one byte, but a bunch of bytes… – Jean-Luc Aufranc – Google+

–jeroen

Posted in *nix, Development, Hardware Development, Power User, Raspberry Pi | Leave a Comment »

Hmm, latest Tumbleweed on Raspberry Pi 3 has an odd thing booting: Ansi termi…

Posted by jpluimers on 2018/05/25

Reminder to self: since the [ArchiveARM Cortex A53 problems are fixed, check out if this is also fixed:

[WayBack] Hmm, latest Tumbleweed on Raspberry Pi 3 has an odd thing booting: Ansi terminal characters aren’t being processed any more. – Jeroen Wiert Pluimers – Google+

Related: Git repository with fixed binaries for Tumbleweed on Raspberry Pi 3 – Bug 1084419 – Glibc update to 2.27 causes segfault during name resolution

–jeroen

Related as a different Pi died after a sudden power down:

Posted in *nix, Development, Hardware Development, Linux, openSuSE, Power User, Raspberry Pi, SuSE Linux, Tumbleweed | Leave a Comment »

Ubuntu: Fixing the myserious “Failed to stop apt-daily.timer: Connection timed out”

Posted by jpluimers on 2018/05/14

Ubuntu is the only Linux system I had that – after installing a text-mode console setup – gets itself in the below state with only running apt update and apt-get upgrade.

Preparing to unpack .../archives/apt_1.2.19_armhf.deb ...
Failed to stop apt-daily.timer: Connection timed out
See system logs and 'systemctl status apt-daily.timer' for details.
Failed to get load state of apt-daily.timer: Connection timed out
dpkg: warning: subprocess old pre-removal script returned error exit status 1

I could not find meaningful search results for the above thing, nor did systemctl status apt-daily.timer return anything better than

Failed to get properties: Failed to activate service 'org.freedesktop.systemd1': timed out

Heck, it doesn’t even reboot any more (no helpful search results either):

# reboot
Failed to start reboot.target: Failed to activate service 'org.freedesktop.systemd1': timed out
See system logs and 'systemctl status reboot.target' for details.
Failed to open /dev/initctl: No such device or address
Failed to talk to init daemon.

Nor did systemctl status reboot.target return anything better than

Failed to get properties: Failed to activate service 'org.freedesktop.systemd1': timed out

From the ubuntu-16.04-minimal-odroid-c1-20160817.img.xz base system, it only had these extra packages installed:

  • etckeeper
  • tmux
  • speedtest-cli
  • sendemail

Workaround found, but still unsure why this happened in the first place

Despite the workaround below, I still don’t know why I got into this situation and this leaves me with a very uncomfortable feeling.

Too bad some systems (like ODroid) only have Ubuntu based distributions as sorting out stuff like above took me way too much effort.

Read the rest of this entry »

Posted in *nix, Development, etckeeper, Hardware Development, Internet, Linux, Odroid, Power User, SpeedTest, Ubuntu | 2 Comments »

Some Raspberry Ideas via Tweakers.net

Posted by jpluimers on 2018/05/11

via: [WayBackRaspberry Pi Zero W met wifi en bluetooth kost 10 dollar – Computer – Nieuws – Tweakers

  • LibreELEC (media player OS for Kodi); if your PC is recent enough and supports CEC, you can even use the remote control of your TV to controle the KODI user interface
  • EmulationStation; play old NES/SNES/PS1/etc games on your TV
  • Pi Hole, alternative DNS server that blocks ads even on devices that do not support an ad blocker
  • Domoticz to support device and protocols like Klik-aan-klik-uit, Z-Wave, HVAC, thermostats, smart electricity meters, and make your home “smart”
  • Build Robotjes and control with your smartphone
  • Install Rasbian and replace simple desktop machine usage
  • Sick Beard
  • Sonarr
  • SABnzbd+
  • Couch Potato
  • Retropie
  • http://makezine.com/proje…ode-raspberry-pi-cluster/

–jeroen

Posted in *nix, Debian, Development, Hardware Development, Linux, Power User, Raspberry Pi, Raspbian | Leave a Comment »