#!/bin/csh -f
#
# memusage-check:  check the results directories to see how much 
#  memory each used
#
# this needs to be run from the source directory
#
# usage:  memusage-check [dir]...
# if no dirs, then it does all dirs.
#
# Part of
#              The STARFISH Parallel file-system simulator
#        (Simulation Tool for Advanced Research in File Systems)
# 
#                               David Kotz
#                           Dartmouth College
#                              Version 3.0
#                              October 1996
#                          dfk@cs.dartmouth.edu

if ($#argv == 0) then
    set dirs=(configs/*)
else
    set dirs=($*)
endif

foreach dir ($dirs)
    if (! -d $dir/results) continue

    grep ^memusage $dir/results/*.out
end
