Created
April 6, 2021 19:44
-
-
Save corbtastik/1d98c7d5ae91011fa3fb34d961929c62 to your computer and use it in GitHub Desktop.
cheap disk write test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
writeYo() { | |
X_00=`stat -tc %s .` | |
dd if=/dev/zero of=/tmp/diskyo-${X_00} bs=${X_00} count=100k conv=fdatasync,notrunc status=progress | |
X_02=$(( 2*$X_00 )) | |
dd if=/dev/zero of=/tmp/diskyo-${X_02} bs=${X_02} count=100k conv=fdatasync,notrunc status=progress | |
X_04=$(( 4*$X_00 )) | |
dd if=/dev/zero of=/tmp/diskyo-${X_04} bs=${X_04} count=100k conv=fdatasync,notrunc status=progress | |
X_06=$(( 6*$X_00 )) | |
dd if=/dev/zero of=/tmp/diskyo-${X_06} bs=${X_06} count=100k conv=fdatasync,notrunc status=progress | |
X_08=$(( 8*$X_00 )) | |
dd if=/dev/zero of=/tmp/diskyo-${X_08} bs=${X_08} count=100k conv=fdatasync,notrunc status=progress | |
X_10=$(( 10*$X_00 )) | |
dd if=/dev/zero of=/tmp/diskyo-${X_10} bs=${X_10} count=100k conv=fdatasync,notrunc status=progress | |
rm /tmp/diskyo-${X_00} | |
rm /tmp/diskyo-${X_02} | |
rm /tmp/diskyo-${X_04} | |
rm /tmp/diskyo-${X_06} | |
rm /tmp/diskyo-${X_08} | |
rm /tmp/diskyo-${X_10} | |
} | |
writeYo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment