From 095c393ed30e37075a2060244afe64d50c413609 Mon Sep 17 00:00:00 2001 From: Jaseem Abid Date: Wed, 31 Jul 2019 12:45:03 +0100 Subject: [PATCH] journalctl: add options to filter by time --- pages/linux/journalctl.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pages/linux/journalctl.md b/pages/linux/journalctl.md index 1e238842e6..6a5d2ada4f 100644 --- a/pages/linux/journalctl.md +++ b/pages/linux/journalctl.md @@ -18,6 +18,14 @@ `journalctl -u {{unit}}` +- Show messages by a specific unit in last 15m: + +`journalctl -u {{unit}} --since {{-15m}}` + +- Filter messages within a time range (either timestamp or placeholders like "yesterday"): + +`journalctl -u {{unit}} --since {{now|today|yesterday|tomorrow}} --until {{YYYY-MM-DD HH:MM:SS}}` + - Show all messages by a specific process: `journalctl _PID={{pid}}`