File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ DURATION=$3
1010VERBOSE=${4:- 0}
1111SIGNAL_FILE=$5
1212STARTI=$6
13+ CACHE_FILE=" /tmp/cache.log"
1314
1415if [ -z " $PID " ] || [ -z " $OUTPUT_FILE " ] || [ -z " $DURATION " ]; then
1516 echo " Usage: $0 <pid> <output_file> <duration> [verbose_flag] [signal_file]"
9091
9192 if [ ! -z " $ALO_PID " ] && [ ! -z " $PHY " ]; then
9293 echo $TIME " " $PHY " " $ALO_PID " " $ALO_TOTAL " " $Limit $PID >> " $OUTPUT_FILE "
94+ if [[ $TYPE -eq 2 ]]; then
95+ echo $TIME " " 0" " 0" " $ALO_TOTAL " " $Limit >> " $CACHE_FILE "
96+ fi
9397 log_verbose " $i second is collected to $OUTPUT_FILE "
9498 else
9599 echo $TIME " " 0" " 0" " $ALO_TOTAL " " $Limit >> " $OUTPUT_FILE "
Original file line number Diff line number Diff line change @@ -85,6 +85,9 @@ echo "Starting collection processes..."
8585NS=1000000000
8686counter=0
8787
88+ CACHE_FILE=" /tmp/cache.log"
89+ touch $CACHE_FILE
90+
8891mkdir -p data/python3
8992for (( i= 0 ;i<= $DURATION ;i++ ))
9093do
122125 if [ -z " $COLLECT_PIDS " ]; then
123126 if [ ! -z " $PYTHON_SCRIPT " ]; then
124127 echo " New Python process PID $pid : $SCRIPT_NAME . Start Collection"
128+ cp $CACHE_FILE " data/python3/mem_$SCRIPT_NAME .log"
125129 counter=$(( counter+ 1 ))
126130 bash collect.sh " $SCRIPT_NAME " " data/python3/mem_$SCRIPT_NAME .log" $DURATION $VERBOSE " $SIGNAL_FILE " $i &
127131 fi
165169
166170pkill -f collect.sh
167171rm -rf /tmp/signalback
172+ rm $CACHE_FILE
168173echo " "
169174echo " Data Collection - OK!"
170175
You can’t perform that action at this time.
0 commit comments