I want to stress test a USB stick in a linux environment (preferably with a shell script). I'm considering just dd-ing reasonably large files in blocks around what might be the underlying page size of the usb stick (127 128 129, 255 256 257, 511 512 513, 1023 1024 1025).
But I'd like to use stressapptest and all the additional goodness it might have.
Does this work as I intend?
# Mount the flash drive
mount /dev/sda1 /mnt
# -f = filename
# -s = number of seconds to execute for
# -M = MiBs of memory to allocate
# -m = number of memory copy threads
# -W = use more CPU-stressful memory copy
stressapptest -f /mnt/file1 -f /mnt/file2 -s "$DURATION_SECS" -M 100 -m 2 -W
# Unmount the flash drive
umount /dev/sda1