Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- DISK="" # Name of a directory mounted in /Volumes
- INTERVAL=15
- while true; do
- s1=$(df -m | grep "$DISK" | awk '{print $3}')
- echo "s1=$s1"
- sleep $INTERVAL
- s2=$(df -m | grep "$DISK" | awk '{print $3}')
- echo "s2=$s2"
- r=$(( (s2 - s1) / INTERVAL ))
- echo "$DISK Write Rate: $r MB/S"
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement