Advertisement
arthurwayne

Untitled

Nov 30th, 2015
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.83 KB | None | 0 0
  1. #!/bin/bash
  2. tempfile="tmpfile_hdd-speed-test.tmp"
  3. size_MB="1000"
  4. # Cache leeren
  5. echo 3 > /proc/sys/vm/drop_caches
  6.  
  7. # Schreib - Test
  8. echo
  9. echo "[Starte] Schreib - Test"
  10. dd if=/dev/zero of="$tempfile" bs=1M count="$size_MB" conv=fdatasync,notrunc
  11. echo "[Beendet] Schreib - Test"
  12. echo "------------------------------"
  13. echo
  14.  
  15. # Lese - Test aus Cache
  16. echo "[Starte] Lese - Test aus Cache"
  17. dd if="$tempfile" of=/dev/zero
  18. echo "[Beendet] Lese - Test aus Cache"
  19. echo "------------------------------"
  20. echo
  21.  
  22. # Cache leeren
  23. echo 3 > /proc/sys/vm/drop_caches
  24.  
  25. # Lese - Test normal
  26. echo "[Starte] Lese - Test"
  27. dd if="$tempfile" of=/dev/zero
  28. echo "[Beendet] Lese - Test normal"
  29. echo "------------------------------"
  30. echo
  31. # tempfile löschen
  32. echo "[Info] lösche tmp file"
  33. rm -f "$tempfile"
  34. echo "------------------------------"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement