Change-Id: I3d807cd342f30eada04a6be2af7db482f9c4a796
| ... | ... |
@@ -74,6 +74,20 @@ See status of a unit:: |
| 74 | 74 |
|
| 75 | 75 |
sudo systemctl status devstack@n-cpu.service |
| 76 | 76 |
|
| 77 |
+Operating on more than one unit at a time |
|
| 78 |
+----------------------------------------- |
|
| 79 |
+ |
|
| 80 |
+Systemd supports wildcarding for unit operations. To restart every |
|
| 81 |
+service in devstack you can do that following:: |
|
| 82 |
+ |
|
| 83 |
+ sudo systemctl restart devstack@* |
|
| 84 |
+ |
|
| 85 |
+Or to see the status of all Nova processes you can do:: |
|
| 86 |
+ |
|
| 87 |
+ sudo systemctl status devstack@n-* |
|
| 88 |
+ |
|
| 89 |
+We'll eventually make the unit names a bit more meaningful so that |
|
| 90 |
+it's easier to understand what you are restarting. |
|
| 77 | 91 |
|
| 78 | 92 |
Querying Logs |
| 79 | 93 |
============= |
| ... | ... |
@@ -92,9 +106,13 @@ Follow logs for a specific service:: |
| 92 | 92 |
|
| 93 | 93 |
Following logs for multiple services simultaneously:: |
| 94 | 94 |
|
| 95 |
- journalctl -f --unit devstack@n-cpu.service --user-unit |
|
| 95 |
+ journalctl -f --unit devstack@n-cpu.service --unit |
|
| 96 | 96 |
devstack@n-cond.service |
| 97 | 97 |
|
| 98 |
+or you can even do wild cards to follow all the nova services:: |
|
| 99 |
+ |
|
| 100 |
+ journalctl -f --unit devstack@n-* |
|
| 101 |
+ |
|
| 98 | 102 |
Use higher precision time stamps:: |
| 99 | 103 |
|
| 100 | 104 |
journalctl -f -o short-precise --unit devstack@n-cpu.service |
| ... | ... |
@@ -138,14 +156,8 @@ that. It would let us do things like:: |
| 138 | 138 |
|
| 139 | 139 |
journalctl INSTANCE_ID=...... |
| 140 | 140 |
|
| 141 |
-And get all lines related to the request id or instance id. |
|
| 142 |
- |
|
| 143 |
-sub targets/slices |
|
| 144 |
- |
|
| 145 |
-We might want to create per project slices so that it's easy to |
|
| 146 |
-follow, restart all services of a single project (like swift) without |
|
| 147 |
-impacting other services. |
|
| 141 |
+And get all lines related to the request id or instance id. (Note: |
|
| 142 |
+this work has been started at https://review.openstack.org/#/c/451525/) |
|
| 148 | 143 |
|
| 149 | 144 |
log colorizing |
| 150 | 145 |
-------------- |