From 5085dc0fa50da4a78820c814005f89ab02d36d84 Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Fri, 22 Sep 2017 20:54:39 -0400 Subject: [PATCH] doc: add journalctl example for grepping the logs I had to dig around for awhile to figure this out, so this adds an example on how to grep journalctl nova logs for a server instance UUID. Change-Id: I6a5c47fbcba3af1822e2f9efc2ac20ebe0387f3f --- doc/source/systemd.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/source/systemd.rst b/doc/source/systemd.rst index 523d399c62..c9614db8a6 100644 --- a/doc/source/systemd.rst +++ b/doc/source/systemd.rst @@ -118,6 +118,11 @@ When outputting to the terminal using the default pager, long lines appear to be truncated, but horizontal scrolling is supported via the left/right arrow keys. +You can pipe the output to another tool, such as ``grep``. For +example, to find a server instance UUID in the nova logs:: + + sudo journalctl -a --unit devstack@n-* | grep 58391b5c-036f-44d5-bd68-21d3c26349e6 + See ``man 1 journalctl`` for more. Debugging