Browse code

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

Federico Ressi authored on 2020/01/24 19:44:46
Showing 2 changed files
... ...
@@ -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
... ...
@@ -867,6 +867,13 @@ if is_service_enabled tls-proxy; then
867 867
     init_cert
868 868
 fi
869 869
 
870
+# Dstat
871
+# -----
872
+
873
+# Install dstat services prerequisites
874
+install_dstat
875
+
876
+
870 877
 # Check Out and Install Source
871 878
 # ----------------------------
872 879