HDD Stress Test with Python
Bart Nessux
bart_nessux at hotmail.com
Thu Jan 22 17:41:13 EST 2004
A bit off topic, but here goes: Does this look like a reasonable hard
drive stress-test? I run it repeatedly for a few days on our new
PowerMac G5's (they come with Python 2.3 installed!!!) which we've had
drive problems with. Two 80GB SATA Maxtor drives replaced already. Only
been in use for a few days. Apple is replacing them with Seagate drives,
not that that matters. Here's the script:
def dd_test():
import os
import time
print
print "DDing first partition to second partition... please wait."
fp = os.popen("/bin/dd if=/dev/disk0s3 of=/dev/disk0s5", "r")
fp
fp.close()
print "DD has completed."
print
print "Formatting first partition UFS"
print
fp1 = os.popen("/sbin/newfs /dev/disk0s3", "r")
fp1
fp1.close()
print
print "Formatting second partition UFS"
print
fp2 = os.popen("/sbin/newfs /dev/disk0s5", "r")
fp2
fp2.close()
print "Sleeping 60 seconds before starting again..."
print
time.sleep(60)
dd_test()
dd_test()
# Make two equal sized partitions on Mac internal HDD.
# Unmount the internal HDD, boot from firewire drive
# and run script.
# Used 'pdisk /dev/disk0 -dump' to get info about drive.
# Used 'newfs /dev/disk0s3' to format a partition UFS.
More information about the Python-list
mailing list