Skip to content

Instantly share code, notes, and snippets.

@sennajox
sennajox / run_fio.sh
Last active December 21, 2023 11:00
A script that runs fio test and genearates a simple result for each jobs
#!/bin/bash
if [ $# -lt 2 ]; then
echo "usage:$0 dev output_dir [iodepth]"
echo "example 1: Testing the whole block device. Attention: That will destory the filesystem on the target block device"
echo "./run_fio.sh /dev/sdb fio_test"
echo ""
echo "example 2: Testing a file, but not destory filesystem. Suppose the target device mount on /data"
echo "fallocate -l 1G /data/test.dat"
echo "./run_fio.sh /data/test.dat fio_test"