Jump to: navigation, search

XELK-AN-008: How to use systemd on an Embedded system

22 bytes removed, 21:00, 24 September 2019
Putting it all together: create a new service
systemctl enable wpa_supplicant@wlan0
=== Logging with systemd (<code>journalctl</code>) ===
systemd has its own logging process called <code>journal</code> avoiding to start the ''syslog'' daemon. For the status information it is possible to use <code>journalctl</code>.
=== Analyze the boot time===
Boot time analysis is one of the most important and interesting activity for an embedded system: systemd provide an userspace command called <code>systemd-analyze</code> to help in this (hard) task
<code>systemd-analyze</code> provides a good level of boot time information for further optimizations:
==== time ====
The <code>time</code> parameter gives the total amount of seconds used for starting the kernel and reaching the userspace.
==== blame ====
The <code>blame</code> parameter gives the list of started services and how long they took for starting:
==== critical-chain ====
The <code>critical-chain</code> parameter shows the startup process flow and the time consumed by each service.
=== Putting it all together: create a new service ===
For creating a new service the following file has to be created:
==== Service example ====
The following paragraph shows how to create a new service called <code>iperf3</code> executing the iperf3 command in server mode
===== Basic settings =====
{| class="wikitable"
===== Running a service =====
Starting the service from userspace:

Navigation menu