From 66a14df49ebe99805e6a332a2c346ba3e1290a68 Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Fri, 22 Sep 2017 20:51:38 -0400 Subject: [PATCH] doc: prefix journalctl examples with sudo In a devstack environment you likely need to use sudo to run the journalctl command, so this adds that to the examples. Change-Id: Ibe6b71285a3014e80e06a50130f18bfbdb4ff3ab --- doc/source/systemd.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/source/systemd.rst b/doc/source/systemd.rst index c1d2944057..523d399c62 100644 --- a/doc/source/systemd.rst +++ b/doc/source/systemd.rst @@ -94,25 +94,25 @@ query facilities. We'll start with some common options. Follow logs for a specific service:: - journalctl -f --unit devstack@n-cpu.service + sudo journalctl -f --unit devstack@n-cpu.service Following logs for multiple services simultaneously:: - journalctl -f --unit devstack@n-cpu.service --unit devstack@n-cond.service + sudo journalctl -f --unit devstack@n-cpu.service --unit devstack@n-cond.service or you can even do wild cards to follow all the nova services:: - journalctl -f --unit devstack@n-* + sudo journalctl -f --unit devstack@n-* Use higher precision time stamps:: - journalctl -f -o short-precise --unit devstack@n-cpu.service + sudo journalctl -f -o short-precise --unit devstack@n-cpu.service By default, journalctl strips out "unprintable" characters, including ASCII color codes. To keep the color codes (which can be interpreted by an appropriate terminal/pager - e.g. ``less``, the default):: - journalctl -a --unit devstack@n-cpu.service + sudo journalctl -a --unit devstack@n-cpu.service When outputting to the terminal using the default pager, long lines appear to be truncated, but horizontal scrolling is supported via the