[Swift-commit] r5560 - trunk/libexec/log-processing

ketan at ci.uchicago.edu ketan at ci.uchicago.edu
Tue Feb 7 21:11:40 CST 2012


Author: ketan
Date: 2012-02-07 21:11:40 -0600 (Tue, 07 Feb 2012)
New Revision: 5560

Added:
   trunk/libexec/log-processing/plot_active.plt
   trunk/libexec/log-processing/plot_cumulative.plt
   trunk/libexec/log-processing/swiftoutput2plot
Modified:
   trunk/libexec/log-processing/normalize-log.pl
Log:
added plotting scripts from swift stdouterr

Modified: trunk/libexec/log-processing/normalize-log.pl
===================================================================
--- trunk/libexec/log-processing/normalize-log.pl	2012-02-08 03:09:46 UTC (rev 5559)
+++ trunk/libexec/log-processing/normalize-log.pl	2012-02-08 03:11:40 UTC (rev 5560)
@@ -15,6 +15,8 @@
 read(START, $earliesttime, 64);
 close START;
 
+print "earliest time: $earliesttime\n";
+
 open(LOG, $LOG) || die "$!\n";
 
 foreach $n (<LOG>) {

Added: trunk/libexec/log-processing/plot_active.plt
===================================================================
--- trunk/libexec/log-processing/plot_active.plt	                        (rev 0)
+++ trunk/libexec/log-processing/plot_active.plt	2012-02-08 03:11:40 UTC (rev 5560)
@@ -0,0 +1,7 @@
+set terminal png enhanced
+set output "activeplot.png"
+set nokey
+set xlabel "Time in sec"
+set ylabel "number of active jobs"
+set title "Active SciColSim jobs"
+plot "plot_active.txt" using 1 with line

Added: trunk/libexec/log-processing/plot_cumulative.plt
===================================================================
--- trunk/libexec/log-processing/plot_cumulative.plt	                        (rev 0)
+++ trunk/libexec/log-processing/plot_cumulative.plt	2012-02-08 03:11:40 UTC (rev 5560)
@@ -0,0 +1,8 @@
+set terminal png enhanced
+#set term postscript eps enhanced 
+set output "cumulativeplot.png"
+set nokey
+set xlabel "Time in seconds"
+set ylabel "number of completed jobs"
+set title "Cumulative jobs"
+plot "plot_cumulative.txt" using 1:2 with lines

Added: trunk/libexec/log-processing/swiftoutput2plot
===================================================================
--- trunk/libexec/log-processing/swiftoutput2plot	                        (rev 0)
+++ trunk/libexec/log-processing/swiftoutput2plot	2012-02-08 03:11:40 UTC (rev 5560)
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+#usage: ./swiftoutput2plot <swift.outfile>
+
+OUTFILE=$1
+
+#extract start time
+TMPDATE=`grep -i progress $OUTFILE | head -n 1 | cut -f4-9 -d ' '`
+START_TIME=`date +%s -d "$TMPDATE"`
+
+#extract end time
+TMPDATE=`grep -i progress $OUTFILE | tail -n 1 | cut -f4-9 -d ' '`
+END_TIME=`date +%s -d "$TMPDATE"`
+
+#duration
+DIFFTIME=$((END_TIME - START_TIME))
+
+#extract active runs in a file
+grep -o -i "Active:[0-9]*" $OUTFILE | awk -F: '{print $2}' > active.txt
+
+#extract successful completions in a file
+grep -o -i "Successfully:[0-9]*" $OUTFILE | awk -F: '{print $2}' > cumulative.txt
+
+#prepare tics
+activelines=`wc -l active.txt | awk '{print $1}'`
+cumulines=`wc -l cumulative.txt | awk '{print $1}'`
+
+activelinespertic=`echo "scale=5 ; $DIFFTIME / $activelines" | bc`
+seq 0 $activelinespertic $DIFFTIME > activetics.txt
+
+cumulinespertic=`echo "scale=5 ; $DIFFTIME / $cumulines" | bc`
+seq 0 $cumulinespertic $DIFFTIME > cumultics.txt
+
+#final plot data
+paste activetics.txt active.txt > plot_active.txt
+paste cumultics.txt cumulative.txt > plot_cumulative.txt
+


Property changes on: trunk/libexec/log-processing/swiftoutput2plot
___________________________________________________________________
Added: svn:executable
   + *




More information about the Swift-commit mailing list