Skip to content

Commit 5085dc0

Browse files
committed
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
1 parent 66a14df commit 5085dc0

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

doc/source/systemd.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,11 @@ When outputting to the terminal using the default pager, long lines
118118
appear to be truncated, but horizontal scrolling is supported via the
119119
left/right arrow keys.
120120

121+
You can pipe the output to another tool, such as ``grep``. For
122+
example, to find a server instance UUID in the nova logs::
123+
124+
sudo journalctl -a --unit devstack@n-* | grep 58391b5c-036f-44d5-bd68-21d3c26349e6
125+
121126
See ``man 1 journalctl`` for more.
122127

123128
Debugging

0 commit comments

Comments
 (0)