2009-08-13 17:23:42 +02:00
|
|
|
#!/usr/bin/ksh
|
|
|
|
|
|
|
|
foo=0
|
|
|
|
LoopCountForMEMSAP=0
|
|
|
|
bla=234
|
|
|
|
typeset -lui count=4000
|
|
|
|
typeset -lui leak=0
|
|
|
|
|
|
|
|
vm()
|
|
|
|
{
|
|
|
|
typeset size
|
|
|
|
typeset key unit result=""
|
|
|
|
while read key size unit; do
|
|
|
|
case "$key" in
|
|
|
|
VmSize*) result=${result:+"$result:"}$size ;;
|
|
|
|
VmRSS*) result=${result:+"$result:"}$size ;;
|
|
|
|
VmData*) result=${result:+"$result:"}$size ;;
|
|
|
|
esac
|
|
|
|
done < /proc/$$/status
|
|
|
|
echo $result
|
|
|
|
}
|
|
|
|
|
|
|
|
fusub()
|
|
|
|
{
|
|
|
|
datun=`date +%S`
|
|
|
|
# datun=$(date +%S)
|
|
|
|
interval=$((10 - datun%10))
|
|
|
|
}
|
|
|
|
|
|
|
|
curstate="XXXX:XXXX:XXXX"
|
|
|
|
oldstate=$(vm)
|
|
|
|
|
|
|
|
while ((count-- > 0))
|
|
|
|
do
|
|
|
|
foo=$((foo+1))
|
|
|
|
datum=`fusub`
|
|
|
|
# datum=$(fusub)
|
|
|
|
|
|
|
|
curstate=$(vm)
|
|
|
|
[ "$curstate" != "$oldstate" ] && let leak++
|
|
|
|
oldstate="$curstate"
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
echo "[${0##*/}: leak count at $leak]"
|
2009-08-24 16:23:50 +02:00
|
|
|
((leak < 8)) || exit 1
|