Browse code

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

Matt Riedemann authored on 2017/09/23 09:54:39
Showing 1 changed files
... ...
@@ -118,6 +118,11 @@ When outputting to the terminal using the default pager, long lines
118 118
 appear to be truncated, but horizontal scrolling is supported via the
119 119
 left/right arrow keys.
120 120
 
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
+
121 126
 See ``man 1 journalctl`` for more.
122 127
 
123 128
 Debugging