[Swift-commit] r3395 - branches/woz-01/libexec/log

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Thu Jun 17 17:22:44 CDT 2010


Author: wozniak
Date: 2010-06-17 17:22:44 -0500 (Thu, 17 Jun 2010)
New Revision: 3395

Added:
   branches/woz-01/libexec/log/extract-coaster-blocks.sh
   branches/woz-01/libexec/log/mkplot.sh
Modified:
   branches/woz-01/libexec/log/coasters.mk
   branches/woz-01/libexec/log/extract-coaster-blocks
   branches/woz-01/libexec/log/makefile
Log:
New single-shot plot tools (mkplot.sh) and related modifications


Modified: branches/woz-01/libexec/log/coasters.mk
===================================================================
--- branches/woz-01/libexec/log/coasters.mk	2010-06-17 21:24:39 UTC (rev 3394)
+++ branches/woz-01/libexec/log/coasters.mk	2010-06-17 22:22:44 UTC (rev 3395)
@@ -1,8 +1,8 @@
-coaster-block-timeline.png: coaster-block-timeline.data
+coaster-block-timeline.png: coaster-blocks.data
 	gnuplot $(SWIFT_PLOT_HOME)/coaster-block-timeline.plot
 
-coaster-block-timeline.data: coasters.tmp
-	extract-coaster-blocks coasters.tmp
+coaster-blocks.data: coasters.tmp
+	extract-coaster-blocks.sh < coasters.tmp > coaster-blocks.data
 
 coasters.tmp: $(LOG)
 	extract-coaster-timeline $(LOG)

Modified: branches/woz-01/libexec/log/extract-coaster-blocks
===================================================================
--- branches/woz-01/libexec/log/extract-coaster-blocks	2010-06-17 21:24:39 UTC (rev 3394)
+++ branches/woz-01/libexec/log/extract-coaster-blocks	2010-06-17 22:22:44 UTC (rev 3395)
@@ -15,6 +15,7 @@
 		echo "$ID,$ADD" >> block-count-table.tmp
 	else
 		COUNT=`cat block-count-table.tmp | grep "$ID" | cut -d , -f 2`
+	        echo COUNT: _$COUNT_
 		if echo $LINE | grep "BLOCK_ACTIVE" >/dev/null; then
 			RUNNING=$(($RUNNING + $COUNT))
 		fi

Added: branches/woz-01/libexec/log/extract-coaster-blocks.sh
===================================================================
--- branches/woz-01/libexec/log/extract-coaster-blocks.sh	                        (rev 0)
+++ branches/woz-01/libexec/log/extract-coaster-blocks.sh	2010-06-17 22:22:44 UTC (rev 3395)
@@ -0,0 +1,28 @@
+#/bin/bash 
+
+set -x
+
+rm -fv block-count-table.tmp 
+
+IFS=$'\n'
+REQUESTED=0
+RUNNING=0
+for LINE in $( cat ); do
+  TIME=`echo $LINE | sed 's/^\([^ ]*\) .*$/\1/' `
+  ID=`echo $LINE | sed 's/^.*id=\([^ ]*\)\(,.*$\|$\)/\1/'`
+  ADD=`echo $LINE | sed -n 's/^.*BLOCK_REQUESTED.*w=\([^ ]*\),.*$/\1/p'`
+  if [ "$ADD" != "" ]; then
+    REQUESTED=$(($REQUESTED + $ADD))
+    echo "$ID,$ADD" >> block-count-table.tmp
+  else
+    COUNT=`cat block-count-table.tmp | grep "$ID" | cut -d , -f 2`
+    if echo $LINE | grep "BLOCK_ACTIVE" >/dev/null; then
+      RUNNING=$(($RUNNING + $COUNT))
+    fi
+    if echo $LINE | grep "BLOCK_SHUTDOWN" >/dev/null; then
+      RUNNING=$(($RUNNING - $COUNT))
+      REQUESTED=$(($REQUESTED - $COUNT))
+    fi
+  fi
+  echo $TIME $REQUESTED $RUNNING 
+done


