Changes

Jump to: navigation, search

Winter 2009 SYA810 Block Device Benchmark Scripts

689 bytes added, 09:40, 2 February 2009
Varinder Singh
Script in Python.Any suggestions would be welcome
 
 
=Kezhong Liang=
#!/bin/bash
 
echo "Start to test ..."
TIME_WRITE_START=$(date +%s)
dd if=/dev/zero of=test bs=1024 count=1000000
sync
TIME_WRITE_END=$(date +%s)
 
echo 3 > /proc/sys/vm/drop_caches
sync
TIME_READ_START=$(date +%s)
dd if=test of=/dev/null bs=1024 count=1000000
TIME_READ_END=$(date +%s)
 
rm test
 
echo "--------------------------------------------------------"
TIME_WRITE_USED=$(($TIME_WRITE_END - $TIME_WRITE_START))
echo -n "The write disk performance: "
echo -n $((1024 / $TIME_WRITE_USED))
echo " MB/sec"
TIME_READ_USED=$(($TIME_READ_END - $TIME_READ_START))
echo -n "The read disk performance: "
echo -n $((1024 / $TIME_READ_USED))
echo " MB/sec"
1
edit

Navigation menu