lk/system/systemd/journal.md

39 lines
551 B
Markdown
Raw Permalink Normal View History

2022-01-16 18:20:39 +00:00
---
title: "journal"
2022-01-26 22:35:07 +00:00
tags: [ "Documentation", "systemd" ]
2022-01-16 18:20:39 +00:00
---
2024-02-28 17:45:21 +00:00
See a running log of all system messages:
```bash
journalctl -f
```
Or just one unit (`sshd`):
```bash
journalctl -f -u sshd
```
2020-01-02 00:04:35 +00:00
Find errors since November
```bash
journalctl --since=2018-11-01 --grep="EXT4-fs error"
```
2020-01-02 00:04:35 +00:00
Limit size to 2G.
```bash
journalctl --vacuum-size=2G
2024-02-28 17:36:56 +00:00
```
2024-02-28 17:45:21 +00:00
Log the fact that you've installed your own `dnsmasq` on your system to `journalctl`, so that you can notice why your system's broken:
```bash
logger "Installed new dnsmasq"
sudo journalctl -f
```