Cyanrigger:
> What do you exactly mean by stress test? Just copying files from
> somewhere - maybe from /dev/zero to /dev/sda1 (which is my
> ext3) with various dd's ?

Filesystem stress test is something like this.
Of course, you can customize whatever you like.

#!/bin/bash

Creat()
{
        for i in $(($RANDOM % 25)) \
                $(($RANDOM % 25))/$(($RANDOM % 25)) \
                $(($RANDOM % 25))/$(($RANDOM % 25))/$(($RANDOM % 25))
        do dd if=/dev/zero of=$f bs=$((($RANDOM % 8) + 16)) count=$(($RANDOM % 
1024))
        done
}

Mkdir()
{
        mkdir -p $(($RANDOM % 25))/$(($RANDOM % 25))
}

Link()
{
        ln $(($RANDOM % 25)) $(($RANDOM % 25))
}

Symlink()
{
        ln -s $(($RANDOM % 25)) $(($RANDOM % 25))
}

Rename()
{
        mv $(($RANDOM % 25)) $(($RANDOM % 25))
}

Read()
{
        cat $(($RANDOM % 25)) $(($RANDOM % 25))/$(($RANDOM % 25))
}

Readdir()
{
        ls -R
}

Remove()
{
        rm -fr $(($RANDOM % 25))
}

Run()
{
        while true
        do $1
        done > /dev/null 2>&1
}

main()
{
        for i in Creat Mkdir Link Symlink Rename Read Readdir Remove
        do run $i &
        done
        wait
}


> Hmm... Not all will fail, since the ext3 is mounted writable for 5
> seconds. So should I write just random files to /dev/sda1 (my ext3) in
> these 5 second periods of time and see if the foreground script prints
> any errors? Is this the purpose of the test?

Exactly essentially, not only dd(1) but also more various concurent
operations though.
Probably "concurrent" and "various" are important.


J. R. Okajima

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev

Reply via email to