From 19e4d972884e422d691c4cc1fe9e7ed3a03a2c01 Mon Sep 17 00:00:00 2001 From: Federico Ressi Date: Fri, 24 Jan 2020 11:44:46 +0100 Subject: [PATCH] Install psutil required by tools/mlock_report.py script '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 --- lib/dstat | 9 +++++++++ stack.sh | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/lib/dstat b/lib/dstat index fe38d75585..f5bd2bb948 100644 --- a/lib/dstat +++ b/lib/dstat @@ -9,6 +9,7 @@ # ``stack.sh`` calls the entry points in this order: # +# - install_dstat # - start_dstat # - stop_dstat @@ -16,6 +17,14 @@ _XTRACE_DSTAT=$(set +o | grep xtrace) set +o xtrace +# install_dstat() - Install prerequisites for dstat services +function install_dstat { + if is_service_enabled memory_tracker; then + # Install python libraries required by tools/mlock_report.py + pip_install_gr psutil + fi +} + # start_dstat() - Start running processes function start_dstat { # A better kind of sysstat, with the top process per time slice diff --git a/stack.sh b/stack.sh index fe71eae36c..2a6e470f7e 100755 --- a/stack.sh +++ b/stack.sh @@ -867,6 +867,13 @@ if is_service_enabled tls-proxy; then init_cert fi +# Dstat +# ----- + +# Install dstat services prerequisites +install_dstat + + # Check Out and Install Source # ----------------------------