'tools/mlock_report.py' script requires 'psutil' package to be
installed. This ensures it is done before memory_peak service is
started.
Partial-Bug: #1860753
Change-Id: I7b2b6eaf9856c6057e1a4a0054d15074150a6cb6
| ... | ... |
@@ -9,6 +9,7 @@ |
| 9 | 9 |
|
| 10 | 10 |
# ``stack.sh`` calls the entry points in this order: |
| 11 | 11 |
# |
| 12 |
+# - install_dstat |
|
| 12 | 13 |
# - start_dstat |
| 13 | 14 |
# - stop_dstat |
| 14 | 15 |
|
| ... | ... |
@@ -16,6 +17,14 @@ |
| 16 | 16 |
_XTRACE_DSTAT=$(set +o | grep xtrace) |
| 17 | 17 |
set +o xtrace |
| 18 | 18 |
|
| 19 |
+# install_dstat() - Install prerequisites for dstat services |
|
| 20 |
+function install_dstat {
|
|
| 21 |
+ if is_service_enabled memory_tracker; then |
|
| 22 |
+ # Install python libraries required by tools/mlock_report.py |
|
| 23 |
+ pip_install_gr psutil |
|
| 24 |
+ fi |
|
| 25 |
+} |
|
| 26 |
+ |
|
| 19 | 27 |
# start_dstat() - Start running processes |
| 20 | 28 |
function start_dstat {
|
| 21 | 29 |
# A better kind of sysstat, with the top process per time slice |