34 lines
754 B
Markdown
34 lines
754 B
Markdown
|
---
|
||
|
creation date: 2022-01-08
|
||
|
tags: [note,systemd,linux,archlinux]
|
||
|
---
|
||
|
|
||
|
Arch Wiki reference: https://wiki.archlinux.org/index.php/Systemd/
|
||
|
|
||
|
## Taming the journal's size
|
||
|
|
||
|
Systemd's system journal's size can go out of control. There are some things you can do to keep it in control:
|
||
|
|
||
|
```shell
|
||
|
journalctl --vacuum-size=512M
|
||
|
journalctl --vacuum-time=4weeks
|
||
|
```
|
||
|
|
||
|
## Forwarding the journal to /dev/tty12
|
||
|
|
||
|
**You really want this? It's basically a leak available with a shortcut.**
|
||
|
|
||
|
This is very simple. Just create the file `/etc/systemd/journald.conf.d/fw-tty12.conf` and fill it like this:
|
||
|
|
||
|
```shell
|
||
|
[Journal]
|
||
|
ForwardToConsole=yes
|
||
|
TTYPath=/dev/tty12
|
||
|
MaxLevelConsole=info
|
||
|
```
|
||
|
|
||
|
Then, restart the service:
|
||
|
|
||
|
```shell
|
||
|
systemctl restart systemd-journald.service
|
||
|
```
|