DF-4482 / writer.sh
#!/bin/sh # writer $1 = id; sweeps the volume with stride, logging progress i=0 id=$1 stride=$(( (id * 37) % 13 + 1 )) while [ ! -f /tmp/stop_race ]; do off=$(( (i * stride * 8 + id * 64) % 688 )) dd if=/dev/zero of=/dev/vinum/vol/vol bs=4k seek=$off count=1 conv=notrunc >/dev/null 2>&1 i=$((i+1)) echo $i > /tmp/wcount.$id 2>/dev/null done |