Será que isso ajuda?

fs-stress-olh.sh
#!/bin/bash
export PATH=
/bin/echo $$ > /dev/shm/bug42232-pid-$$
/bin/mkdir stress-root
cd stress-root

/bin/echo Setting up ...
for i in 0 1 2 3 4 5 6 7 8 9; do
for j in 0 1 2 3 4 5 6 7 8 9; do
for k in 0 1 2 3 4 5 6 7 8 9; do
/bin/echo -n "$i$j$k " >> onethousand
done
/bin/echo -n "$i$j " >> onehundret
done
/bin/echo -n "$i " >> ten
done
/bin/echo -n "0 1 2 3 4 5 6 7 8 9" > onethousand
for h in 0 1 ; do
for i in `/bin/cat onethousand`; do
/bin/mkdir $h$i
/bin/echo $h$i > ./$h$i/DIRNAME
for j in `/bin/cat onehundret`; do
/bin/mkdir $h$i/$j
/bin/echo $h$i/$j > ./$h$i/$j/DIRNAME
for k in `/bin/cat onehundret`; do
/bin/mkdir $h$i/$j/$k
/bin/echo $h$i/$j/$k > ./$h$i/$j/$k/DIRNAME
for l in `/bin/cat ten`; do
/bin/mkdir $h$i/$j/$k/$l
/bin/echo $h$i/$j/$k/$l > ./$h$i/$j/$k/$l/DIRNAME || /bin/kill -STOP 
`/bin/cat /dev/shm/bug42232-pid-*`
/bin/dd if=/dev/zero of=$h$i/$j/$k/$l/data bs=1024 count=1 &> /dev/zero
done
done
done
done
done

cd ..
/bin/rm -rf stress-root /dev/shm/bug42232-pid-$$


start_test.sh
#!/bin/bash
set -ex
cd /bug42232
test -x ~olh/bugs/42232/fs-stress-olh.sh
numcpus=`grep -Ec '^cpu[0-9]' /proc/stat`
for i in `seq 1 $numcpus`
do
(rm -rf $i ; mkdir -v $i; cd $i || exit 1 ; pwd ; nohup sh -c 'while 
date ; do ~olh/bugs/42232/fs-stress-olh.sh ; done' < /dev/null > logfile 
2>&1 & )
done
sleep $numcpus
( tail --follow=name --retry --lines=42 ?/logfile & )



victorzanel wrote:

>Alguem conhece algum shell script para realizar stress test em um 
>servidor linux?
>
>
>
>
>  
>


-- 
Cleber J Santos
---------------------
  _
 °v°  [EMAIL PROTECTED]
/(_)\ 011 + 3120 - 4542
 ^ ^
O mundo ao seu redor só pode colaborar para que você se conheça melhor. Tudo
à sua volta é um reflexo daquilo que você acredita.



---------------------------------------------------------------------
Esta lista não admite a abordagem de outras liguagens de programação, como 
perl, C etc. Quem insistir em não seguir esta regra será moderado sem prévio 
aviso.
---------------------------------------------------------------------
Sair da lista: [EMAIL PROTECTED]
---------------------------------------------------------------------
Esta lista é moderada de acordo com o previsto em 
http://www.listas-discussao.cjb.net
---------------------------------------------------------------------
Servidor Newsgroup da lista: news.gmane.org
Grupo: gmane.org.user-groups.programming.shell.brazil

 
Links do Yahoo! Grupos

<*> Para visitar o site do seu grupo na web, acesse:
    http://br.groups.yahoo.com/group/shell-script/

<*> Para sair deste grupo, envie um e-mail para:
    [EMAIL PROTECTED]

<*> O uso que você faz do Yahoo! Grupos está sujeito aos:
    http://br.yahoo.com/info/utos.html

 


Responder a