#!/bin/csh

### you may want to run this with -c X and/or -w Y

set SEEKRANDOM = /usr/bin/isi_hwtools/seekrandom
set bays       = `isi_drivenum -Mb`

#set PART = s1e
set PART = s1b

if ($# != 0) then
	set SEEKARGS = "$*"
else
	set SEEKARGS = "-c 10000 -w 100"
endif

@ BAY = 1
while ( $BAY <= $bays )
	set DEV = "`isi_drivenum -d ${BAY}`"
	if ( -e $DEV ) then
		echo "starting seekrandom on $DEV with $SEEKARGS"
		$SEEKRANDOM $SEEKARGS $* $DEV$PART &
	endif
	@ BAY = ($BAY + 1)
end
