Slow boot of #linux? Mayhap don’t just blame #systemd. Try systemd-analyze blame
instead. Or make a nice chart with systemd-analyze plot > foo.svg
for your next presentation 🙂
Tag: systemd
Run multiple garbd arbitrator instances for galera
Use mask to kill systemd services for good
Most Linux users know some systemd by now. There is systemd stop $someservice
and systemd disable $someservice
. If you think that’s all one has to know about systemd you’re missing out on a lof of features. That’s not the story for today tho.
Some services tend to come back even when disabled and stopped. Socket services come to mind. This is e.g. the case for rpcbind starting a portmapper service on tcp/111 that can be used for a DDoS reflection attack. There are various ways to deal with this from uninstall to firewalling or to mask this service. Since everbody on Linux gets to pick their own poision I decided to use mask to make sure this can simply no longer start without having to break dependencies by removing it or fiddle with the firewall:
systemctl stop rpcbind.service
systemctl mask rpcbind.service
Created symlink /etc/systemd/system/rpcbind.service → /dev/null.
systemctl daemon-reload
A masked service can not even be restarted manually any more. It’s dead in the water as long as this symlink exists.
Read more on this from Poettering himself:
User Slice of beko
loaded active active User Slice of beko user-1138.slice
Suspend On Systemd Based Systems
tl,dr: `systemctl suspend`
Sometimes I let my pc play music at night. Spotify still didn’t manage to implement a sleep function (even gorram Audible has this – and chances are the app crashes way before anyway).
I usually use `shutdown -h 60` or similar. Suspend tho? That’s another story. Hint: “suspend” is a bash builtin and not what you’d expect 😉
Looks like this changed (again) from `pm-suspend` to… systemd:
> sleep 1h; systemctl suspend
No sudo. yw.