Property changes on: branches/woz-01/libexec/log/extract-coaster-blocks.sh
___________________________________________________________________
Name: svn:executable
   + *

Modified: branches/woz-01/libexec/log/makefile
===================================================================
--- branches/woz-01/libexec/log/makefile	2010-06-17 21:24:39 UTC (rev 3394)
+++ branches/woz-01/libexec/log/makefile	2010-06-17 22:22:44 UTC (rev 3395)
@@ -2,13 +2,13 @@
 
 all: clean webpage
 
-include makefile.implicit
-include makefile.falkon
-include makefile.karatasks
-include makefile.webpage
-include makefile.kickstart
-include makefile.errors
-include makefile.coasters
+include $(SWIFT_PLOT_HOME)/implicit.mk
+include $(SWIFT_PLOT_HOME)/falkon.mk
+include $(SWIFT_PLOT_HOME)/karatasks.mk
+include $(SWIFT_PLOT_HOME)/webpage.mk
+include $(SWIFT_PLOT_HOME)/kickstart.mk
+include $(SWIFT_PLOT_HOME)/errors.mk
+include $(SWIFT_PLOT_HOME)/coasters.mk
 
 TMPS = start-times.data kickstart-times.data start-time.tmp end-time.tmp threads.list tasks.list *.shifted *.event *.coloured-event *.total *.tmp *.transitions *.last karatasks-type-counts.txt index.html *.lastsummary execstages.plot total.plot colour.plot jobs-sites.html jobs.retrycount.summary kickstart.stats execution-counts.txt site-duration.txt jobs.retrycount sp.plot karatasks.coloured-sorted-event *.cedps *.stats t.inf *.seenstates tmp-* clusterstats  trname-summary sites-list.data.nm info-md5sums pse2d-tmp.eip karajan.html falkon.html execute2.html info.html execute.html kickstart.html scheduler.html assorted.html
 

Added: branches/woz-01/libexec/log/mkplot.sh
===================================================================
--- branches/woz-01/libexec/log/mkplot.sh	                        (rev 0)
+++ branches/woz-01/libexec/log/mkplot.sh	2010-06-17 22:22:44 UTC (rev 3395)
@@ -0,0 +1,65 @@
+#!/bin/bash
+
+# MKPLOT
+# New log plot entry point
+
+# Usage: 
+# mklog.sh -h 
+#               print help 
+# mklog.sh -l 
+#               list pngs we know work
+# mklog.sh <log> <png> 
+#               generate a png from a log
+
+message_help()
+{
+  echo "See the top of this file for usage"
+  exit 0
+}
+
+message_list()
+{
+  echo "Known PNG output:"
+  for PNG in ${KNOWN_PNGS[@]}
+   do
+   printf "\t"
+   echo ${PNG}
+  done
+  exit 0
+}
+
+# List of known PNGs: what we know will work
+KNOWN_PNGS=()
+KNOWN_PNGS=( ${KNOWN_PNGS[@]} coaster-block-timeline.png )
+
+export SWIFT_PLOT_HOME=$( dirname $0)/../../libexec/log
+
+while getopts "hl" OPTION
+ do
+ case ${OPTION}
+   in
+   h) message_help ;;
+   l) message_list ;;
+ esac
+done
+
+# Input parameters
+# The log file to plot
+LOG=$1
+# The plot to generate
+PNG=$2 
+
+if [[ ${LOG} == "" ]] 
+  then
+  echo "No log file given!"
+  exit 1
+fi
+
+if [[ ${PNG} == "" ]] 
+  then
+  echo "No png target given!"
+  exit 1
+fi
+
+MAKEFILE=${SWIFT_PLOT_HOME}/makefile
+make -f ${MAKEFILE} ${PNG}


Property changes on: branches/woz-01/libexec/log/mkplot.sh
___________________________________________________________________
Name: svn:executable
   + *




More information about the Swift-commit mailing list