System V style init and systemd in practice
|
Administration with systemadm (systemd)
This GUI program, available on Ubuntu via the systemd-ui package, makes it possible to quickly and easily administer systemd and the services [5][6].
The interface is self-explanatory and the operation itself takes little getting used to. Figure 10 shows a status request.
syslog vs. journald
Now that you are using systemd for your services, you should also use systemd-journald instead of syslog . This can be handled as you prefer. For example, you can change from syslog to systemd-journald or vice versa.
When you use journald , the log data will only be saved during runtime. You can modify the configuration by changing entries in /etc/systemd/journald.conf . By using the setting Storage=persistent you can permanently save the journal in /var/log/journal . You should limit the size of the log with something like SystemMaxUse=100M . Listing 8 shows all of the items in this file that have been modified. Note that the log files from systemd/journald are not searchable with customary text tools like find, grep, etc. You will need to use journalctl .
Listing 8
Storing Logs Using journald
01 [Journal] 02 Storage=persistent 03 ...... 04 SystemMaxUse=100M 05 ......
To see the logs using journalctl , you can enter the command without any other option and the program will list a complete journal. Table 8 contains some filtering possibilities.
Table 8
Journalctl – Important Options
Limit to one unit | -u UNIT |
Kernel messages | -k |
Additional output of plaintext explanations | -x |
Running display | -f |
Figure 11 shows a journal request that was limited to one service, apache.2service .
Buy this article as PDF
Pages: 1
(incl. VAT)