From d6eaa9f5b668d6cf7c45e83049ccc0dc7419f375 Mon Sep 17 00:00:00 2001 From: afazekas Date: Wed, 23 Jul 2014 19:06:24 +0200 Subject: [PATCH] Debug 'Cannot allocate memory' Several jobs fails with [OSError] Cannot allocate memory, but it is not clear why. Is it caused by multiple run away process, or just on process become fat. Adding line to cleanup_host to save the final process list including the memory usage. Change-Id: Ic7455d689869092703974512d14bd121e4b44f1b --- functions.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/functions.sh b/functions.sh index 2fe74ed8..c7f524be 100644 --- a/functions.sh +++ b/functions.sh @@ -667,6 +667,9 @@ function cleanup_host { find $BASE/logs/rabbitmq -type f -exec mv '{}' '{}'.txt \; fi + # final memory usage and process list + ps -eo user,pid,ppid,lwp,%cpu,%mem,size,rss,cmd > $BASE/logs/ps.txt + # Compress all text logs sudo find $BASE/logs -iname '*.txt' -execdir gzip -9 {} \+ sudo find $BASE/logs -iname '*.dat' -execdir gzip -9 {} \+