Created
May 26, 2017 09:18
-
-
Save nmasse-itix/af7170da295a64b80148e0d73eb7be80 to your computer and use it in GitHub Desktop.
Script to monitor disk write times
This file contains 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 | |
# Send stats to this file | |
exec 23>> stats.csv | |
while sleep 30; do | |
date="$(date -Iseconds)" | |
real="" | |
user="" | |
sys="" | |
t="$(time -p (dd if=/dev/urandom of=stats.bin bs=1M count=1 conv=fsync &>/dev/null) 2>&1 >/dev/null)" | |
echo $t |(read dummy real dummy user dummy sys && echo "$date,$real,$user,$sys") 1>&23 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment