basher: swap experimenting

Ragnar Hojland Espinosa (root@lightside.ddns.org)
Sat, 28 Mar 1998 11:54:54 +0100 (MET)


Here is `basher', a little thing I wrote to test system behaviour and swap
performance.. Yes, I was bored and somewhat intrigued, I don't use to swap
more than 100k (and if it does, it's absolutely unnoticeable:)

____/| Ragnar Hojland (tech.support@redestb.es) Fingerprint 94C4B
\ o.O| 2F0D27DE025BE2302C
=(_)= "Thou shalt not follow the NULL pointer for 104B78C56 B72F0822
U chaos and madness await thee at its end." hkp://keys.pgp.com

#!/bin/bash

# tune MIN and MAX to your taste. mines are set between the moment when it
# just starts to swap, and when the swap is half full (40mb ram + 30 swap)

MIN=145
MAX=180

i=${1:-1}
j=${2:-1}

while :
do
if [ $i -le $MIN ]
then
j=1
fi

/usr/local/bin/clear
/usr/bin/free
echo bashers bashing: $i

let i=i+j

if [ $i -gt $MAX -o $j -eq -1 ]
then
exit
fi

./basher $i $j
j=-1
done

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu