For Swat to be able to create a proper Replay parameter file it needs to know how large the luns are. For that the prtvtoc command is run during trace creation for each lun found in /dev/rdsk/. That can get awfully annoyingly slow when there are a lot of luns. To make this much faster replace the 'prtvtoc' lines in with:

# Generate prtvtoc data (Is needed to create Replay parameter file)
# (devfsadm -C will clean up old garbage in /dev/rdsk)
printf "Running prtvtoc command"
ls /dev/rdsk/* > /tmp/tnfe1
nawk '{disk = substr($1,1,length($1)-2); if (disk != last) print $1; last = disk}' \
/tmp/tnfe1 > /tmp/tnfe2
rm /tmp/tnf_prtvtoc.txt 2> /dev/null
while read disk;do
echo Running prtvtoc $disk
echo $disk >> /tmp/tnf_prtvtoc.txt
prtvtoc -h $disk >> /tmp/tnf_prtvtoc.txt 2>/dev/null
done < /tmp/tnfe2
cp /tmp/tnf_prtvtoc.txt tnf_prtvtoc.txt


Read More about [Swat trace and prtvtoc...