2.4.4 policy-handler - log process memory
- in search of the memory leak that is falsely reported
by docker stats, the following runtime logging was added
= process_memory - rss and other memory of the current process
= virtual_memory - the memory info of the whole system
= thread_stacks - the active threads with the full stack on each
Change-Id: I5f5ab3a477bfba3aecc5963547aa82da6269670b
Signed-off-by: Alex Shatov <alexs@att.com>
Issue-ID: DCAEGEN2-514
diff --git a/run_policy.sh b/run_policy.sh
index a95aee9..28b5bf8 100644
--- a/run_policy.sh
+++ b/run_policy.sh
@@ -29,7 +29,6 @@
python -m policyhandler/policy_handler >> ${LOG_FILE} 2>&1 &
PID=$!
-echo "running policy_handler as" ${PID} "log" ${LOG_FILE} | tee -a ${LOG_FILE}
function finish {
echo "killing policy_handler ${PID}" $(date +%Y_%m%d-%H:%M:%S.%N) | tee -a ${LOG_FILE}
kill -9 ${PID}
@@ -37,6 +36,13 @@
}
trap finish SIGHUP SIGINT SIGTERM
+echo "running policy_handler as" ${PID} "log" ${LOG_FILE} | tee -a ${LOG_FILE}
+uname -a | tee -a ${LOG_FILE}
+free -h | tee -a ${LOG_FILE}
+df -h | tee -a ${LOG_FILE}
+ps afxvw | tee -a ${LOG_FILE}
+ss -aepi | tee -a ${LOG_FILE}
+
wait ${PID}
echo "---------------------------------------------" >> ${LOG_FILE} 2>&1
mv ${LOG_FILE} ${LOG_FILE}.$(date +%Y-%m-%d_%H%M%S)