Page MenuHomec4science

parse_output_file
No OneTemporary

File Metadata

Created
Tue, Feb 25, 16:56

parse_output_file

#!/bin/bash
INFILE=$1
if [ "$$INFILE" == "" ]
then
echo "Give param"
exit
fi
echo "SLS printed runtime: `grep -o 'runTime=[^,]*,' $INFILE | grep -o '[0-9.]*'`"
st_time=`grep 'Registering app' $INFILE | awk '{print $2}'`
echo "Job start: $st_time"
end_time=`grep 'Application Finished - Succeeded' $INFILE | awk '{print $2}'`
echo "Job end: $end_time"
c_002=`grep '000002' $INFILE | head -n 1 | awk '{print $2}'`
echo "First allocated container: $c_002"
echo "End minus Start:" `~/date-diff-ms "$end_time" "$st_time"`
echo "End minus c_002:" `~/date-diff-ms "$end_time" "$c_002"`
for container in `cat $INFILE | grep -o 'container_[0-9_]*' | sort | uniq`
do
c_st=`grep $container $INFILE | grep 'ACQUIRED to RUNNING' | awk '{print $2}'`
c_end=`grep $container $INFILE | grep 'RUNNING to COMPLETED' | awk '{print $2}'`
c_node=`grep $container $INFILE | grep capacity | grep -v release | grep -o 'node[0-9:]*'`
echo $container `~/date-diff-ms "$c_end" "$c_st"` $c_st $c_end $c_node
done

Event Timeline