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,603 other followers

Archive for the ‘systemd’ Category

systemd – How to clear journalctl – Unix & Linux Stack Exchange

Posted by jpluimers on 2019/05/24

Some tips on pruning entries from the systemd journal:

For stock opensuse, this is also relevant, as it seems to allow indefinite growth: [WayBack] systemd – journald Settings likey need your attention

You can view disk usage with this command:

journalctl --disk-usage

–jeroen

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

OpenSuSE: multi-megabyte binary blob `/etc/udev/hwdb.bin` does not need to be versioned with `etckeeper` – via Unix & Linux Stack Exchange

Posted by jpluimers on 2019/04/22

I wondered [WayBacklinux – Why is this a binary multi-megabyte blob /etc/udev/hwdb.bin under /etc? – Unix & Linux Stack Exchange.

All my OpenSuSE systems had the /etc/udev/hwdb.bin file with sizes varying between 7.5 and 10 megabytes with many of the zypper dist-upgrade causing updates.

Luckily the system also contains these files which had valid unit definitions, so the file was generated/updated during boot:

  • /usr/bin/systemd-hwdb
  • /usr/lib/systemd/system/sysinit.target.wants/systemd-hwdb-up‌​date.service
  • /usr/lib/systemd/system/systemd-hwdb-update.service

Thanks [WayBacknwildner for answering that question!

So after installing etckeeper and performing etckeeper init you can immediately remove the git repository:

# cd /etc
# git rm --cached /etc/udev/hwdb.bin
rm 'udev/hwdb.bin'
# git commit -m "no need for /etc/udev/hwdb.bin to be under revision control as systemd-hwdb maintains it"

For more background, see [WayBack] How to make Git “forget” about a file that was tracked but is now in .gitignore? – Stack Overflow.

–jeroen

 

Posted in *nix, *nix-tools, Linux, openSuSE, Power User, SuSE Linux, systemd, Tumbleweed | Leave a Comment »

systemd/udev: PredictableNetworkInterfaceNames

Posted by jpluimers on 2017/08/28

This is so cool, but will take some time for lot’s of tooling to become compatible:

Starting with v197 systemd/udev will automatically assign predictable, stable network interface names for all local Ethernet, WLAN and WWAN interfaces. This is a departure from the traditional interface naming scheme (“eth0”, “eth1”, “wlan0”, …), but should fix real problems.

–jeroen

Posted in *nix, *nix-tools, Linux, Power User, systemd | Leave a Comment »

OpenSuSE Tumbleweed – when `halt` doesn’t halt, but CLI+HLT the CPU at the end of the shutdown procedure

Posted by jpluimers on 2017/04/26

When halt is not a real halt but a suspend of the CPU.

When halt is not a real halt but a “disabling” of the CPU.

TL;DR:

Don’t use halt, use poweroff instead.

A while ago I wrote about OpenSuSE 12.x not halting after a halt:

The same holds for more recent OpenSuSE systems, but ESXi would never tell what was going on.

Recently I installed an OpenSuSE Tumbleweed system under VMware Fusion (running on Mac OS X) which indicated “The CPU has been disabled by the guest operating system.”

Log indicates a

Log indicates a “Shutdown” which in fact is a CPU not powered down.

Which — Understanding the message: The CPU has been disabled by the guest operating system (2000542) | VMware KB [WayBack] — means that halt will not power down the VM but perform a CLI + HLT on the CPU. This effectively hangs the CPU even though the console log on the right tells does a real Shutdown.

In the past – even under ESXi – a halt would just power down the system, so based on the above I did more digging and fount this very interesting answer in rhel – What is the difference between these commands for bringing down a Linux server? – Unix & Linux Stack Exchange [WayBack] which comes down to:

  • on a systemd [WayBack] based system commands like halt, reboot, shutdown all invoke systemctl [WayBack] calling for a specific target [WayBack].
  • mapping of targets and commands is as follows (quoted from the answer):
    • systemctl isolate halt.target has the shorthands:
      • shutdown -H now
      • systemctl halt
      • plain unadorned halt
    • systemctl isolate reboot.target has the shorthands:
      • shutdown -r now
      • telinit 6
      • systemctl reboot
      • plain unadorned reboot
    • systemctl isolate poweroff.target has the shorthands:
      • shutdown -P now
      • telinit 0
      • shutdown now
      • systemctl poweroff
      • plain unadorned poweroff
    • systemctl isolate rescue.target has the shorthands:
      • telinit 1
      • systemctl rescue
    • systemctl isolate multi-user.target has the shorthands:
      • telinit 2
      • telinit 3
      • telinit 4
    • systemctl isolate graphical.target has the shorthand:
      • telinit 5

For a SysV [WayBack] init runlevels versus systemd targets see:

The systemd parameters making things a bit confusing, for instance you can do reboot --halt and more of those shown in linux – Are there any good reasons for halting system without cutting power? – Super User [WayBack].

That also explains that halt without a powerdown can be useful: it for instance gives the end-user the opportunity to click the reset button instead of the power button after a halt.

–jeroen

Posted in *nix, Linux, openSuSE, Power User, SuSE Linux, systemd, SysVinit, Tumbleweed | Leave a Comment »

 
%d bloggers like this: