Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102922045
calc-tasks-per-node
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Feb 25, 12:48
Size
1000 B
Mime Type
text/x-shellscript
Expires
Thu, Feb 27, 12:48 (1 d, 20 h)
Engine
blob
Format
Raw Data
Handle
24406939
Attached To
R3704 elastic-yarn
calc-tasks-per-node
View Options
#!/bin/bash
if [ $# -ne 1 ]
then
echo "give dir"
exit
fi
cd $1
DIR=$1
for file in `ls | grep simulation.log`
do
LINE=`tac $file | grep -m 1 statistics`
AVG_LIST=`echo $LINE | sed 's/node/\nnode/g' | grep node | sed 's/-AVG/ /g' | sed 's/:MAX/ /g' | awk '{print $2}'`
MAX_LIST=`echo $LINE | sed 's/node/\nnode/g' | grep node | sed 's/-AVG/ /g' | sed 's/:MAX/ /g' | awk '{print $3}'`
MIN_AVG=`echo $AVG_LIST | tr " " "\n" | ~/stats | grep min | awk '{print $2}'`
MAX_AVG=`echo $AVG_LIST | tr " " "\n" | ~/stats | grep max | awk '{print $2}'`
AVG_AVG=`echo $AVG_LIST | tr " " "\n" | ~/stats | grep mean | awk '{print $2}'`
MIN_MAX=`echo $MAX_LIST | tr " " "\n" | ~/stats | grep min | awk '{print $2}'`
MAX_MAX=`echo $MAX_LIST | tr " " "\n" | ~/stats | grep max | awk '{print $2}'`
AVG_MAX=`echo $MAX_LIST | tr " " "\n" | ~/stats | grep mean | awk '{print $2}'`
echo "$file AVG(min/avg/max) $MIN_AVG $AVG_AVG $MAX_AVG MAX(min/avg/max) $MIN_MAX $AVG_MAX $MAX_MAX"
done
Event Timeline
Log In to Comment