Systemd (en)
- in Deutsch | - in English |
systemd is the init system used on the Dreambox since OE 2.2. The system starts, monitors and stops services. The activities of the services are also logged by this system. It can also be used to configure the system and to mount devices. Compared to the older SysVinit system, the systemd is also faster because it can start services simultaneously. Systemd is backwards compatible for SysVinit scripts, which are still used on the Dreambox.
Inhaltsverzeichnis
Systemctl
Systemctl is the main program of systemd
. The command starts, stops, enables, disables services and can display status information. General configuration files can be found in /etc/systemd
. Config files which are created manually or belong to services can be found in the directory /etc/systemd/system
, or /lib/systemd/system
.
Important parameters for systemctl
which are used to manage services are: start
, stop
, restart
, enable
, or disable
. In this article the management of services is explained with some examples.
The following examples can be used with enigma2 as $service_name .
|
Show information about systemctl
systemctl --help
Start service
systemctl start $service_name
Stop service
systemctl stop $service_name
Disable service
The following command disables a service. After a restart, the service will no longer be startet.
systemctl disable $service_name
Enable service
systemctl enable $service_name
Show service status
systemctl status $service_name
Journalctl
An additional important command is journalctl
. It can be used to read, filter, export or check log entries of systemd
. The output in the terminal can be stopped with Ctrl+c.
Show options for journalctl
journalctl --help
Show system journal
The command will show all information concerning system. With PgUP and PgDn the journal can be browsed.
journalctl
If the actual information should be displayed immediately, use the option -f
for follow.
journalctl -f
Show journal for a service
The command shows the information for a specific service.
journalctl -f -u $service_name
Write journal in a file
The command saves the information in a file.
journalctl -f -u $service_name >> /tmp/journal.log
Other interesting commands
Change host name
Changes the name (/etc/hostname
) of the Dreambox, important if you use 2 identical Dreambox models.
hostnamectl set-hostname $new_name
Set system time / date
To see the time / date.
timedatectl status
To set the time / date.
timedatectl set-time "yyyy-MM-dd hh:mm:ss"
Show device status
systemctl /dev/$devicename status
Reboot Dreambox
systemctl reboot
Shut down Dreambox
systemctl poweroff