ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitProd/Processing/bin/status.sh
Revision: 1.1
Committed: Sun Dec 5 01:01:21 2010 UTC (14 years, 5 months ago) by paus
Content type: application/x-sh
Branch: MAIN
CVS Tags: Mit_020pre1, Mit_018, Mit_017
Log Message:
Next iteration with improved downloading tool.

File Contents

# Content
1 #!/bin/bash
2 #---------------------------------------------------------------------------------------------------
3 # Determining the status of a given production sample
4 #---------------------------------------------------------------------------------------------------
5 H=`basename $0`
6
7 BOOK=$1
8 DATASET=$2
9
10 DIR=/pnfs/cmsaf.mit.edu/t2bat/cms/store/user/paus/$BOOK
11 if [ "`list $DIR | grep $DATASET`" != "" ]
12 then
13 nAll=`wc -l $BOOK/$DATASET.lfns | cut -d ' ' -f 1`
14 nDone=`list $DIR/$DATASET | grep root | wc -l`
15 nMissing=$(( ${nAll}-${nDone} ))
16
17 nEvents=`cat $BOOK/$DATASET.lfns | awk '{n=n+$3} END {print n}'`
18 size=`list $DIR/$DATASET | grep root | awk '{s=s+$1} END {print s/1024./1024./1024.}'`
19 sizePerEvent=`echo $nEvents $size | awk '{print $2*1024*1024/$1}'`
20 printf "%-14s %-30s %6d %6d %6d Evts: %12d in %8.2f GB (%5.1f kB/evt)\n" \
21 $BOOK $DATASET $nAll $nDone $nMissing $nEvents $size $sizePerEvent
22 fi
23
24 exit 0