6

systemd 的問題

 8 months ago
source link: https://blog.gslin.org/archives/2024/01/08/11570/systemd-%e7%9a%84%e5%95%8f%e9%a1%8c/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

systemd 的問題

Lobsters 的「systemd through the eyes of a musl distribution maintainer」這篇看到的,隔壁 Hacker News 的「Systemd through the eyes of a musl distribution maintainer (catfox.life)」也可以參考,原文在則是「systemd through the eyes of a musl distribution maintainer」這邊。

裡面提到的幾個痛點算是社群的共識了,像是負責 DNS 的 systemd-resolved,我之前有寫「Ubuntu 20.04 下用 resolvconf 取代 systemd-resolved (因為 PPPoE)」這個,回頭去用 resolvconf 支援度比 systemd-resolved 好很多。

另外一個社訊的共識是 systemd 多做了很多不屬於他的事情,像是跑去處理網路 (systemd-networkd),或是 NTP client (systemd-timedated),處理得很半吊子...

但偏偏市占率大的 distribution 都跳過去用 systemd,而 OpenRC 只有少數幾個 distribution 在用,佔有率差太多...

Related

Ubuntu 20.04 下用 resolvconf 取代 systemd-resolved (因為 PPPoE)

如同在「升級跳板機」這邊提到的,這台跳板機是跑 Ubuntu 20.04,加上需要跑 PPPoE,我就遇到透過 PPPoE 拿到的 DNS 無法套用的系統內。 這點在「add pppoe support to systemd-networkd」這邊有被提到,而且看起來 Debian 那邊已經套用 patch 上去了,但 Ubuntu 這邊似乎還沒... 我看了看還是決定先暫時先回頭用 resolvconf,可以只用指令解決: sudo apt install -y resolvconf sudo systemctl disable systemd-resolved 然後重開確認後就可以收工...

December 1, 2020

In "Computer"

用 Git 2.38 內建的 Scalar 管理大量的 repository

在「Highlights from Git 2.38」這邊有介紹 Git 2.38 加入了微軟開發的 Scalar,是一個用來管理大量 repository 以及巨大 repository 的工具。 第一次用 scalar register 看起來會先有一些前置作業,在掛 repository 進去的時候就會自動去註冊 timers: Created symlink /home/gslin/.config/systemd/user/timers.target.wants/[email protected] → /home/gslin/.config/systemd/user/[email protected]. Created symlink /home/gslin/.config/systemd/user/timers.target.wants/[email protected] → /home/gslin/.config/systemd/user/[email protected]. Created symlink /home/gslin/.config/systemd/user/timers.target.wants/[email protected] → /home/gslin/.config/systemd/user/[email protected]. 這樣看起來應該是每個小時會跑一些東西?文件上看起來是會在背景先去拉一些東西,還有定時跑 GC? 接下來就是把目錄下所有的 git repository 丟進去: find . -maxdepth 1 -mindepth 1 -type d | xargs…

October 7, 2022

In "Computer"

當 Daemon 死掉時自動重新跑起...

以前確保 daemon 掛掉時會重新跑起來大概有幾個方式,像是用 Monit 顧,然後再用 /etc/inittab 確保 Monit 不會掛掉... 在 systemd 的年代,因為 systemd 已經被保護起來,而重跑這個功能在 systemd 裡就有支援,不需要用 Monit 這類程式了。 在 manual 裡搜尋 restart 可以看到幾個參數: Restart= RestartForceExitStatus= RestartPreventExitStatus= RestartSec= 這次是遇到 SmokePing 的 FastCGI daemon 每隔幾天會自己死掉,導致 nginx 丟出 503 然後被 UptimeRobot 偵測到而拋出警告。 但這個問題只有在一台伺服器會發生,而 log 裡也沒翻到可以繼續 debug 的錯誤訊息,試著猜測一些情境去搜尋引擎找也沒翻到... 就決定先 workaround 來處理,然後就發現現在已經不太需要用 Monit 來處理這個問題了。

October 22, 2018

In "Computer"

a611ee8db44c8d03a20edf0bf5a71d80?s=49&d=identicon&r=gAuthor Gea-Suan LinPosted on January 8, 2024Categories Computer, Murmuring, SoftwareTags linux, systemd

Leave a Reply

Your email address will not be published. Required fields are marked *

Comment *

Name *

Email *

Website

Notify me of follow-up comments by email.

Notify me of new posts by email.

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Learn More)

Post navigation


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK