Life With systemd Part1

Posted on Thu 15 November 2012 in misc

I rolled out a new server recently and very nearly did not put opensuse on it based and the thought of having to learn systemd.  I can see why SysVInit could have done with being replaced but I didn't really see it as pressing.  Anyway, here's my braindump of learning it so far!

First thing I dislike is that it pages to $PAGER by default.  Let's turn that off

export SYSTEMD_PAGER='' (I've added this to my ~/.zshrc)

ls -l /etc/systemd/system/ - What is the default target? (usually a symlink to another target)

systemctl show -p Wants - What does this target load (want and can fail)

systemctl show -p Requires - What does this target load (want and can't fail)

systemctl show -p MainPID icecast.service - Show the main pid of the process (0 if not running)

systemctl show -p icecast.service - Show all systemd values for icecast.service

systemctl {start,stop,restart} something.service - Like service something {start,stop.restart}*

systemd-analyze blame - How long did each unit take to start

systemctl list-unit-files  - list all available systemd unit files

systemctl list-unit - list all loaded units

filter the above 2 outputs e.g.

systemctl list-units --type=service or  

systemctl --type=service - show running services

systemctl --type=target - show running targets