SystemD: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(Die Seite wurde neu angelegt: „== Konfiguration == === /etc/systemd/journald.conf === <pre>Storage=persistent SystemMaxFileSize=50M </pre> === systemctl === <pre> </pre> === journalctl ===…“) |
|||
Zeile 4: | Zeile 4: | ||
SystemMaxFileSize=50M | SystemMaxFileSize=50M | ||
</pre> | </pre> | ||
* systemctl restart systemd-journald.service | |||
== Kommandos == | |||
=== systemctl === | === systemctl === | ||
<pre> | <pre> | ||
</pre> | </pre> | ||
=== journalctl === | === journalctl === | ||
<pre> | <pre>journalctl --since yesterday | --since "2016-03-16 02:00:00" | --since 09:00 --until "1 hour ago" | ||
journalctl --list-boots | |||
journalctl -b -1 # since last boot (relative pointer -1) | |||
</pre> | </pre> | ||
== Beispiel Service | == Beispiel Service Definitionsdatei == | ||
<pre>[Unit] | <pre>[Unit] | ||
Description=Redis persistent key-value database | Description=Redis persistent key-value database |
Version vom 15. Juli 2016, 08:02 Uhr
Konfiguration
/etc/systemd/journald.conf
Storage=persistent SystemMaxFileSize=50M
- systemctl restart systemd-journald.service
Kommandos
systemctl
journalctl
journalctl --since yesterday | --since "2016-03-16 02:00:00" | --since 09:00 --until "1 hour ago" journalctl --list-boots journalctl -b -1 # since last boot (relative pointer -1)
Beispiel Service Definitionsdatei
[Unit] Description=Redis persistent key-value database After=network.target [Service] ExecStart=/usr/local/bin/redis-server ExecStop=/usr/local/bin/redis-shutdown WorkingDirectory=/var/lib/redis User=redis Group=redis [Install] WantedBy=multi-user.target