aboutsummaryrefslogtreecommitdiffstats
path: root/run_policy.sh
diff options
context:
space:
mode:
authorAlex Shatov <alexs@att.com>2018-05-18 15:13:40 -0400
committerAlex Shatov <alexs@att.com>2018-05-18 15:13:40 -0400
commit5105258de50958e3b060f961dd0ddc88d71b7560 (patch)
tree573a683e3c80dcaa59dfa21541d44f566886df9d /run_policy.sh
parentf2d7bef13705812c1bf147c2fb65162fbf385c6b (diff)
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
Diffstat (limited to 'run_policy.sh')
-rw-r--r--run_policy.sh8
1 files changed, 7 insertions, 1 deletions
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 @@ cat /etc/hosts | tee -a ${LOG_FILE}
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 @@ function finish {
}
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)