sudo fio --name=seq_write_test --filename=/media/hptnvme/fio.test --rw=write --bs=4M --ioengine=libaio --direct=1 --size=100G --numjobs=1 --runtime=100 --time_based --group_reporting --log_avg_msec=1000 --write_bw_log=/media/hptnvme/seq_write_bw

gnuplot -e "
    set datafile separator ',';
    set term png size 1200,600 enhanced font 'Arial,10';
    set output 'fio_bandwidth_chart.png';
    set title 'Sustained Sequential Write Bandwidth Over Time';
    set xlabel 'Time (Seconds)';
    set ylabel 'Bandwidth (MiB/s)';
    set grid;
    plot '/media/hptnvme/seq_write_bw_bw.1.log' using (\$1/1000):(\$2/1024) with lines title 'Write Speed' linecolor rgb '#0072B2' lw 2;
"
