[Swift-commit] r2355 - log-processing/bin
noreply at svn.ci.uchicago.edu
noreply at svn.ci.uchicago.edu
Tue Dec 2 10:21:41 CST 2008
Author: benc
Date: 2008-12-02 10:21:40 -0600 (Tue, 02 Dec 2008)
New Revision: 2355
Added:
log-processing/bin/swift2cedps
Log:
commandline utility to drive CEDPS format log conversion
Added: log-processing/bin/swift2cedps
===================================================================
--- log-processing/bin/swift2cedps (rev 0)
+++ log-processing/bin/swift2cedps 2008-12-02 16:21:40 UTC (rev 2355)
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+ORIGDIR=$(pwd)
+WORKINGDIR=$(mktemp -d /tmp/swift-plot-log-XXXXXXXXXXXXXXXX)
+
+
+# $1 should be the pathname of the log file to plot
+
+LOG_CODE_HOME="`dirname $0`/../libexec/"
+export SWIFT_PLOT_HOME=$LOG_CODE_HOME
+
+export PATH=${LOG_CODE_HOME}:${PATH}
+
+FC="${1:0:1}"
+
+if [ "$FC" = "/" ]; then # absolute path
+ LOG_FILE_PATH=$1
+else
+ LOG_FILE_PATH="`pwd`/$1"
+fi
+
+LOG_DIRECTORY=`dirname $LOG_FILE_PATH`
+
+LOG_FILE_BASE=`basename $LOG_FILE_PATH .log`
+
+echo Log file path is $LOG_FILE_PATH
+echo Log is in directory $LOG_DIRECTORY
+echo Log basename is $LOG_FILE_BASE
+
+cd $WORKINGDIR
+echo Now in directory $(pwd)
+
+MAKEENV="-f ${LOG_CODE_HOME}/makefile -I ${LOG_CODE_HOME}"
+MAKETARGETS=""
+
+INFODIR=${LOG_DIRECTORY}/${LOG_FILE_BASE}.d
+
+if [ -d $INFODIR ]; then
+ MAKEENV="$MAKEENV IDIR=${LOG_DIRECTORY}/${LOG_FILE_BASE}.d/"
+ MAKETARGETS="webpage.info"
+fi
+
+make $MAKEENV SDL=${ORIGDIR}/report-${LOG_FILE_BASE} LOG=$LOG_FILE_PATH clean execute.cedps execute2.cedps karatasks.cedps
+
+cp -v *.cedps $ORIGDIR
+
+# webpage.kara webpage.weights karatasks.JOB_SUBMISSION.Queue.transitions karatasks.JOB_SUBMISSION.Queue.event karatasks.JOB_SUBMISSION.eip $MAKETARGETS webpage distribute
+
+# mv report-$LOG_FILE_BASE $LOG_DIRECTORY/
+
+# rm -r $WORKINGDIR
+echo not removing $WORKINGDIR
Property changes on: log-processing/bin/swift2cedps
___________________________________________________________________
Name: svn:executable
+ *
More information about the Swift-commit
mailing list