''systemctl'' : List all running services ''systemctl start example1'' : Activates the service "example1" immediately ''systemctl stop example1'' : Deactivates the service "example1" immediately ''systemctl restart example1'' : Restarts the service "example1" immediately: ''systemctl status example1'' : Shows status of the service "example1" ''systemctl enable example1'' : Enables "example1" to be started on bootup ''systemctl disable example1'' : Disables "example1" to neot start during bootup ''systemctl list-units --type=service'' : list all service units
vi /etc/systemd/system/<service_name>.service chmod 644 /etc/systemd/system/<service_name>.service systemctl --system daemon-reload systemctl start mon-service.service systemctl enable mon-service.service
See all systemctl since last boot : journalctl -xa
Remove “quiet” from Kernel command line (so called “cmdline” or “grub line”) : GRUB_CMDLINE_LINUX=“systemd.log_target=kmsg systemd.log_level=debug”
⇒ update-grub ⇒ check : cat /proc/cmdline
after reboot
Increase verbosity via /etc/systemd/system.conf : uncomment : “LogLevel=debug” and “LogTarget=syslog-or-kmsg”.
Boot an emergency shell : Add systemd.unit=rescue.target
to Kernel command line.
Enable the debug shell : systemctl enable debug-shell.service
(You can do this in a chroot environment after booting a rescue system.) This start a root shell on TTY 9.
See : http://freedesktop.org/wiki/Software/systemd/Debugging
bind mount : 'umount $CHROOT/dev' will unmount /dev !
mount --bind --make-rslave / $CHROOT mount --bind --make-rslave /dev/ $CHROOT/dev
systemd-analyze systemd-analyze blame systemd-analyze critical-chain [UNIT...]
Graphs, dump, etc : http://www.freedesktop.org/software/systemd/man/systemd-analyze.html
Systemd-bootchart : http://www.freedesktop.org/software/systemd/man/systemd-bootchart.html
apt-get install graphviz systemd-analyze plot > plot.svg systemd-analyze dot --order | dot -Tsvg > systemd.svg
See bootchart2 ?
systemd-delta : To see all local configuration: systemd-delta /run : To see all runtime configuration: systemd-delta systemd/system : To see all system unit configuration changes: systemd-delta --type=extended /run/systemd/system : To see all runtime "drop-in" changes for system units:
units files : case sensitive sections
not available for device, target, snapshot, and scope.
Another unit must exist that will be be activated when certain activity is detected at the path location. Path activity is determined thorugh inotify events.
Provide flexibility in configuring units by allowing certain parts of the file to utilize dynamic information that will be available at runtime. identification :