32 lines
No EOL
676 B
Markdown
32 lines
No EOL
676 B
Markdown
---
|
|
creation date: 2022-01-08
|
|
tags: [note,systemd,linux]
|
|
---
|
|
|
|
## 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
|
|
``` |