Hello all,
I am new to Unix and as my first exercise i have to write a mini script to load test the memory on new server.
My limited knowledge of commands has come up with.
1. Fill the swap space
2. Create a large file.
#!/usr/bin/ksh
x=1
while [ "$x" -lt "1000" ] ;do
echo $x
x=`echo "$x + 1" | bc`
while true;do
ls -l > /james/test12
done
while true;do
cat /james/test12 | grep .
done
echo "x after add = $x"
done
It sort of works!! but the memory level gets down to a certian level and it stops.
It also takes ages and the test machine has 758mb wheras the server has 4gb.
Can anyone help with completing this any quicker.
Thanks in advance
Jameshall
I am new to Unix and as my first exercise i have to write a mini script to load test the memory on new server.
My limited knowledge of commands has come up with.
1. Fill the swap space
2. Create a large file.
#!/usr/bin/ksh
x=1
while [ "$x" -lt "1000" ] ;do
echo $x
x=`echo "$x + 1" | bc`
while true;do
ls -l > /james/test12
done
while true;do
cat /james/test12 | grep .
done
echo "x after add = $x"
done
It sort of works!! but the memory level gets down to a certian level and it stops.
It also takes ages and the test machine has 758mb wheras the server has 4gb.
Can anyone help with completing this any quicker.
Thanks in advance
Jameshall